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 442262250Speter/** One of the flags for a commit item. The node has a lock token that 443262250Speter * should be released after a successful commit and, if the node is also 444262250Speter * modified, transferred to the server as part of the commit process. 445262250Speter * 446262250Speter * @since New in 1.2. */ 447251881Speter#define SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN 0x20 448262250Speter/** One of the flags for a commit item. The node is the 'moved here' 449262250Speter * side of a local move. This is used to check and enforce that the 450262250Speter * other side of the move is also included in the commit. 451262250Speter * 452262250Speter * @since New in 1.8. */ 453251881Speter#define SVN_CLIENT_COMMIT_ITEM_MOVED_HERE 0x40 454251881Speter/** @} */ 455251881Speter 456251881Speter/** The commit candidate structure. 457251881Speter * 458251881Speter * In order to avoid backwards compatibility problems clients should use 459251881Speter * svn_client_commit_item3_create() to allocate and initialize this 460251881Speter * structure instead of doing so themselves. 461251881Speter * 462251881Speter * @since New in 1.5. 463251881Speter */ 464251881Spetertypedef struct svn_client_commit_item3_t 465251881Speter{ 466251881Speter /* IMPORTANT: If you extend this structure, add new fields to the end. */ 467251881Speter 468289180Speter /** absolute working-copy path of item. Always set during normal commits 469289180Speter * (and copies from a working copy) to the repository. Can only be NULL 470289180Speter * when stub commit items are created for operations that only involve 471289180Speter * direct repository operations. During WC->REPOS copy operations, this 472289180Speter * path is the WC source path of the operation. */ 473251881Speter const char *path; 474251881Speter 475251881Speter /** node kind (dir, file) */ 476251881Speter svn_node_kind_t kind; 477251881Speter 478289180Speter /** commit URL for this item. Points to the repository location of PATH 479289180Speter * during commits, or to the final URL of the item when copying from the 480289180Speter * working copy to the repository. */ 481251881Speter const char *url; 482251881Speter 483251881Speter /** revision of textbase */ 484251881Speter svn_revnum_t revision; 485251881Speter 486251881Speter /** copyfrom-url or NULL if not a copied item */ 487251881Speter const char *copyfrom_url; 488251881Speter 489251881Speter /** copyfrom-rev, valid when copyfrom_url != NULL */ 490251881Speter svn_revnum_t copyfrom_rev; 491251881Speter 492251881Speter /** state flags */ 493251881Speter apr_byte_t state_flags; 494251881Speter 495251881Speter /** An array of #svn_prop_t *'s, which are incoming changes from 496251881Speter * the repository to WC properties. These changes are applied 497251881Speter * post-commit. 498251881Speter * 499251881Speter * When adding to this array, allocate the #svn_prop_t and its 500251881Speter * contents in @c incoming_prop_changes->pool, so that it has the 501251881Speter * same lifetime as this data structure. 502251881Speter * 503362181Sdim * See https://issues.apache.org/jira/browse/SVN-806 for a 504251881Speter * description of what would happen if the post-commit process 505251881Speter * didn't group these changes together with all other changes to the 506251881Speter * item. 507251881Speter */ 508251881Speter apr_array_header_t *incoming_prop_changes; 509251881Speter 510251881Speter /** An array of #svn_prop_t *'s, which are outgoing changes to 511251881Speter * make to properties in the repository. These extra property 512251881Speter * changes are declared pre-commit, and applied to the repository as 513251881Speter * part of a commit. 514251881Speter * 515251881Speter * When adding to this array, allocate the #svn_prop_t and its 516251881Speter * contents in @c outgoing_prop_changes->pool, so that it has the 517251881Speter * same lifetime as this data structure. 518251881Speter */ 519251881Speter apr_array_header_t *outgoing_prop_changes; 520251881Speter 521251881Speter /** 522251881Speter * When processing the commit this contains the relative path for 523362181Sdim * the commit session. NULL until the commit item is preprocessed. 524251881Speter * @since New in 1.7. 525251881Speter */ 526251881Speter const char *session_relpath; 527251881Speter 528251881Speter /** 529251881Speter * When committing a move, this contains the absolute path where 530251881Speter * the node was directly moved from. (If an ancestor at the original 531251881Speter * location was moved then it points to where the node itself was 532251881Speter * moved from; not the original location.) 533251881Speter * @since New in 1.8. 534251881Speter */ 535251881Speter const char *moved_from_abspath; 536251881Speter 537251881Speter} svn_client_commit_item3_t; 538251881Speter 539251881Speter/** The commit candidate structure. 540251881Speter * 541251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 542251881Speter */ 543251881Spetertypedef struct svn_client_commit_item2_t 544251881Speter{ 545251881Speter /** absolute working-copy path of item */ 546251881Speter const char *path; 547251881Speter 548251881Speter /** node kind (dir, file) */ 549251881Speter svn_node_kind_t kind; 550251881Speter 551251881Speter /** commit URL for this item */ 552251881Speter const char *url; 553251881Speter 554251881Speter /** revision of textbase */ 555251881Speter svn_revnum_t revision; 556251881Speter 557251881Speter /** copyfrom-url or NULL if not a copied item */ 558251881Speter const char *copyfrom_url; 559251881Speter 560251881Speter /** copyfrom-rev, valid when copyfrom_url != NULL */ 561251881Speter svn_revnum_t copyfrom_rev; 562251881Speter 563251881Speter /** state flags */ 564251881Speter apr_byte_t state_flags; 565251881Speter 566251881Speter /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes 567251881Speter * field. 568251881Speter */ 569251881Speter apr_array_header_t *wcprop_changes; 570251881Speter} svn_client_commit_item2_t; 571251881Speter 572251881Speter/** The commit candidate structure. 573251881Speter * 574251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 575251881Speter */ 576251881Spetertypedef struct svn_client_commit_item_t 577251881Speter{ 578251881Speter /** absolute working-copy path of item */ 579251881Speter const char *path; 580251881Speter 581251881Speter /** node kind (dir, file) */ 582251881Speter svn_node_kind_t kind; 583251881Speter 584251881Speter /** commit URL for this item */ 585251881Speter const char *url; 586251881Speter 587251881Speter /** revision (copyfrom-rev if _IS_COPY) */ 588251881Speter svn_revnum_t revision; 589251881Speter 590251881Speter /** copyfrom-url */ 591251881Speter const char *copyfrom_url; 592251881Speter 593251881Speter /** state flags */ 594251881Speter apr_byte_t state_flags; 595251881Speter 596251881Speter /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes 597251881Speter * field. 598251881Speter */ 599251881Speter apr_array_header_t *wcprop_changes; 600251881Speter 601251881Speter} svn_client_commit_item_t; 602251881Speter 603251881Speter/** Return a new commit item object, allocated in @a pool. 604251881Speter * 605251881Speter * In order to avoid backwards compatibility problems, this function 606251881Speter * is used to initialize and allocate the #svn_client_commit_item3_t 607251881Speter * structure rather than doing so explicitly, as the size of this 608251881Speter * structure may change in the future. 609251881Speter * 610251881Speter * @since New in 1.6. 611251881Speter */ 612251881Spetersvn_client_commit_item3_t * 613251881Spetersvn_client_commit_item3_create(apr_pool_t *pool); 614251881Speter 615251881Speter/** Like svn_client_commit_item3_create() but with a stupid "const" 616251881Speter * qualifier on the returned structure, and it returns an error that 617251881Speter * will never happen. 618251881Speter * 619251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 620251881Speter */ 621251881SpeterSVN_DEPRECATED 622251881Spetersvn_error_t * 623251881Spetersvn_client_commit_item_create(const svn_client_commit_item3_t **item, 624251881Speter apr_pool_t *pool); 625251881Speter 626251881Speter/** 627251881Speter * Return a duplicate of @a item, allocated in @a pool. No part of the 628251881Speter * new structure will be shared with @a item, except for the adm_access 629251881Speter * member. 630251881Speter * 631251881Speter * @since New in 1.5. 632251881Speter */ 633251881Spetersvn_client_commit_item3_t * 634251881Spetersvn_client_commit_item3_dup(const svn_client_commit_item3_t *item, 635251881Speter apr_pool_t *pool); 636251881Speter 637251881Speter/** 638251881Speter * Return a duplicate of @a item, allocated in @a pool. No part of the new 639251881Speter * structure will be shared with @a item. 640251881Speter * 641251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 642251881Speter */ 643251881SpeterSVN_DEPRECATED 644251881Spetersvn_client_commit_item2_t * 645251881Spetersvn_client_commit_item2_dup(const svn_client_commit_item2_t *item, 646251881Speter apr_pool_t *pool); 647251881Speter 648251881Speter/** Callback type used by commit-y operations to get a commit log message 649251881Speter * from the caller. 650251881Speter * 651251881Speter * Set @a *log_msg to the log message for the commit, allocated in @a 652251881Speter * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file 653251881Speter * to the path of any temporary file which might be holding that log 654251881Speter * message, or @c NULL if no such file exists (though, if @a *log_msg is 655251881Speter * @c NULL, this value is undefined). The log message MUST be a UTF8 656251881Speter * string with LF line separators. 657251881Speter * 658251881Speter * @a commit_items is a read-only array of #svn_client_commit_item3_t 659251881Speter * structures, which may be fully or only partially filled-in, 660251881Speter * depending on the type of commit operation. 661251881Speter * 662251881Speter * @a baton is provided along with the callback for use by the handler. 663251881Speter * 664251881Speter * All allocations should be performed in @a pool. 665251881Speter * 666251881Speter * @since New in 1.5. 667251881Speter */ 668251881Spetertypedef svn_error_t *(*svn_client_get_commit_log3_t)( 669251881Speter const char **log_msg, 670251881Speter const char **tmp_file, 671251881Speter const apr_array_header_t *commit_items, 672251881Speter void *baton, 673251881Speter apr_pool_t *pool); 674251881Speter 675251881Speter/** Callback type used by commit-y operations to get a commit log message 676251881Speter * from the caller. 677251881Speter * 678251881Speter * Set @a *log_msg to the log message for the commit, allocated in @a 679251881Speter * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file 680251881Speter * to the path of any temporary file which might be holding that log 681251881Speter * message, or @c NULL if no such file exists (though, if @a *log_msg is 682251881Speter * @c NULL, this value is undefined). The log message MUST be a UTF8 683251881Speter * string with LF line separators. 684251881Speter * 685251881Speter * @a commit_items is a read-only array of #svn_client_commit_item2_t 686251881Speter * structures, which may be fully or only partially filled-in, 687251881Speter * depending on the type of commit operation. 688251881Speter * 689251881Speter * @a baton is provided along with the callback for use by the handler. 690251881Speter * 691251881Speter * All allocations should be performed in @a pool. 692251881Speter * 693251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 694251881Speter */ 695251881Spetertypedef svn_error_t *(*svn_client_get_commit_log2_t)( 696251881Speter const char **log_msg, 697251881Speter const char **tmp_file, 698251881Speter const apr_array_header_t *commit_items, 699251881Speter void *baton, 700251881Speter apr_pool_t *pool); 701251881Speter 702251881Speter/** Callback type used by commit-y operations to get a commit log message 703251881Speter * from the caller. 704251881Speter * 705251881Speter * Set @a *log_msg to the log message for the commit, allocated in @a 706251881Speter * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file 707251881Speter * to the path of any temporary file which might be holding that log 708251881Speter * message, or @c NULL if no such file exists (though, if @a *log_msg is 709251881Speter * @c NULL, this value is undefined). The log message MUST be a UTF8 710251881Speter * string with LF line separators. 711251881Speter * 712251881Speter * @a commit_items is a read-only array of #svn_client_commit_item_t 713251881Speter * structures, which may be fully or only partially filled-in, 714251881Speter * depending on the type of commit operation. 715251881Speter * 716251881Speter * @a baton is provided along with the callback for use by the handler. 717251881Speter * 718251881Speter * All allocations should be performed in @a pool. 719251881Speter * 720251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 721251881Speter */ 722251881Spetertypedef svn_error_t *(*svn_client_get_commit_log_t)( 723251881Speter const char **log_msg, 724251881Speter const char **tmp_file, 725251881Speter apr_array_header_t *commit_items, 726251881Speter void *baton, 727251881Speter apr_pool_t *pool); 728251881Speter 729251881Speter/** @} */ 730251881Speter 731251881Speter/** 732251881Speter * Client blame 733251881Speter * 734251881Speter * @defgroup clnt_blame Client blame functionality 735251881Speter * 736251881Speter * @{ 737251881Speter */ 738251881Speter 739362181Sdim/** Callback type used by svn_client_blame6() to notify the caller 740251881Speter * that line @a line_no of the blamed file was last changed in @a revision 741251881Speter * which has the revision properties @a rev_props, and that the contents were 742251881Speter * @a line. 743251881Speter * 744251881Speter * If svn_client_blame5() was called with @a include_merged_revisions set to 745251881Speter * TRUE, @a merged_revision, @a merged_rev_props and @a merged_path will be 746251881Speter * set, otherwise they will be NULL. @a merged_path will be set to the 747251881Speter * absolute repository path. 748251881Speter * 749251881Speter * All allocations should be performed in @a pool. 750251881Speter * 751251881Speter * @note If there is no blame information for this line, @a revision will be 752251881Speter * invalid and @a rev_props will be NULL. In this case @a local_change 753251881Speter * will be true if the reason there is no blame information is that the line 754251881Speter * was modified locally. In all other cases @a local_change will be false. 755251881Speter * 756362181Sdim * Character Encoding and Line Splitting: 757362181Sdim * 758362181Sdim * It is up to the client to determine the character encoding. The @a line 759362181Sdim * content is delivered without any encoding conversion. The line splitting 760362181Sdim * is designed to work with ASCII-compatible encodings including UTF-8. Any 761362181Sdim * of the byte sequences LF ("\n"), CR ("\n"), CR LF ("\r\n") ends a line 762362181Sdim * and is not included in @a line. The @a line content can include all other 763362181Sdim * byte values including zero (ASCII NUL). 764362181Sdim * 765362181Sdim * @note That is how line splitting is done on the final file content, from 766362181Sdim * which this callback is driven. It is not entirely clear whether the line 767362181Sdim * splitting used to calculate diffs between each revision and assign a 768362181Sdim * revision number to each line is exactly compatible with this in all cases. 769362181Sdim * 770362181Sdim * Blaming files that have <tt>svn:mime-type</tt> set to something other 771362181Sdim * than <tt>text/...</tt> requires the @a ignore_mime_type flag to be set to 772362181Sdim * true when calling the svn_client_blame6 function. 773362181Sdim * 774362181Sdim * @since New in 1.12. 775362181Sdim */ 776362181Sdimtypedef svn_error_t *(*svn_client_blame_receiver4_t)( 777362181Sdim void *baton, 778362181Sdim apr_int64_t line_no, 779362181Sdim svn_revnum_t revision, 780362181Sdim apr_hash_t *rev_props, 781362181Sdim svn_revnum_t merged_revision, 782362181Sdim apr_hash_t *merged_rev_props, 783362181Sdim const char *merged_path, 784362181Sdim const svn_string_t *line, 785362181Sdim svn_boolean_t local_change, 786362181Sdim apr_pool_t *pool); 787362181Sdim 788362181Sdim/** 789362181Sdim * Similar to #svn_client_blame_receiver4_t, but with the @a line parameter 790362181Sdim * as a (const char*) instead of an svn_string_t, and the parameters 791362181Sdim * @a start_revnum and @a end_revnum contain the start and end revision 792362181Sdim * number of the entire blame operation, as resolved from the repository 793362181Sdim * inside svn_client_blame6(). 794362181Sdim * 795362181Sdim * @deprecated Provided for backward compatibility with the 1.11 API. 796362181Sdim * To replace @a start_revnum and @a end_revnum, see the corresponding 797362181Sdim * output parameters in svn_client_blame6(). 798362181Sdim * 799251881Speter * @since New in 1.7. 800251881Speter */ 801251881Spetertypedef svn_error_t *(*svn_client_blame_receiver3_t)( 802251881Speter void *baton, 803251881Speter svn_revnum_t start_revnum, 804251881Speter svn_revnum_t end_revnum, 805251881Speter apr_int64_t line_no, 806251881Speter svn_revnum_t revision, 807251881Speter apr_hash_t *rev_props, 808251881Speter svn_revnum_t merged_revision, 809251881Speter apr_hash_t *merged_rev_props, 810251881Speter const char *merged_path, 811251881Speter const char *line, 812251881Speter svn_boolean_t local_change, 813251881Speter apr_pool_t *pool); 814251881Speter 815251881Speter/** 816251881Speter * Similar to #svn_client_blame_receiver3_t, but with separate author and 817251881Speter * date revision properties instead of all revision properties, and without 818251881Speter * information about local changes. 819251881Speter * 820251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 821251881Speter * 822251881Speter * @since New in 1.5. 823251881Speter */ 824251881Spetertypedef svn_error_t *(*svn_client_blame_receiver2_t)( 825251881Speter void *baton, 826251881Speter apr_int64_t line_no, 827251881Speter svn_revnum_t revision, 828251881Speter const char *author, 829251881Speter const char *date, 830251881Speter svn_revnum_t merged_revision, 831251881Speter const char *merged_author, 832251881Speter const char *merged_date, 833251881Speter const char *merged_path, 834251881Speter const char *line, 835251881Speter apr_pool_t *pool); 836251881Speter 837251881Speter/** 838251881Speter * Similar to #svn_client_blame_receiver2_t, but without @a merged_revision, 839251881Speter * @a merged_author, @a merged_date, or @a merged_path members. 840251881Speter * 841251881Speter * @note New in 1.4 is that the line is defined to contain only the line 842251881Speter * content (and no [partial] EOLs; which was undefined in older versions). 843251881Speter * Using this callback with svn_client_blame() or svn_client_blame2() 844251881Speter * will still give you the old behaviour. 845251881Speter * 846251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 847251881Speter */ 848251881Spetertypedef svn_error_t *(*svn_client_blame_receiver_t)( 849251881Speter void *baton, 850251881Speter apr_int64_t line_no, 851251881Speter svn_revnum_t revision, 852251881Speter const char *author, 853251881Speter const char *date, 854251881Speter const char *line, 855251881Speter apr_pool_t *pool); 856251881Speter 857251881Speter 858251881Speter/** @} */ 859251881Speter 860251881Speter/** 861251881Speter * Client diff 862251881Speter * 863251881Speter * @defgroup clnt_diff Client diff functionality 864251881Speter * 865251881Speter * @{ 866251881Speter */ 867251881Speter/** The difference type in an svn_diff_summarize_t structure. 868251881Speter * 869251881Speter * @since New in 1.4. 870251881Speter */ 871251881Spetertypedef enum svn_client_diff_summarize_kind_t 872251881Speter{ 873251881Speter /** An item with no text modifications */ 874251881Speter svn_client_diff_summarize_kind_normal, 875251881Speter 876251881Speter /** An added item */ 877251881Speter svn_client_diff_summarize_kind_added, 878251881Speter 879251881Speter /** An item with text modifications */ 880251881Speter svn_client_diff_summarize_kind_modified, 881251881Speter 882251881Speter /** A deleted item */ 883251881Speter svn_client_diff_summarize_kind_deleted 884251881Speter} svn_client_diff_summarize_kind_t; 885251881Speter 886251881Speter 887251881Speter/** A struct that describes the diff of an item. Passed to 888251881Speter * #svn_client_diff_summarize_func_t. 889251881Speter * 890251881Speter * @note Fields may be added to the end of this structure in future 891251881Speter * versions. Therefore, users shouldn't allocate structures of this 892251881Speter * type, to preserve binary compatibility. 893251881Speter * 894251881Speter * @since New in 1.4. 895251881Speter */ 896251881Spetertypedef struct svn_client_diff_summarize_t 897251881Speter{ 898251881Speter /** Path relative to the target. If the target is a file, path is 899251881Speter * the empty string. */ 900251881Speter const char *path; 901251881Speter 902251881Speter /** Change kind */ 903251881Speter svn_client_diff_summarize_kind_t summarize_kind; 904251881Speter 905251881Speter /** Properties changed? For consistency with 'svn status' output, 906251881Speter * this should be false if summarize_kind is _added or _deleted. */ 907251881Speter svn_boolean_t prop_changed; 908251881Speter 909251881Speter /** File or dir */ 910251881Speter svn_node_kind_t node_kind; 911251881Speter} svn_client_diff_summarize_t; 912251881Speter 913251881Speter/** 914251881Speter * Return a duplicate of @a diff, allocated in @a pool. No part of the new 915251881Speter * structure will be shared with @a diff. 916251881Speter * 917251881Speter * @since New in 1.4. 918251881Speter */ 919251881Spetersvn_client_diff_summarize_t * 920251881Spetersvn_client_diff_summarize_dup(const svn_client_diff_summarize_t *diff, 921251881Speter apr_pool_t *pool); 922251881Speter 923251881Speter 924251881Speter/** A callback used in svn_client_diff_summarize2() and 925251881Speter * svn_client_diff_summarize_peg2() for reporting a @a diff summary. 926251881Speter * 927251881Speter * All allocations should be performed in @a pool. 928251881Speter * 929251881Speter * @a baton is a closure object; it should be provided by the implementation, 930251881Speter * and passed by the caller. 931251881Speter * 932251881Speter * @since New in 1.4. 933251881Speter */ 934251881Spetertypedef svn_error_t *(*svn_client_diff_summarize_func_t)( 935251881Speter const svn_client_diff_summarize_t *diff, 936251881Speter void *baton, 937251881Speter apr_pool_t *pool); 938251881Speter 939251881Speter 940251881Speter 941251881Speter/** @} */ 942251881Speter 943251881Speter 944251881Speter/** 945251881Speter * Client context 946251881Speter * 947251881Speter * @defgroup clnt_ctx Client context management 948251881Speter * 949251881Speter * @{ 950251881Speter */ 951251881Speter 952251881Speter/** A client context structure, which holds client specific callbacks, 953251881Speter * batons, serves as a cache for configuration options, and other various 954251881Speter * and sundry things. In order to avoid backwards compatibility problems 955251881Speter * clients should use svn_client_create_context() to allocate and 956251881Speter * initialize this structure instead of doing so themselves. 957251881Speter */ 958251881Spetertypedef struct svn_client_ctx_t 959251881Speter{ 960251881Speter /** main authentication baton. */ 961251881Speter svn_auth_baton_t *auth_baton; 962251881Speter 963251881Speter /** notification callback function. 964251881Speter * This will be called by notify_func2() by default. 965251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 966251881Speter * Use @c notify_func2 instead. */ 967251881Speter svn_wc_notify_func_t notify_func; 968251881Speter 969251881Speter /** notification callback baton for notify_func() 970251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 971251881Speter * Use @c notify_baton2 instead */ 972251881Speter void *notify_baton; 973251881Speter 974251881Speter /** Log message callback function. NULL means that Subversion 975251881Speter * should try not attempt to fetch a log message. 976251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 977251881Speter * Use @c log_msg_func2 instead. */ 978251881Speter svn_client_get_commit_log_t log_msg_func; 979251881Speter 980251881Speter /** log message callback baton 981251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 982251881Speter * Use @c log_msg_baton2 instead. */ 983251881Speter void *log_msg_baton; 984251881Speter 985251881Speter /** a hash mapping of <tt>const char *</tt> configuration file names to 986251881Speter * #svn_config_t *'s. For example, the '~/.subversion/config' file's 987251881Speter * contents should have the key "config". May be left unset (or set to 988251881Speter * NULL) to use the built-in default settings and not use any configuration. 989251881Speter */ 990251881Speter apr_hash_t *config; 991251881Speter 992251881Speter /** a callback to be used to see if the client wishes to cancel the running 993251881Speter * operation. */ 994251881Speter svn_cancel_func_t cancel_func; 995251881Speter 996251881Speter /** a baton to pass to the cancellation callback. */ 997251881Speter void *cancel_baton; 998251881Speter 999251881Speter /** notification function, defaulting to a function that forwards 1000251881Speter * to notify_func(). If @c NULL, it will not be invoked. 1001251881Speter * @since New in 1.2. */ 1002251881Speter svn_wc_notify_func2_t notify_func2; 1003251881Speter 1004251881Speter /** notification baton for notify_func2(). 1005251881Speter * @since New in 1.2. */ 1006251881Speter void *notify_baton2; 1007251881Speter 1008251881Speter /** Log message callback function. NULL means that Subversion 1009251881Speter * should try log_msg_func. 1010251881Speter * @since New in 1.3. */ 1011251881Speter svn_client_get_commit_log2_t log_msg_func2; 1012251881Speter 1013251881Speter /** callback baton for log_msg_func2 1014251881Speter * @since New in 1.3. */ 1015251881Speter void *log_msg_baton2; 1016251881Speter 1017251881Speter /** Notification callback for network progress information. 1018251881Speter * May be NULL if not used. 1019251881Speter * @since New in 1.3. */ 1020251881Speter svn_ra_progress_notify_func_t progress_func; 1021251881Speter 1022251881Speter /** Callback baton for progress_func. 1023251881Speter * @since New in 1.3. */ 1024251881Speter void *progress_baton; 1025251881Speter 1026251881Speter /** Log message callback function. NULL means that Subversion 1027251881Speter * should try @c log_msg_func2, then @c log_msg_func. 1028251881Speter * @since New in 1.5. */ 1029251881Speter svn_client_get_commit_log3_t log_msg_func3; 1030251881Speter 1031251881Speter /** The callback baton for @c log_msg_func3. 1032251881Speter * @since New in 1.5. */ 1033251881Speter void *log_msg_baton3; 1034251881Speter 1035251881Speter /** MIME types map. 1036251881Speter * @since New in 1.5. */ 1037251881Speter apr_hash_t *mimetypes_map; 1038251881Speter 1039251881Speter /** Conflict resolution callback and baton, if available. 1040251881Speter * @since New in 1.5. */ 1041251881Speter svn_wc_conflict_resolver_func_t conflict_func; 1042251881Speter void *conflict_baton; 1043251881Speter 1044251881Speter /** Custom client name string, or @c NULL. 1045251881Speter * @since New in 1.5. */ 1046251881Speter const char *client_name; 1047251881Speter 1048251881Speter /** Conflict resolution callback and baton, if available. NULL means that 1049251881Speter * subversion should try @c conflict_func. 1050251881Speter * @since New in 1.7. */ 1051251881Speter svn_wc_conflict_resolver_func2_t conflict_func2; 1052251881Speter void *conflict_baton2; 1053251881Speter 1054251881Speter /** A working copy context for the client operation to use. 1055251881Speter * This is initialized by svn_client_create_context() and should never 1056251881Speter * be @c NULL. 1057251881Speter * 1058251881Speter * @since New in 1.7. */ 1059251881Speter svn_wc_context_t *wc_ctx; 1060251881Speter 1061289180Speter /** Check-tunnel callback 1062289180Speter * 1063289180Speter * If not @c NULL, and open_tunnel_func is also not @c NULL, this 1064289180Speter * callback will be invoked to check if open_tunnel_func should be 1065289180Speter * used to create a specific tunnel, or if the default tunnel 1066289180Speter * implementation (either built-in or configured in the client 1067289180Speter * configuration file) should be used instead. 1068289180Speter * @since New in 1.9. 1069289180Speter */ 1070289180Speter svn_ra_check_tunnel_func_t check_tunnel_func; 1071289180Speter 1072289180Speter /** Open-tunnel callback 1073289180Speter * 1074289180Speter * If not @c NULL, this callback will be invoked to create a tunnel 1075289180Speter * for a ra_svn connection that needs one, overriding any tunnel 1076289180Speter * definitions in the client config file. This callback is used only 1077289180Speter * for ra_svn and ignored by the other RA modules. 1078289180Speter * @since New in 1.9. 1079289180Speter */ 1080289180Speter svn_ra_open_tunnel_func_t open_tunnel_func; 1081289180Speter 1082289180Speter /** The baton used with check_tunnel_func and open_tunnel_func. 1083289180Speter * @since New in 1.9. 1084289180Speter */ 1085289180Speter void *tunnel_baton; 1086251881Speter} svn_client_ctx_t; 1087251881Speter 1088251881Speter/** Initialize a client context. 1089251881Speter * Set @a *ctx to a client context object, allocated in @a pool, that 1090251881Speter * represents a particular instance of an svn client. @a cfg_hash is used 1091251881Speter * to initialise the config member of the returned context object and should 1092251881Speter * remain valid for the lifetime of the object. @a cfg_hash may be @c NULL, 1093251881Speter * in which case it is ignored. 1094251881Speter * 1095251881Speter * In order to avoid backwards compatibility problems, clients must 1096251881Speter * use this function to initialize and allocate the 1097251881Speter * #svn_client_ctx_t structure rather than doing so themselves, as 1098251881Speter * the size of this structure may change in the future. 1099251881Speter * 1100251881Speter * The current implementation never returns error, but callers should 1101251881Speter * still check for error, for compatibility with future versions. 1102251881Speter * 1103251881Speter * @since New in 1.8. 1104251881Speter */ 1105251881Spetersvn_error_t * 1106251881Spetersvn_client_create_context2(svn_client_ctx_t **ctx, 1107251881Speter apr_hash_t *cfg_hash, 1108251881Speter apr_pool_t *pool); 1109251881Speter 1110251881Speter 1111251881Speter/** Similar to svn_client_create_context2 but passes a NULL @a cfg_hash. 1112251881Speter * 1113251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 1114251881Speter */ 1115251881SpeterSVN_DEPRECATED 1116251881Spetersvn_error_t * 1117251881Spetersvn_client_create_context(svn_client_ctx_t **ctx, 1118251881Speter apr_pool_t *pool); 1119251881Speter 1120251881Speter/** @} end group: Client context management */ 1121251881Speter 1122251881Speter/** 1123289180Speter * @deprecated Provided for backward compatibility. This constant was never 1124289180Speter * used in released versions. 1125251881Speter */ 1126251881Speter#define SVN_CLIENT_AUTH_USERNAME "username" 1127289180Speter/** 1128289180Speter * @deprecated Provided for backward compatibility. This constant was never 1129289180Speter * used in released versions. 1130289180Speter */ 1131251881Speter#define SVN_CLIENT_AUTH_PASSWORD "password" 1132251881Speter 1133251881Speter/** Client argument processing 1134251881Speter * 1135251881Speter * @defgroup clnt_cmdline Client command-line processing 1136251881Speter * 1137251881Speter * @{ 1138251881Speter */ 1139251881Speter 1140251881Speter/** 1141251881Speter * Pull remaining target arguments from @a os into @a *targets_p, 1142251881Speter * converting them to UTF-8, followed by targets from @a known_targets 1143251881Speter * (which might come from, for example, the "--targets" command line option). 1144251881Speter * 1145251881Speter * Process each target in one of the following ways. For a repository- 1146251881Speter * relative URL: resolve to a full URL, contacting the repository if 1147251881Speter * necessary to do so, and then treat as a full URL. For a URL: do some 1148251881Speter * IRI-to-URI encoding and some auto-escaping, and canonicalize. For a 1149251881Speter * local path: canonicalize case and path separators. 1150251881Speter * 1151251881Speter * If @a keep_last_origpath_on_truepath_collision is TRUE, and there are 1152251881Speter * exactly two targets which both case-canonicalize to the same path, the last 1153251881Speter * target will be returned in the original non-case-canonicalized form. 1154251881Speter * 1155251881Speter * Allocate @a *targets_p and its elements in @a pool. 1156251881Speter * 1157251881Speter * @a ctx is required for possible repository authentication. 1158251881Speter * 1159251881Speter * If a path has the same name as a Subversion working copy 1160251881Speter * administrative directory, return #SVN_ERR_RESERVED_FILENAME_SPECIFIED; 1161251881Speter * if multiple reserved paths are encountered, return a chain of 1162251881Speter * errors, all of which are #SVN_ERR_RESERVED_FILENAME_SPECIFIED. Do 1163251881Speter * not return this type of error in a chain with any other type of 1164251881Speter * error, and if this is the only type of error encountered, complete 1165251881Speter * the operation before returning the error(s). 1166251881Speter * 1167289180Speter * Return an error if a target is just a peg specifier with no path, such as 1168289180Speter * "@abc". Before v1.6.5 (r878062) this form was interpreted as a literal path; 1169289180Speter * it is now ambiguous. The form "@abc@" should now be used to refer to the 1170289180Speter * literal path "@abc" with no peg revision, or the form ".@abc" to refer to 1171289180Speter * the empty path with peg revision "abc". 1172289180Speter * 1173251881Speter * @since New in 1.7 1174251881Speter */ 1175251881Spetersvn_error_t * 1176251881Spetersvn_client_args_to_target_array2(apr_array_header_t **targets_p, 1177251881Speter apr_getopt_t *os, 1178251881Speter const apr_array_header_t *known_targets, 1179251881Speter svn_client_ctx_t *ctx, 1180251881Speter svn_boolean_t keep_last_origpath_on_truepath_collision, 1181251881Speter apr_pool_t *pool); 1182251881Speter 1183251881Speter/** 1184251881Speter * Similar to svn_client_args_to_target_array2() but with 1185251881Speter * @a keep_last_origpath_on_truepath_collision always set to FALSE. 1186251881Speter * 1187289180Speter * @since Since 1.6.5, this returns an error if a path contains a peg 1188289180Speter * specifier with no path before it, such as "@abc". 1189289180Speter * 1190251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 1191251881Speter */ 1192251881SpeterSVN_DEPRECATED 1193251881Spetersvn_error_t * 1194251881Spetersvn_client_args_to_target_array(apr_array_header_t **targets_p, 1195251881Speter apr_getopt_t *os, 1196251881Speter const apr_array_header_t *known_targets, 1197251881Speter svn_client_ctx_t *ctx, 1198251881Speter apr_pool_t *pool); 1199251881Speter 1200251881Speter/** @} group end: Client command-line processing */ 1201251881Speter 1202251881Speter/** @} */ 1203251881Speter 1204251881Speter/** 1205251881Speter * Client working copy management functions 1206251881Speter * 1207251881Speter * @defgroup clnt_wc Client working copy management 1208251881Speter * 1209251881Speter * @{ 1210251881Speter */ 1211251881Speter 1212251881Speter/** 1213251881Speter * @defgroup clnt_wc_checkout Checkout 1214251881Speter * 1215251881Speter * @{ 1216251881Speter */ 1217251881Speter 1218251881Speter 1219251881Speter/** 1220251881Speter * Checkout a working copy from a repository. 1221251881Speter * 1222251881Speter * @param[out] result_rev If non-NULL, the value of the revision checked 1223251881Speter * out from the repository. 1224251881Speter * @param[in] URL The repository URL of the checkout source. 1225251881Speter * @param[in] path The root of the new working copy. 1226251881Speter * @param[in] peg_revision The peg revision. 1227251881Speter * @param[in] revision The operative revision. 1228251881Speter * @param[in] depth The depth of the operation. If #svn_depth_unknown, 1229251881Speter * then behave as if for #svn_depth_infinity, except in the case 1230251881Speter * of resuming a previous checkout of @a path (i.e., updating), 1231251881Speter * in which case use the depth of the existing working copy. 1232251881Speter * @param[in] ignore_externals If @c TRUE, don't process externals 1233251881Speter * definitions as part of this operation. 1234251881Speter * @param[in] allow_unver_obstructions If @c TRUE, then tolerate existing 1235251881Speter * unversioned items that obstruct incoming paths. Only 1236251881Speter * obstructions of the same type (file or dir) as the added 1237251881Speter * item are tolerated. The text of obstructing files is left 1238251881Speter * as-is, effectively treating it as a user modification after 1239251881Speter * the checkout. Working properties of obstructing items are 1240251881Speter * set equal to the base properties. <br> 1241251881Speter * If @c FALSE, then abort if there are any unversioned 1242251881Speter * obstructing items. 1243251881Speter * @param[in] ctx The standard client context, used for authentication and 1244251881Speter * notification. 1245251881Speter * @param[in] pool Used for any temporary allocation. 1246251881Speter * 1247251881Speter * @return A pointer to an #svn_error_t of the type (this list is not 1248251881Speter * exhaustive): <br> 1249251881Speter * #SVN_ERR_UNSUPPORTED_FEATURE if @a URL refers to a file rather 1250251881Speter * than a directory; <br> 1251251881Speter * #SVN_ERR_RA_ILLEGAL_URL if @a URL does not exist; <br> 1252251881Speter * #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of 1253251881Speter * #svn_opt_revision_number, #svn_opt_revision_head, or 1254251881Speter * #svn_opt_revision_date. <br> 1255251881Speter * If no error occurred, return #SVN_NO_ERROR. 1256251881Speter * 1257251881Speter * @since New in 1.5. 1258251881Speter * 1259251881Speter * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for 1260251881Speter * a discussion of operative and peg revisions. 1261251881Speter */ 1262251881Spetersvn_error_t * 1263251881Spetersvn_client_checkout3(svn_revnum_t *result_rev, 1264251881Speter const char *URL, 1265251881Speter const char *path, 1266251881Speter const svn_opt_revision_t *peg_revision, 1267251881Speter const svn_opt_revision_t *revision, 1268251881Speter svn_depth_t depth, 1269251881Speter svn_boolean_t ignore_externals, 1270251881Speter svn_boolean_t allow_unver_obstructions, 1271251881Speter svn_client_ctx_t *ctx, 1272251881Speter apr_pool_t *pool); 1273251881Speter 1274251881Speter 1275251881Speter/** 1276251881Speter * Similar to svn_client_checkout3() but with @a allow_unver_obstructions 1277251881Speter * always set to FALSE, and @a depth set according to @a recurse: if 1278251881Speter * @a recurse is TRUE, @a depth is #svn_depth_infinity, if @a recurse 1279251881Speter * is FALSE, @a depth is #svn_depth_files. 1280251881Speter * 1281251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1282251881Speter */ 1283251881SpeterSVN_DEPRECATED 1284251881Spetersvn_error_t * 1285251881Spetersvn_client_checkout2(svn_revnum_t *result_rev, 1286251881Speter const char *URL, 1287251881Speter const char *path, 1288251881Speter const svn_opt_revision_t *peg_revision, 1289251881Speter const svn_opt_revision_t *revision, 1290251881Speter svn_boolean_t recurse, 1291251881Speter svn_boolean_t ignore_externals, 1292251881Speter svn_client_ctx_t *ctx, 1293251881Speter apr_pool_t *pool); 1294251881Speter 1295251881Speter 1296251881Speter/** 1297251881Speter * Similar to svn_client_checkout2(), but with @a peg_revision 1298251881Speter * always set to #svn_opt_revision_unspecified and 1299251881Speter * @a ignore_externals always set to FALSE. 1300251881Speter * 1301251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 1302251881Speter */ 1303251881SpeterSVN_DEPRECATED 1304251881Spetersvn_error_t * 1305251881Spetersvn_client_checkout(svn_revnum_t *result_rev, 1306251881Speter const char *URL, 1307251881Speter const char *path, 1308251881Speter const svn_opt_revision_t *revision, 1309251881Speter svn_boolean_t recurse, 1310251881Speter svn_client_ctx_t *ctx, 1311251881Speter apr_pool_t *pool); 1312251881Speter/** @} */ 1313251881Speter 1314251881Speter/** 1315251881Speter * @defgroup Update Bring a working copy up-to-date with a repository 1316251881Speter * 1317251881Speter * @{ 1318251881Speter * 1319251881Speter */ 1320251881Speter 1321251881Speter/** 1322251881Speter * Update working trees @a paths to @a revision, authenticating with the 1323251881Speter * authentication baton cached in @a ctx. @a paths is an array of const 1324251881Speter * char * paths to be updated. Unversioned paths that are direct children 1325251881Speter * of a versioned path will cause an update that attempts to add that path; 1326251881Speter * other unversioned paths are skipped. If @a result_revs is not NULL, 1327251881Speter * @a *result_revs will be set to an array of svn_revnum_t with each 1328251881Speter * element set to the revision to which @a revision was resolved for the 1329251881Speter * corresponding element of @a paths. 1330251881Speter * 1331251881Speter * @a revision must be of kind #svn_opt_revision_number, 1332251881Speter * #svn_opt_revision_head, or #svn_opt_revision_date. If @a 1333251881Speter * revision does not meet these requirements, return the error 1334251881Speter * #SVN_ERR_CLIENT_BAD_REVISION. 1335251881Speter * 1336251881Speter * The paths in @a paths can be from multiple working copies from multiple 1337251881Speter * repositories, but even if they all come from the same repository there 1338251881Speter * is no guarantee that revision represented by #svn_opt_revision_head 1339251881Speter * will remain the same as each path is updated. 1340251881Speter * 1341251881Speter * If @a ignore_externals is set, don't process externals definitions 1342251881Speter * as part of this operation. 1343251881Speter * 1344251881Speter * If @a depth is #svn_depth_infinity, update fully recursively. 1345251881Speter * Else if it is #svn_depth_immediates or #svn_depth_files, update 1346251881Speter * each target and its file entries, but not its subdirectories. Else 1347251881Speter * if #svn_depth_empty, update exactly each target, nonrecursively 1348251881Speter * (essentially, update the target's properties). 1349251881Speter * 1350251881Speter * If @a depth is #svn_depth_unknown, take the working depth from 1351251881Speter * @a paths and then behave as described above. 1352251881Speter * 1353251881Speter * If @a depth_is_sticky is set and @a depth is not 1354251881Speter * #svn_depth_unknown, then in addition to updating PATHS, also set 1355251881Speter * their sticky ambient depth value to @a depth. 1356251881Speter * 1357251881Speter * If @a allow_unver_obstructions is TRUE then the update tolerates 1358251881Speter * existing unversioned items that obstruct added paths. Only 1359251881Speter * obstructions of the same type (file or dir) as the added item are 1360251881Speter * tolerated. The text of obstructing files is left as-is, effectively 1361251881Speter * treating it as a user modification after the update. Working 1362251881Speter * properties of obstructing items are set equal to the base properties. 1363251881Speter * If @a allow_unver_obstructions is FALSE then the update will abort 1364251881Speter * if there are any unversioned obstructing items. 1365251881Speter * 1366251881Speter * If @a adds_as_modification is TRUE, a local addition at the same path 1367251881Speter * as an incoming addition of the same node kind results in a normal node 1368251881Speter * with a possible local modification, instead of a tree conflict. 1369251881Speter * 1370251881Speter * If @a make_parents is TRUE, create any non-existent parent 1371251881Speter * directories also by checking them out at depth=empty. 1372251881Speter * 1373251881Speter * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with 1374251881Speter * @a ctx->notify_baton2 for each item handled by the update, and also for 1375251881Speter * files restored from text-base. If @a ctx->cancel_func is non-NULL, invoke 1376251881Speter * it passing @a ctx->cancel_baton at various places during the update. 1377251881Speter * 1378251881Speter * Use @a pool for any temporary allocation. 1379251881Speter * 1380251881Speter * @todo Multiple Targets 1381251881Speter * - Up for debate: an update on multiple targets is *not* atomic. 1382251881Speter * Right now, svn_client_update only takes one path. What's 1383251881Speter * debatable is whether this should ever change. On the one hand, 1384251881Speter * it's kind of losing to have the client application loop over 1385251881Speter * targets and call svn_client_update() on each one; each call to 1386251881Speter * update initializes a whole new repository session (network 1387251881Speter * overhead, etc.) On the other hand, it's a very simple 1388251881Speter * implementation, and allows for the possibility that different 1389251881Speter * targets may come from different repositories. 1390251881Speter * 1391251881Speter * @since New in 1.7. 1392251881Speter */ 1393251881Spetersvn_error_t * 1394251881Spetersvn_client_update4(apr_array_header_t **result_revs, 1395251881Speter const apr_array_header_t *paths, 1396251881Speter const svn_opt_revision_t *revision, 1397251881Speter svn_depth_t depth, 1398251881Speter svn_boolean_t depth_is_sticky, 1399251881Speter svn_boolean_t ignore_externals, 1400251881Speter svn_boolean_t allow_unver_obstructions, 1401251881Speter svn_boolean_t adds_as_modification, 1402251881Speter svn_boolean_t make_parents, 1403251881Speter svn_client_ctx_t *ctx, 1404251881Speter apr_pool_t *pool); 1405251881Speter 1406251881Speter/** 1407251881Speter * Similar to svn_client_update4() but with @a make_parents always set 1408251881Speter * to FALSE and @a adds_as_modification set to TRUE. 1409251881Speter * 1410251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 1411251881Speter * @since New in 1.5. 1412251881Speter */ 1413251881SpeterSVN_DEPRECATED 1414251881Spetersvn_error_t * 1415251881Spetersvn_client_update3(apr_array_header_t **result_revs, 1416251881Speter const apr_array_header_t *paths, 1417251881Speter const svn_opt_revision_t *revision, 1418251881Speter svn_depth_t depth, 1419251881Speter svn_boolean_t depth_is_sticky, 1420251881Speter svn_boolean_t ignore_externals, 1421251881Speter svn_boolean_t allow_unver_obstructions, 1422251881Speter svn_client_ctx_t *ctx, 1423251881Speter apr_pool_t *pool); 1424251881Speter 1425251881Speter/** 1426251881Speter * Similar to svn_client_update3() but with @a allow_unver_obstructions 1427251881Speter * always set to FALSE, @a depth_is_sticky to FALSE, and @a depth set 1428251881Speter * according to @a recurse: if @a recurse is TRUE, set @a depth to 1429251881Speter * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to 1430251881Speter * #svn_depth_files. 1431251881Speter * 1432251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1433251881Speter */ 1434251881SpeterSVN_DEPRECATED 1435251881Spetersvn_error_t * 1436251881Spetersvn_client_update2(apr_array_header_t **result_revs, 1437251881Speter const apr_array_header_t *paths, 1438251881Speter const svn_opt_revision_t *revision, 1439251881Speter svn_boolean_t recurse, 1440251881Speter svn_boolean_t ignore_externals, 1441251881Speter svn_client_ctx_t *ctx, 1442251881Speter apr_pool_t *pool); 1443251881Speter 1444251881Speter/** 1445251881Speter * Similar to svn_client_update2() except that it accepts only a single 1446251881Speter * target in @a path, returns a single revision if @a result_rev is 1447251881Speter * not NULL, and @a ignore_externals is always set to FALSE. 1448251881Speter * 1449251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 1450251881Speter */ 1451251881SpeterSVN_DEPRECATED 1452251881Spetersvn_error_t * 1453251881Spetersvn_client_update(svn_revnum_t *result_rev, 1454251881Speter const char *path, 1455251881Speter const svn_opt_revision_t *revision, 1456251881Speter svn_boolean_t recurse, 1457251881Speter svn_client_ctx_t *ctx, 1458251881Speter apr_pool_t *pool); 1459251881Speter/** @} */ 1460251881Speter 1461251881Speter/** 1462251881Speter * @defgroup Switch Switch a working copy to another location. 1463251881Speter * 1464251881Speter * @{ 1465251881Speter */ 1466251881Speter 1467251881Speter/** 1468251881Speter * Switch an existing working copy directory to a different repository 1469251881Speter * location. 1470251881Speter * 1471251881Speter * This is normally used to switch a working copy directory over to another 1472251881Speter * line of development, such as a branch or a tag. Switching an existing 1473251881Speter * working copy directory is more efficient than checking out @a url from 1474251881Speter * scratch. 1475251881Speter * 1476251881Speter * @param[out] result_rev If non-NULL, the value of the revision to which 1477251881Speter * the working copy was actually switched. 1478251881Speter * @param[in] path The directory to be switched. This need not be the 1479251881Speter * root of a working copy. 1480251881Speter * @param[in] url The repository URL to switch to. 1481251881Speter * @param[in] peg_revision The peg revision. 1482251881Speter * @param[in] revision The operative revision. 1483251881Speter * @param[in] depth The depth of the operation. If #svn_depth_infinity, 1484251881Speter * switch fully recursively. Else if #svn_depth_immediates, 1485251881Speter * switch @a path and its file children (if any), and 1486251881Speter * switch subdirectories but do not update them. Else if 1487251881Speter * #svn_depth_files, switch just file children, ignoring 1488251881Speter * subdirectories completely. Else if #svn_depth_empty, 1489251881Speter * switch just @a path and touch nothing underneath it. 1490251881Speter * @param[in] depth_is_sticky If @c TRUE, and @a depth is not 1491251881Speter * #svn_depth_unknown, then in addition to switching @a path, also 1492251881Speter * set its sticky ambient depth value to @a depth. 1493251881Speter * @param[in] ignore_externals If @c TRUE, don't process externals 1494251881Speter * definitions as part of this operation. 1495251881Speter * @param[in] allow_unver_obstructions If @c TRUE, then tolerate existing 1496251881Speter * unversioned items that obstruct incoming paths. Only 1497251881Speter * obstructions of the same type (file or dir) as the added 1498251881Speter * item are tolerated. The text of obstructing files is left 1499251881Speter * as-is, effectively treating it as a user modification after 1500251881Speter * the checkout. Working properties of obstructing items are 1501251881Speter * set equal to the base properties. <br> 1502251881Speter * If @c FALSE, then abort if there are any unversioned 1503251881Speter * obstructing items. 1504251881Speter * @param[in] ignore_ancestry If @c FALSE, then verify that the file 1505251881Speter * or directory at @a path shares some common version control 1506251881Speter * ancestry with the switch URL location (represented by the 1507251881Speter * combination of @a url, @a peg_revision, and @a revision), 1508251881Speter * and returning #SVN_ERR_CLIENT_UNRELATED_RESOURCES if they 1509251881Speter * do not. If @c TRUE, no such sanity checks are performed. 1510251881Speter * 1511251881Speter * @param[in] ctx The standard client context, used for authentication and 1512251881Speter * notification. The notifier is invoked for paths affected by 1513251881Speter * the switch, and also for files which may be restored from the 1514251881Speter * pristine store after being previously removed from the working 1515251881Speter * copy. 1516251881Speter * @param[in] pool Used for any temporary allocation. 1517251881Speter * 1518251881Speter * @return A pointer to an #svn_error_t of the type (this list is not 1519251881Speter * exhaustive): <br> 1520251881Speter * #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of 1521251881Speter * #svn_opt_revision_number, #svn_opt_revision_head, or 1522251881Speter * #svn_opt_revision_date. <br> 1523251881Speter * If no error occurred, return #SVN_NO_ERROR. 1524251881Speter * 1525251881Speter * @since New in 1.7. 1526251881Speter * 1527251881Speter * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for 1528251881Speter * a discussion of operative and peg revisions. 1529251881Speter */ 1530251881Spetersvn_error_t * 1531251881Spetersvn_client_switch3(svn_revnum_t *result_rev, 1532251881Speter const char *path, 1533251881Speter const char *url, 1534251881Speter const svn_opt_revision_t *peg_revision, 1535251881Speter const svn_opt_revision_t *revision, 1536251881Speter svn_depth_t depth, 1537251881Speter svn_boolean_t depth_is_sticky, 1538251881Speter svn_boolean_t ignore_externals, 1539251881Speter svn_boolean_t allow_unver_obstructions, 1540251881Speter svn_boolean_t ignore_ancestry, 1541251881Speter svn_client_ctx_t *ctx, 1542251881Speter apr_pool_t *pool); 1543251881Speter 1544251881Speter 1545251881Speter/** 1546251881Speter * Similar to svn_client_switch3() but with @a ignore_ancestry always 1547251881Speter * set to TRUE. 1548251881Speter * 1549251881Speter * @since New in 1.5. 1550251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1551251881Speter */ 1552251881SpeterSVN_DEPRECATED 1553251881Spetersvn_error_t * 1554251881Spetersvn_client_switch2(svn_revnum_t *result_rev, 1555251881Speter const char *path, 1556251881Speter const char *url, 1557251881Speter const svn_opt_revision_t *peg_revision, 1558251881Speter const svn_opt_revision_t *revision, 1559251881Speter svn_depth_t depth, 1560251881Speter svn_boolean_t depth_is_sticky, 1561251881Speter svn_boolean_t ignore_externals, 1562251881Speter svn_boolean_t allow_unver_obstructions, 1563251881Speter svn_client_ctx_t *ctx, 1564251881Speter apr_pool_t *pool); 1565251881Speter 1566251881Speter 1567251881Speter/** 1568251881Speter * Similar to svn_client_switch2() but with @a allow_unver_obstructions, 1569251881Speter * @a ignore_externals, and @a depth_is_sticky always set to FALSE, 1570251881Speter * and @a depth set according to @a recurse: if @a recurse is TRUE, 1571251881Speter * set @a depth to #svn_depth_infinity, if @a recurse is FALSE, set 1572251881Speter * @a depth to #svn_depth_files. 1573251881Speter * 1574251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1575251881Speter */ 1576251881SpeterSVN_DEPRECATED 1577251881Spetersvn_error_t * 1578251881Spetersvn_client_switch(svn_revnum_t *result_rev, 1579251881Speter const char *path, 1580251881Speter const char *url, 1581251881Speter const svn_opt_revision_t *revision, 1582251881Speter svn_boolean_t recurse, 1583251881Speter svn_client_ctx_t *ctx, 1584251881Speter apr_pool_t *pool); 1585251881Speter 1586251881Speter/** @} */ 1587251881Speter 1588362181Sdim/** Callback for svn_client__layout_list() 1589362181Sdim * 1590362181Sdim * @warning EXPERIMENTAL. 1591362181Sdim */ 1592362181Sdimtypedef svn_error_t * (*svn_client__layout_func_t)( 1593362181Sdim void *layout_baton, 1594362181Sdim const char *local_abspath, 1595362181Sdim const char *repos_root_url, 1596362181Sdim svn_boolean_t not_present, 1597362181Sdim svn_boolean_t url_changed, 1598362181Sdim const char *url, 1599362181Sdim svn_boolean_t revision_changed, 1600362181Sdim svn_revnum_t revision, 1601362181Sdim svn_boolean_t depth_changed, 1602362181Sdim svn_depth_t depth, 1603362181Sdim apr_pool_t *scratch_pool); 1604362181Sdim 1605251881Speter/** 1606362181Sdim * Describe the layout of the working copy below @a local_abspath to 1607362181Sdim * the callback @a layout. 1608362181Sdim * 1609362181Sdim * @warning EXPERIMENTAL. 1610362181Sdim */ 1611362181SdimSVN_EXPERIMENTAL 1612362181Sdimsvn_error_t * 1613362181Sdimsvn_client__layout_list(const char *local_abspath, 1614362181Sdim svn_client__layout_func_t layout, 1615362181Sdim void *layout_baton, 1616362181Sdim svn_client_ctx_t *ctx, 1617362181Sdim apr_pool_t *scratch_pool); 1618362181Sdim 1619362181Sdim 1620362181Sdim/** 1621251881Speter * @defgroup Add Begin versioning files/directories in a working copy. 1622251881Speter * 1623251881Speter * @{ 1624251881Speter */ 1625251881Speter 1626251881Speter/** 1627251881Speter * Schedule a working copy @a path for addition to the repository. 1628251881Speter * 1629251881Speter * If @a depth is #svn_depth_empty, add just @a path and nothing 1630251881Speter * below it. If #svn_depth_files, add @a path and any file 1631251881Speter * children of @a path. If #svn_depth_immediates, add @a path, any 1632251881Speter * file children, and any immediate subdirectories (but nothing 1633251881Speter * underneath those subdirectories). If #svn_depth_infinity, add 1634251881Speter * @a path and everything under it fully recursively. 1635251881Speter * 1636251881Speter * @a path's parent must be under revision control already (unless 1637251881Speter * @a add_parents is TRUE), but @a path is not. 1638251881Speter * 1639251881Speter * If @a force is not set and @a path is already under version 1640251881Speter * control, return the error #SVN_ERR_ENTRY_EXISTS. If @a force is 1641251881Speter * set, do not error on already-versioned items. When used on a 1642251881Speter * directory in conjunction with a @a depth value greater than 1643251881Speter * #svn_depth_empty, this has the effect of scheduling for addition 1644251881Speter * any unversioned files and directories scattered within even a 1645251881Speter * versioned tree (up to @a depth). 1646251881Speter * 1647251881Speter * If @a ctx->notify_func2 is non-NULL, then for each added item, call 1648251881Speter * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the 1649251881Speter * added item. 1650251881Speter * 1651251881Speter * If @a no_ignore is FALSE, don't add any file or directory (or recurse 1652251881Speter * into any directory) that is unversioned and found by recursion (as 1653251881Speter * opposed to being the explicit target @a path) and whose name matches the 1654251881Speter * svn:ignore property on its parent directory or the global-ignores list in 1655251881Speter * @a ctx->config. If @a no_ignore is TRUE, do include such files and 1656251881Speter * directories. (Note that an svn:ignore property can influence this 1657251881Speter * behaviour only when recursing into an already versioned directory with @a 1658251881Speter * force.) 1659251881Speter * 1660251881Speter * If @a no_autoprops is TRUE, don't set any autoprops on added files. If 1661251881Speter * @a no_autoprops is FALSE then all added files have autprops set as per 1662251881Speter * the auto-props list in @a ctx->config and the value of any 1663251881Speter * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by the nearest 1664251881Speter * parents of @a path which are already under version control. 1665251881Speter * 1666251881Speter * If @a add_parents is TRUE, recurse up @a path's directory and look for 1667251881Speter * a versioned directory. If found, add all intermediate paths between it 1668251881Speter * and @a path. If not found, return #SVN_ERR_CLIENT_NO_VERSIONED_PARENT. 1669251881Speter * 1670251881Speter * @a scratch_pool is used for temporary allocations only. 1671251881Speter * 1672251881Speter * @par Important: 1673251881Speter * This is a *scheduling* operation. No changes will 1674251881Speter * happen to the repository until a commit occurs. This scheduling 1675251881Speter * can be removed with svn_client_revert2(). 1676251881Speter * 1677251881Speter * @since New in 1.8. 1678251881Speter */ 1679251881Spetersvn_error_t * 1680251881Spetersvn_client_add5(const char *path, 1681251881Speter svn_depth_t depth, 1682251881Speter svn_boolean_t force, 1683251881Speter svn_boolean_t no_ignore, 1684251881Speter svn_boolean_t no_autoprops, 1685251881Speter svn_boolean_t add_parents, 1686251881Speter svn_client_ctx_t *ctx, 1687251881Speter apr_pool_t *scratch_pool); 1688251881Speter 1689251881Speter/** 1690251881Speter * Similar to svn_client_add5(), but with @a no_autoprops always set to 1691251881Speter * FALSE. 1692251881Speter * 1693251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 1694251881Speter */ 1695251881SpeterSVN_DEPRECATED 1696251881Spetersvn_error_t * 1697251881Spetersvn_client_add4(const char *path, 1698251881Speter svn_depth_t depth, 1699251881Speter svn_boolean_t force, 1700251881Speter svn_boolean_t no_ignore, 1701251881Speter svn_boolean_t add_parents, 1702251881Speter svn_client_ctx_t *ctx, 1703251881Speter apr_pool_t *pool); 1704251881Speter 1705251881Speter/** 1706251881Speter * Similar to svn_client_add4(), but with @a add_parents always set to 1707251881Speter * FALSE and @a depth set according to @a recursive: if TRUE, then 1708251881Speter * @a depth is #svn_depth_infinity, if FALSE, then #svn_depth_empty. 1709251881Speter * 1710251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1711251881Speter */ 1712251881SpeterSVN_DEPRECATED 1713251881Spetersvn_error_t * 1714251881Spetersvn_client_add3(const char *path, 1715251881Speter svn_boolean_t recursive, 1716251881Speter svn_boolean_t force, 1717251881Speter svn_boolean_t no_ignore, 1718251881Speter svn_client_ctx_t *ctx, 1719251881Speter apr_pool_t *pool); 1720251881Speter 1721251881Speter/** 1722251881Speter * Similar to svn_client_add3(), but with @a no_ignore always set to 1723251881Speter * FALSE. 1724251881Speter * 1725251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 1726251881Speter */ 1727251881SpeterSVN_DEPRECATED 1728251881Spetersvn_error_t * 1729251881Spetersvn_client_add2(const char *path, 1730251881Speter svn_boolean_t recursive, 1731251881Speter svn_boolean_t force, 1732251881Speter svn_client_ctx_t *ctx, 1733251881Speter apr_pool_t *pool); 1734251881Speter 1735251881Speter/** 1736251881Speter * Similar to svn_client_add2(), but with @a force always set to FALSE. 1737251881Speter * 1738251881Speter * @deprecated Provided for backward compatibility with the 1.0 API. 1739251881Speter */ 1740251881SpeterSVN_DEPRECATED 1741251881Spetersvn_error_t * 1742251881Spetersvn_client_add(const char *path, 1743251881Speter svn_boolean_t recursive, 1744251881Speter svn_client_ctx_t *ctx, 1745251881Speter apr_pool_t *pool); 1746251881Speter 1747251881Speter/** @} */ 1748251881Speter 1749251881Speter/** 1750251881Speter * @defgroup Mkdir Create directories in a working copy or repository. 1751251881Speter * 1752251881Speter * @{ 1753251881Speter */ 1754251881Speter 1755251881Speter/** Create a directory, either in a repository or a working copy. 1756251881Speter * 1757251881Speter * @a paths is an array of (const char *) paths, either all local WC paths 1758251881Speter * or all URLs. 1759251881Speter * 1760251881Speter * If @a paths contains URLs, use the authentication baton in @a ctx 1761251881Speter * and @a message to immediately attempt to commit the creation of the 1762251881Speter * directories in @a paths in the repository. 1763251881Speter * 1764251881Speter * Else, create the directories on disk, and attempt to schedule them 1765251881Speter * for addition (using svn_client_add(), whose docstring you should 1766251881Speter * read). 1767251881Speter * 1768251881Speter * If @a make_parents is TRUE, create any non-existent parent directories 1769251881Speter * also. 1770251881Speter * 1771251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 1772251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 1773251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision in 1774251881Speter * the event that this is a committing operation. This table cannot 1775251881Speter * contain any standard Subversion properties. 1776251881Speter * 1777251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 1778251881Speter * combo that this function can use to query for a commit log message 1779251881Speter * when one is needed. 1780251881Speter * 1781251881Speter * If @a ctx->notify_func2 is non-NULL, when the directory has been created 1782251881Speter * (successfully) in the working copy, call @a ctx->notify_func2 with 1783251881Speter * @a ctx->notify_baton2 and the path of the new directory. Note that this is 1784251881Speter * only called for items added to the working copy. 1785251881Speter * 1786251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 1787251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 1788251881Speter * the commit. 1789251881Speter * 1790251881Speter * @since New in 1.7. 1791251881Speter */ 1792251881Spetersvn_error_t * 1793251881Spetersvn_client_mkdir4(const apr_array_header_t *paths, 1794251881Speter svn_boolean_t make_parents, 1795251881Speter const apr_hash_t *revprop_table, 1796251881Speter svn_commit_callback2_t commit_callback, 1797251881Speter void *commit_baton, 1798251881Speter svn_client_ctx_t *ctx, 1799251881Speter apr_pool_t *pool); 1800251881Speter 1801251881Speter/** 1802251881Speter * Similar to svn_client_mkdir4(), but returns the commit info in 1803251881Speter * @a *commit_info_p rather than through a callback function. 1804251881Speter * 1805251881Speter * @since New in 1.5. 1806251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 1807251881Speter */ 1808251881SpeterSVN_DEPRECATED 1809251881Spetersvn_error_t * 1810251881Spetersvn_client_mkdir3(svn_commit_info_t **commit_info_p, 1811251881Speter const apr_array_header_t *paths, 1812251881Speter svn_boolean_t make_parents, 1813251881Speter const apr_hash_t *revprop_table, 1814251881Speter svn_client_ctx_t *ctx, 1815251881Speter apr_pool_t *pool); 1816251881Speter 1817251881Speter 1818251881Speter/** 1819251881Speter * Same as svn_client_mkdir3(), but with @a make_parents always FALSE, 1820251881Speter * and @a revprop_table always NULL. 1821251881Speter * 1822251881Speter * @since New in 1.3. 1823251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1824251881Speter */ 1825251881SpeterSVN_DEPRECATED 1826251881Spetersvn_error_t * 1827251881Spetersvn_client_mkdir2(svn_commit_info_t **commit_info_p, 1828251881Speter const apr_array_header_t *paths, 1829251881Speter svn_client_ctx_t *ctx, 1830251881Speter apr_pool_t *pool); 1831251881Speter 1832251881Speter/** 1833251881Speter * Same as svn_client_mkdir2(), but takes the #svn_client_commit_info_t 1834251881Speter * type for @a commit_info_p. 1835251881Speter * 1836251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 1837251881Speter */ 1838251881SpeterSVN_DEPRECATED 1839251881Spetersvn_error_t * 1840251881Spetersvn_client_mkdir(svn_client_commit_info_t **commit_info_p, 1841251881Speter const apr_array_header_t *paths, 1842251881Speter svn_client_ctx_t *ctx, 1843251881Speter apr_pool_t *pool); 1844251881Speter 1845251881Speter/** @} */ 1846251881Speter 1847251881Speter/** 1848251881Speter * @defgroup Delete Remove files/directories from a working copy or repository. 1849251881Speter * 1850251881Speter * @{ 1851251881Speter */ 1852251881Speter 1853251881Speter/** Delete items from a repository or working copy. 1854251881Speter * 1855251881Speter * @a paths is an array of (const char *) paths, either all local WC paths 1856251881Speter * or all URLs. 1857251881Speter * 1858251881Speter * If the paths in @a paths are URLs, use the authentication baton in 1859251881Speter * @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to 1860251881Speter * immediately attempt to commit a deletion of the URLs from the 1861251881Speter * repository. Every path must belong to the same repository. 1862251881Speter * 1863251881Speter * Else, schedule the working copy paths in @a paths for removal from 1864251881Speter * the repository. Each path's parent must be under revision control. 1865251881Speter * This is just a *scheduling* operation. No changes will happen to 1866251881Speter * the repository until a commit occurs. This scheduling can be 1867251881Speter * removed with svn_client_revert2(). If a path is a file it is 1868251881Speter * immediately removed from the working copy. If the path is a 1869251881Speter * directory it will remain in the working copy but all the files, and 1870251881Speter * all unversioned items, it contains will be removed. If @a force is 1871251881Speter * not set then this operation will fail if any path contains locally 1872251881Speter * modified and/or unversioned items. If @a force is set such items 1873251881Speter * will be deleted. 1874251881Speter * 1875251881Speter * If the paths are working copy paths and @a keep_local is TRUE then 1876251881Speter * the paths will not be removed from the working copy, only scheduled 1877251881Speter * for removal from the repository. Once the scheduled deletion is 1878251881Speter * committed, they will appear as unversioned paths in the working copy. 1879251881Speter * 1880251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 1881251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 1882251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision in 1883251881Speter * the event that this is a committing operation. This table cannot 1884251881Speter * contain any standard Subversion properties. 1885251881Speter * 1886251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 1887251881Speter * combo that this function can use to query for a commit log message 1888251881Speter * when one is needed. 1889251881Speter * 1890251881Speter * If @a ctx->notify_func2 is non-NULL, then for each item deleted, call 1891251881Speter * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted 1892251881Speter * item. 1893251881Speter * 1894251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 1895251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 1896251881Speter * the commit. 1897251881Speter * 1898251881Speter * @since New in 1.7. 1899251881Speter */ 1900251881Spetersvn_error_t * 1901251881Spetersvn_client_delete4(const apr_array_header_t *paths, 1902251881Speter svn_boolean_t force, 1903251881Speter svn_boolean_t keep_local, 1904251881Speter const apr_hash_t *revprop_table, 1905251881Speter svn_commit_callback2_t commit_callback, 1906251881Speter void *commit_baton, 1907251881Speter svn_client_ctx_t *ctx, 1908251881Speter apr_pool_t *pool); 1909251881Speter 1910251881Speter/** 1911251881Speter * Similar to svn_client_delete4(), but returns the commit info in 1912251881Speter * @a *commit_info_p rather than through a callback function. 1913251881Speter * 1914251881Speter * @since New in 1.5. 1915251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 1916251881Speter */ 1917251881SpeterSVN_DEPRECATED 1918251881Spetersvn_error_t * 1919251881Spetersvn_client_delete3(svn_commit_info_t **commit_info_p, 1920251881Speter const apr_array_header_t *paths, 1921251881Speter svn_boolean_t force, 1922251881Speter svn_boolean_t keep_local, 1923251881Speter const apr_hash_t *revprop_table, 1924251881Speter svn_client_ctx_t *ctx, 1925251881Speter apr_pool_t *pool); 1926251881Speter 1927251881Speter/** 1928251881Speter * Similar to svn_client_delete3(), but with @a keep_local always set 1929251881Speter * to FALSE, and @a revprop_table passed as NULL. 1930251881Speter * 1931251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1932251881Speter */ 1933251881SpeterSVN_DEPRECATED 1934251881Spetersvn_error_t * 1935251881Spetersvn_client_delete2(svn_commit_info_t **commit_info_p, 1936251881Speter const apr_array_header_t *paths, 1937251881Speter svn_boolean_t force, 1938251881Speter svn_client_ctx_t *ctx, 1939251881Speter apr_pool_t *pool); 1940251881Speter 1941251881Speter/** 1942251881Speter * Similar to svn_client_delete2(), but takes the #svn_client_commit_info_t 1943251881Speter * type for @a commit_info_p. 1944251881Speter * 1945251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 1946251881Speter */ 1947251881SpeterSVN_DEPRECATED 1948251881Spetersvn_error_t * 1949251881Spetersvn_client_delete(svn_client_commit_info_t **commit_info_p, 1950251881Speter const apr_array_header_t *paths, 1951251881Speter svn_boolean_t force, 1952251881Speter svn_client_ctx_t *ctx, 1953251881Speter apr_pool_t *pool); 1954251881Speter 1955251881Speter 1956251881Speter/** @} */ 1957251881Speter 1958251881Speter/** 1959251881Speter * @defgroup Import Import files into the repository. 1960251881Speter * 1961251881Speter * @{ 1962251881Speter */ 1963251881Speter 1964251881Speter/** 1965251881Speter * The callback invoked by svn_client_import5() before adding a node to the 1966251881Speter * list of nodes to be imported. 1967251881Speter * 1968251881Speter * @a baton is the value passed to @a svn_client_import5 as filter_baton. 1969251881Speter * 1970251881Speter * The callback receives the @a local_abspath for each node and the @a dirent 1971251881Speter * for it when walking the directory tree. Only the kind of node, including 1972251881Speter * special status is available in @a dirent. 1973251881Speter * 1974251881Speter * Implementations can set @a *filtered to TRUE, to make the import 1975251881Speter * process omit the node and (if the node is a directory) all its 1976251881Speter * descendants. 1977251881Speter * 1978251881Speter * @a scratch_pool can be used for temporary allocations. 1979251881Speter * 1980251881Speter * @since New in 1.8. 1981251881Speter */ 1982251881Spetertypedef svn_error_t *(*svn_client_import_filter_func_t)( 1983251881Speter void *baton, 1984251881Speter svn_boolean_t *filtered, 1985251881Speter const char *local_abspath, 1986251881Speter const svn_io_dirent2_t *dirent, 1987251881Speter apr_pool_t *scratch_pool); 1988251881Speter 1989251881Speter/** Import file or directory @a path into repository directory @a url at 1990251881Speter * head, authenticating with the authentication baton cached in @a ctx, 1991251881Speter * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message 1992251881Speter * for the (implied) commit. If some components of @a url do not exist 1993251881Speter * then create parent directories as necessary. 1994251881Speter * 1995251881Speter * This function reads an unversioned tree from disk and skips any ".svn" 1996251881Speter * directories. Even if a file or directory being imported is part of an 1997251881Speter * existing WC, this function sees it as unversioned and does not notice any 1998251881Speter * existing Subversion properties in it. 1999251881Speter * 2000251881Speter * If @a path is a directory, the contents of that directory are 2001251881Speter * imported directly into the directory identified by @a url. Note that the 2002251881Speter * directory @a path itself is not imported -- that is, the basename of 2003251881Speter * @a path is not part of the import. 2004251881Speter * 2005251881Speter * If @a path is a file, then the dirname of @a url is the directory 2006251881Speter * receiving the import. The basename of @a url is the filename in the 2007251881Speter * repository. In this case if @a url already exists, return error. 2008251881Speter * 2009251881Speter * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with 2010251881Speter * @a ctx->notify_baton2 as the import progresses, with any of the following 2011251881Speter * actions: #svn_wc_notify_commit_added, 2012251881Speter * #svn_wc_notify_commit_postfix_txdelta. 2013251881Speter * 2014251881Speter * Use @a scratch_pool for any temporary allocation. 2015251881Speter * 2016251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 2017251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 2018251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision. 2019251881Speter * This table cannot contain any standard Subversion properties. 2020251881Speter * 2021251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 2022251881Speter * combo that this function can use to query for a commit log message 2023251881Speter * when one is needed. 2024251881Speter * 2025251881Speter * If @a depth is #svn_depth_empty, import just @a path and nothing 2026251881Speter * below it. If #svn_depth_files, import @a path and any file 2027251881Speter * children of @a path. If #svn_depth_immediates, import @a path, any 2028251881Speter * file children, and any immediate subdirectories (but nothing 2029251881Speter * underneath those subdirectories). If #svn_depth_infinity, import 2030251881Speter * @a path and everything under it fully recursively. 2031251881Speter * 2032251881Speter * If @a no_ignore is @c FALSE, don't import any file or directory (or 2033251881Speter * recurse into any directory) that is found by recursion (as opposed to 2034251881Speter * being the explicit target @a path) and whose name matches the 2035251881Speter * global-ignores list in @a ctx->config. If @a no_ignore is @c TRUE, do 2036251881Speter * include such files and directories. (Note that svn:ignore properties are 2037251881Speter * not involved, as auto-props cannot set properties on directories and even 2038251881Speter * if the target is part of a WC the import ignores any existing 2039251881Speter * properties.) 2040251881Speter * 2041251881Speter * If @a no_autoprops is TRUE, don't set any autoprops on imported files. If 2042251881Speter * @a no_autoprops is FALSE then all imported files have autprops set as per 2043251881Speter * the auto-props list in @a ctx->config and the value of any 2044251881Speter * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by and explicitly set 2045251881Speter * on @a url if @a url is already under versioned control, or the nearest parents 2046251881Speter * of @a path which are already under version control if not. 2047251881Speter * 2048362181Sdim * If @a ignore_unknown_node_types is @c TRUE, ignore files of which the 2049251881Speter * node type is unknown, such as device files and pipes. 2050251881Speter * 2051251881Speter * If @a filter_callback is non-NULL, call it for each node that isn't ignored 2052251881Speter * for other reasons with @a filter_baton, to allow third party to ignore 2053251881Speter * specific nodes during importing. 2054251881Speter * 2055251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 2056251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 2057251881Speter * the commit. 2058251881Speter * 2059251881Speter * @since New in 1.8. 2060251881Speter */ 2061251881Spetersvn_error_t * 2062251881Spetersvn_client_import5(const char *path, 2063251881Speter const char *url, 2064251881Speter svn_depth_t depth, 2065251881Speter svn_boolean_t no_ignore, 2066251881Speter svn_boolean_t no_autoprops, 2067251881Speter svn_boolean_t ignore_unknown_node_types, 2068251881Speter const apr_hash_t *revprop_table, 2069251881Speter svn_client_import_filter_func_t filter_callback, 2070251881Speter void *filter_baton, 2071251881Speter svn_commit_callback2_t commit_callback, 2072251881Speter void *commit_baton, 2073251881Speter svn_client_ctx_t *ctx, 2074251881Speter apr_pool_t *scratch_pool); 2075251881Speter 2076251881Speter/** 2077251881Speter * Similar to svn_client_import5(), but without support for an optional 2078251881Speter * @a filter_callback and @a no_autoprops always set to FALSE. 2079251881Speter * 2080251881Speter * @since New in 1.7. 2081251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 2082251881Speter */ 2083251881SpeterSVN_DEPRECATED 2084251881Spetersvn_error_t * 2085251881Spetersvn_client_import4(const char *path, 2086251881Speter const char *url, 2087251881Speter svn_depth_t depth, 2088251881Speter svn_boolean_t no_ignore, 2089251881Speter svn_boolean_t ignore_unknown_node_types, 2090251881Speter const apr_hash_t *revprop_table, 2091251881Speter svn_commit_callback2_t commit_callback, 2092251881Speter void *commit_baton, 2093251881Speter svn_client_ctx_t *ctx, 2094251881Speter apr_pool_t *pool); 2095251881Speter 2096251881Speter/** 2097251881Speter * Similar to svn_client_import4(), but returns the commit info in 2098251881Speter * @a *commit_info_p rather than through a callback function. 2099251881Speter * 2100251881Speter * @since New in 1.5. 2101251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 2102251881Speter */ 2103251881SpeterSVN_DEPRECATED 2104251881Spetersvn_error_t * 2105251881Spetersvn_client_import3(svn_commit_info_t **commit_info_p, 2106251881Speter const char *path, 2107251881Speter const char *url, 2108251881Speter svn_depth_t depth, 2109251881Speter svn_boolean_t no_ignore, 2110251881Speter svn_boolean_t ignore_unknown_node_types, 2111251881Speter const apr_hash_t *revprop_table, 2112251881Speter svn_client_ctx_t *ctx, 2113251881Speter apr_pool_t *pool); 2114251881Speter 2115251881Speter/** 2116251881Speter * Similar to svn_client_import3(), but with @a ignore_unknown_node_types 2117251881Speter * always set to @c FALSE, @a revprop_table passed as NULL, and @a 2118251881Speter * depth set according to @a nonrecursive: if TRUE, then @a depth is 2119251881Speter * #svn_depth_files, else #svn_depth_infinity. 2120251881Speter * 2121251881Speter * @since New in 1.3. 2122251881Speter * 2123251881Speter * @deprecated Provided for backward compatibility with the 1.4 API 2124251881Speter */ 2125251881SpeterSVN_DEPRECATED 2126251881Spetersvn_error_t * 2127251881Spetersvn_client_import2(svn_commit_info_t **commit_info_p, 2128251881Speter const char *path, 2129251881Speter const char *url, 2130251881Speter svn_boolean_t nonrecursive, 2131251881Speter svn_boolean_t no_ignore, 2132251881Speter svn_client_ctx_t *ctx, 2133251881Speter apr_pool_t *pool); 2134251881Speter 2135251881Speter/** 2136251881Speter * Similar to svn_client_import2(), but with @a no_ignore always set 2137251881Speter * to FALSE and using the #svn_client_commit_info_t type for 2138251881Speter * @a commit_info_p. 2139251881Speter * 2140251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 2141251881Speter */ 2142251881SpeterSVN_DEPRECATED 2143251881Spetersvn_error_t * 2144251881Spetersvn_client_import(svn_client_commit_info_t **commit_info_p, 2145251881Speter const char *path, 2146251881Speter const char *url, 2147251881Speter svn_boolean_t nonrecursive, 2148251881Speter svn_client_ctx_t *ctx, 2149251881Speter apr_pool_t *pool); 2150251881Speter 2151251881Speter/** @} */ 2152251881Speter 2153251881Speter/** 2154251881Speter * @defgroup Commit Commit local modifications to the repository. 2155251881Speter * 2156251881Speter * @{ 2157251881Speter */ 2158251881Speter 2159251881Speter/** 2160251881Speter * Commit files or directories into repository, authenticating with 2161251881Speter * the authentication baton cached in @a ctx, and using 2162251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message. 2163251881Speter * Set @a *commit_info_p to the results of the commit, allocated in @a pool. 2164251881Speter * 2165251881Speter * @a targets is an array of <tt>const char *</tt> paths to commit. They 2166251881Speter * need not be canonicalized nor condensed; this function will take care of 2167251881Speter * that. If @a targets has zero elements, then do nothing and return 2168251881Speter * immediately without error. 2169251881Speter * 2170251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 2171251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 2172251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision. 2173251881Speter * This table cannot contain any standard Subversion properties. 2174251881Speter * 2175251881Speter * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with 2176251881Speter * @a ctx->notify_baton2 as the commit progresses, with any of the following 2177251881Speter * actions: #svn_wc_notify_commit_modified, #svn_wc_notify_commit_added, 2178251881Speter * #svn_wc_notify_commit_deleted, #svn_wc_notify_commit_replaced, 2179251881Speter * #svn_wc_notify_commit_copied, #svn_wc_notify_commit_copied_replaced, 2180251881Speter * #svn_wc_notify_commit_postfix_txdelta. 2181251881Speter * 2182251881Speter * If @a depth is #svn_depth_infinity, commit all changes to and 2183251881Speter * below named targets. If @a depth is #svn_depth_empty, commit 2184251881Speter * only named targets (that is, only property changes on named 2185251881Speter * directory targets, and property and content changes for named file 2186251881Speter * targets). If @a depth is #svn_depth_files, behave as above for 2187251881Speter * named file targets, and for named directory targets, commit 2188251881Speter * property changes on a named directory and all changes to files 2189251881Speter * directly inside that directory. If #svn_depth_immediates, behave 2190251881Speter * as for #svn_depth_files, and for subdirectories of any named 2191251881Speter * directory target commit as though for #svn_depth_empty. 2192251881Speter * 2193251881Speter * Unlock paths in the repository, unless @a keep_locks is TRUE. 2194251881Speter * 2195251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 2196251881Speter * names, used as a restrictive filter on items that are committed; 2197251881Speter * that is, don't commit anything unless it's a member of one of those 2198251881Speter * changelists. After the commit completes successfully, remove 2199251881Speter * changelist associations from the targets, unless @a 2200251881Speter * keep_changelists is set. If @a changelists is 2201251881Speter * empty (or altogether @c NULL), no changelist filtering occurs. 2202251881Speter * 2203251881Speter * If @a commit_as_operations is set to FALSE, when a copy is committed 2204251881Speter * all changes below the copy are always committed at the same time 2205251881Speter * (independent of the value of @a depth). If @a commit_as_operations is 2206251881Speter * #TRUE, changes to descendants are only committed if they are itself 2207251881Speter * included via @a depth and targets. 2208251881Speter * 2209251881Speter * If @a include_file_externals and/or @a include_dir_externals are #TRUE, 2210251881Speter * also commit all file and/or dir externals (respectively) that are reached 2211251881Speter * by recursion, except for those externals which: 2212251881Speter * - have a fixed revision, or 2213251881Speter * - come from a different repository root URL (dir externals). 2214251881Speter * These flags affect only recursion; externals that directly appear in @a 2215251881Speter * targets are always included in the commit. 2216251881Speter * 2217251881Speter * ### TODO: currently, file externals hidden inside an unversioned dir are 2218251881Speter * skipped deliberately, because we can't commit those yet. 2219251881Speter * See STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW. 2220251881Speter * 2221251881Speter * ### TODO: With @c depth_immediates, this function acts as if 2222251881Speter * @a include_dir_externals was passed #FALSE, but caller expects 2223251881Speter * immediate child dir externals to be included @c depth_empty. 2224251881Speter * 2225251881Speter * When @a commit_as_operations is #TRUE it is possible to delete a node and 2226251881Speter * all its descendants by selecting just the root of the deletion. If it is 2227251881Speter * set to #FALSE this will raise an error. 2228251881Speter * 2229251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 2230251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 2231251881Speter * the commit. 2232251881Speter * 2233251881Speter * @note #svn_depth_unknown and #svn_depth_exclude must not be passed 2234251881Speter * for @a depth. 2235251881Speter * 2236251881Speter * Use @a pool for any temporary allocations. 2237251881Speter * 2238251881Speter * @since New in 1.8. 2239251881Speter */ 2240251881Spetersvn_error_t * 2241251881Spetersvn_client_commit6(const apr_array_header_t *targets, 2242251881Speter svn_depth_t depth, 2243251881Speter svn_boolean_t keep_locks, 2244251881Speter svn_boolean_t keep_changelists, 2245251881Speter svn_boolean_t commit_as_operations, 2246251881Speter svn_boolean_t include_file_externals, 2247251881Speter svn_boolean_t include_dir_externals, 2248251881Speter const apr_array_header_t *changelists, 2249251881Speter const apr_hash_t *revprop_table, 2250251881Speter svn_commit_callback2_t commit_callback, 2251251881Speter void *commit_baton, 2252251881Speter svn_client_ctx_t *ctx, 2253251881Speter apr_pool_t *pool); 2254251881Speter 2255251881Speter/** 2256251881Speter * Similar to svn_client_commit6(), but passes @a include_file_externals as 2257251881Speter * FALSE and @a include_dir_externals as FALSE. 2258251881Speter * 2259251881Speter * @since New in 1.7. 2260251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 2261251881Speter */ 2262251881SpeterSVN_DEPRECATED 2263251881Spetersvn_error_t * 2264251881Spetersvn_client_commit5(const apr_array_header_t *targets, 2265251881Speter svn_depth_t depth, 2266251881Speter svn_boolean_t keep_locks, 2267251881Speter svn_boolean_t keep_changelists, 2268251881Speter svn_boolean_t commit_as_operations, 2269251881Speter const apr_array_header_t *changelists, 2270251881Speter const apr_hash_t *revprop_table, 2271251881Speter svn_commit_callback2_t commit_callback, 2272251881Speter void *commit_baton, 2273251881Speter svn_client_ctx_t *ctx, 2274251881Speter apr_pool_t *pool); 2275251881Speter 2276251881Speter/** 2277251881Speter * Similar to svn_client_commit5(), but returns the commit info in 2278251881Speter * @a *commit_info_p rather than through a callback function. Does not use 2279251881Speter * #svn_wc_notify_commit_copied or #svn_wc_notify_commit_copied_replaced 2280251881Speter * (preferring #svn_wc_notify_commit_added and 2281251881Speter * #svn_wc_notify_commit_replaced, respectively, instead). 2282251881Speter * 2283251881Speter * Also, if no error is returned and @a (*commit_info_p)->revision is set to 2284251881Speter * #SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to 2285251881Speter * be committed. 2286251881Speter * 2287251881Speter * Sets @a commit_as_operations to FALSE to match Subversion 1.6's behavior. 2288251881Speter * 2289251881Speter * @since New in 1.5. 2290251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 2291251881Speter */ 2292251881SpeterSVN_DEPRECATED 2293251881Spetersvn_error_t * 2294251881Spetersvn_client_commit4(svn_commit_info_t **commit_info_p, 2295251881Speter const apr_array_header_t *targets, 2296251881Speter svn_depth_t depth, 2297251881Speter svn_boolean_t keep_locks, 2298251881Speter svn_boolean_t keep_changelists, 2299251881Speter const apr_array_header_t *changelists, 2300251881Speter const apr_hash_t *revprop_table, 2301251881Speter svn_client_ctx_t *ctx, 2302251881Speter apr_pool_t *pool); 2303251881Speter 2304251881Speter/** 2305251881Speter * Similar to svn_client_commit4(), but always with NULL for 2306251881Speter * @a changelist_name, FALSE for @a keep_changelist, NULL for @a 2307251881Speter * revprop_table, and @a depth set according to @a recurse: if @a 2308251881Speter * recurse is TRUE, use #svn_depth_infinity, else #svn_depth_empty. 2309251881Speter * 2310251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 2311251881Speter * 2312251881Speter * @since New in 1.3. 2313251881Speter */ 2314251881SpeterSVN_DEPRECATED 2315251881Spetersvn_error_t * 2316251881Spetersvn_client_commit3(svn_commit_info_t **commit_info_p, 2317251881Speter const apr_array_header_t *targets, 2318251881Speter svn_boolean_t recurse, 2319251881Speter svn_boolean_t keep_locks, 2320251881Speter svn_client_ctx_t *ctx, 2321251881Speter apr_pool_t *pool); 2322251881Speter 2323251881Speter/** 2324251881Speter * Similar to svn_client_commit3(), but uses #svn_client_commit_info_t 2325251881Speter * for @a commit_info_p. 2326251881Speter * 2327251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 2328251881Speter * 2329251881Speter * @since New in 1.2. 2330251881Speter */ 2331251881SpeterSVN_DEPRECATED 2332251881Spetersvn_error_t * 2333251881Spetersvn_client_commit2(svn_client_commit_info_t **commit_info_p, 2334251881Speter const apr_array_header_t *targets, 2335251881Speter svn_boolean_t recurse, 2336251881Speter svn_boolean_t keep_locks, 2337251881Speter svn_client_ctx_t *ctx, 2338251881Speter apr_pool_t *pool); 2339251881Speter 2340251881Speter/** 2341251881Speter * Similar to svn_client_commit2(), but with @a keep_locks set to 2342251881Speter * TRUE and @a nonrecursive instead of @a recurse. 2343251881Speter * 2344251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 2345251881Speter */ 2346251881SpeterSVN_DEPRECATED 2347251881Spetersvn_error_t * 2348251881Spetersvn_client_commit(svn_client_commit_info_t **commit_info_p, 2349251881Speter const apr_array_header_t *targets, 2350251881Speter svn_boolean_t nonrecursive, 2351251881Speter svn_client_ctx_t *ctx, 2352251881Speter apr_pool_t *pool); 2353251881Speter 2354251881Speter/** @} */ 2355251881Speter 2356251881Speter/** 2357251881Speter * @defgroup Status Report interesting information about paths in the \ 2358251881Speter * working copy. 2359251881Speter * 2360251881Speter * @{ 2361251881Speter */ 2362251881Speter 2363251881Speter/** 2364251881Speter * Structure for holding the "status" of a working copy item. 2365251881Speter * 2366251881Speter * @note Fields may be added to the end of this structure in future 2367251881Speter * versions. Therefore, to preserve binary compatibility, users 2368251881Speter * should not directly allocate structures of this type. 2369251881Speter * 2370251881Speter * @since New in 1.7. 2371251881Speter */ 2372251881Spetertypedef struct svn_client_status_t 2373251881Speter{ 2374251881Speter /** The kind of node as recorded in the working copy */ 2375251881Speter svn_node_kind_t kind; 2376251881Speter 2377251881Speter /** The absolute path to the node */ 2378251881Speter const char *local_abspath; 2379251881Speter 2380251881Speter /** The actual size of the working file on disk, or SVN_INVALID_FILESIZE 2381251881Speter * if unknown (or if the item isn't a file at all). */ 2382251881Speter svn_filesize_t filesize; 2383251881Speter 2384251881Speter /** If the path is under version control, versioned is TRUE, otherwise 2385251881Speter * FALSE. */ 2386251881Speter svn_boolean_t versioned; 2387251881Speter 2388251881Speter /** Set to TRUE if the node is the victim of some kind of conflict. */ 2389251881Speter svn_boolean_t conflicted; 2390251881Speter 2391251881Speter /** The status of the node, based on the restructuring changes and if the 2392251881Speter * node has no restructuring changes the text and prop status. */ 2393251881Speter enum svn_wc_status_kind node_status; 2394251881Speter 2395251881Speter /** The status of the text of the node, not including restructuring changes. 2396251881Speter * Valid values are: svn_wc_status_none, svn_wc_status_normal, 2397251881Speter * svn_wc_status_modified and svn_wc_status_conflicted. */ 2398251881Speter enum svn_wc_status_kind text_status; 2399251881Speter 2400251881Speter /** The status of the node's properties. 2401251881Speter * Valid values are: svn_wc_status_none, svn_wc_status_normal, 2402251881Speter * svn_wc_status_modified and svn_wc_status_conflicted. */ 2403251881Speter enum svn_wc_status_kind prop_status; 2404251881Speter 2405251881Speter /** A node can be 'locked' if a working copy update is in progress or 2406251881Speter * was interrupted. */ 2407251881Speter svn_boolean_t wc_is_locked; 2408251881Speter 2409251881Speter /** A file or directory can be 'copied' if it's scheduled for 2410251881Speter * addition-with-history (or part of a subtree that is scheduled as such.). 2411251881Speter */ 2412251881Speter svn_boolean_t copied; 2413251881Speter 2414251881Speter /** The URL of the repository root. */ 2415251881Speter const char *repos_root_url; 2416251881Speter 2417251881Speter /** The UUID of the repository */ 2418251881Speter const char *repos_uuid; 2419251881Speter 2420251881Speter /** The in-repository path relative to the repository root. */ 2421251881Speter const char *repos_relpath; 2422251881Speter 2423251881Speter /** Base revision. */ 2424251881Speter svn_revnum_t revision; 2425251881Speter 2426251881Speter /** Last revision this was changed */ 2427251881Speter svn_revnum_t changed_rev; 2428251881Speter 2429251881Speter /** Date of last commit. */ 2430251881Speter apr_time_t changed_date; 2431251881Speter 2432251881Speter /** Last commit author of this item */ 2433251881Speter const char *changed_author; 2434251881Speter 2435251881Speter /** A file or directory can be 'switched' if the switch command has been 2436251881Speter * used. If this is TRUE, then file_external will be FALSE. 2437251881Speter */ 2438251881Speter svn_boolean_t switched; 2439251881Speter 2440251881Speter /** If the item is a file that was added to the working copy with an 2441251881Speter * svn:externals; if file_external is TRUE, then switched is always 2442251881Speter * FALSE. 2443251881Speter */ 2444251881Speter svn_boolean_t file_external; 2445251881Speter 2446251881Speter /** The locally present lock. (Values of path, token, owner, comment and 2447251881Speter * are available if a lock is present) */ 2448251881Speter const svn_lock_t *lock; 2449251881Speter 2450251881Speter /** Which changelist this item is part of, or NULL if not part of any. */ 2451251881Speter const char *changelist; 2452251881Speter 2453251881Speter /** The depth of the node as recorded in the working copy 2454251881Speter * (#svn_depth_unknown for files or when no depth is recorded) */ 2455251881Speter svn_depth_t depth; 2456251881Speter 2457251881Speter /** 2458251881Speter * @defgroup svn_wc_status_ood WC out-of-date info from the repository 2459251881Speter * @{ 2460251881Speter * 2461251881Speter * When the working copy item is out-of-date compared to the 2462251881Speter * repository, the following fields represent the state of the 2463251881Speter * youngest revision of the item in the repository. If the working 2464251881Speter * copy is not out of date, the fields are initialized as described 2465251881Speter * below. 2466251881Speter */ 2467251881Speter 2468251881Speter /** Set to the node kind of the youngest commit, or #svn_node_none 2469251881Speter * if not out of date. */ 2470251881Speter svn_node_kind_t ood_kind; 2471251881Speter 2472251881Speter /** The status of the node, based on the text status if the node has no 2473251881Speter * restructuring changes */ 2474251881Speter enum svn_wc_status_kind repos_node_status; 2475251881Speter 2476251881Speter /** The node's text status in the repository. */ 2477251881Speter enum svn_wc_status_kind repos_text_status; 2478251881Speter 2479251881Speter /** The node's property status in the repository. */ 2480251881Speter enum svn_wc_status_kind repos_prop_status; 2481251881Speter 2482251881Speter /** The node's lock in the repository, if any. */ 2483251881Speter const svn_lock_t *repos_lock; 2484251881Speter 2485251881Speter /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM 2486251881Speter * if not out of date. */ 2487251881Speter svn_revnum_t ood_changed_rev; 2488251881Speter 2489251881Speter /** Set to the most recent commit date, or @c 0 if not out of date. */ 2490251881Speter apr_time_t ood_changed_date; 2491251881Speter 2492251881Speter /** Set to the user name of the youngest commit, or @c NULL if not 2493251881Speter * out of date or non-existent. Because a non-existent @c 2494251881Speter * svn:author property has the same behavior as an out-of-date 2495251881Speter * working copy, examine @c ood_changed_rev to determine whether 2496251881Speter * the working copy is out of date. */ 2497251881Speter const char *ood_changed_author; 2498251881Speter 2499251881Speter /** @} */ 2500251881Speter 2501251881Speter /** Reserved for libsvn_client's internal use; this value is only to be used 2502251881Speter * for libsvn_client backwards compatibility wrappers. This value may be NULL 2503251881Speter * or to other data in future versions. */ 2504251881Speter const void *backwards_compatibility_baton; 2505251881Speter 2506251881Speter /** Set to the local absolute path that this node was moved from, if this 2507251881Speter * file or directory has been moved here locally and is the root of that 2508251881Speter * move. Otherwise set to NULL. 2509251881Speter * 2510251881Speter * This will be NULL for moved-here nodes that are just part of a subtree 2511251881Speter * that was moved along (and are not themselves a root of a different move 2512251881Speter * operation). 2513251881Speter * 2514251881Speter * @since New in 1.8. */ 2515251881Speter const char *moved_from_abspath; 2516251881Speter 2517251881Speter /** Set to the local absolute path that this node was moved to, if this file 2518251881Speter * or directory has been moved away locally and corresponds to the root 2519251881Speter * of the destination side of the move. Otherwise set to NULL. 2520251881Speter * 2521251881Speter * Note: Saying just "root" here could be misleading. For example: 2522251881Speter * svn mv A AA; 2523251881Speter * svn mv AA/B BB; 2524251881Speter * creates a situation where A/B is moved-to BB, but one could argue that 2525251881Speter * the move source's root actually was AA/B. Note that, as far as the 2526251881Speter * working copy is concerned, above case is exactly identical to: 2527251881Speter * svn mv A/B BB; 2528251881Speter * svn mv A AA; 2529251881Speter * In both situations, @a moved_to_abspath would be set for nodes A (moved 2530251881Speter * to AA) and A/B (moved to BB), only. 2531251881Speter * 2532251881Speter * This will be NULL for moved-away nodes that were just part of a subtree 2533251881Speter * that was moved along (and are not themselves a root of a different move 2534251881Speter * operation). 2535251881Speter * 2536251881Speter * @since New in 1.8. */ 2537251881Speter const char *moved_to_abspath; 2538251881Speter 2539251881Speter /* NOTE! Please update svn_client_status_dup() when adding new fields here. */ 2540251881Speter} svn_client_status_t; 2541251881Speter 2542251881Speter/** 2543251881Speter * Return a duplicate of @a status, allocated in @a result_pool. No part of the new 2544251881Speter * structure will be shared with @a status. 2545251881Speter * 2546251881Speter * @since New in 1.7. 2547251881Speter */ 2548251881Spetersvn_client_status_t * 2549251881Spetersvn_client_status_dup(const svn_client_status_t *status, 2550251881Speter apr_pool_t *result_pool); 2551251881Speter 2552251881Speter/** 2553251881Speter * A callback for reporting a @a status about @a path (which may be an 2554251881Speter * absolute or relative path). 2555251881Speter * 2556251881Speter * @a baton is a closure object; it should be provided by the 2557251881Speter * implementation, and passed by the caller. 2558251881Speter * 2559251881Speter * @a scratch_pool will be cleared between invocations to the callback. 2560251881Speter * 2561251881Speter * @since New in 1.7. 2562251881Speter */ 2563251881Spetertypedef svn_error_t *(*svn_client_status_func_t)( 2564251881Speter void *baton, 2565251881Speter const char *path, 2566251881Speter const svn_client_status_t *status, 2567251881Speter apr_pool_t *scratch_pool); 2568251881Speter 2569251881Speter/** 2570251881Speter * Given @a path to a working copy directory (or single file), call 2571251881Speter * @a status_func/status_baton with a set of #svn_wc_status_t * 2572251881Speter * structures which describe the status of @a path, and its children 2573251881Speter * (recursing according to @a depth). 2574251881Speter * 2575251881Speter * - If @a get_all is set, retrieve all entries; otherwise, 2576251881Speter * retrieve only "interesting" entries (local mods and/or 2577251881Speter * out of date). 2578251881Speter * 2579289180Speter * - If @a check_out_of_date is set, contact the repository and 2580289180Speter * augment the status structures with information about 2581289180Speter * out-of-dateness (with respect to @a revision). Also, if @a 2582289180Speter * result_rev is not @c NULL, set @a *result_rev to the actual 2583289180Speter * revision against which the working copy was compared (@a 2584289180Speter * *result_rev is not meaningful unless @a check_out_of_date is 2585289180Speter * set). 2586251881Speter * 2587289180Speter * - If @a check_working_copy is not set, do not scan the working 2588289180Speter * copy for local modifications. This parameter will be ignored 2589289180Speter * unless @a check_out_of_date is set. When set, the status 2590289180Speter * report will not contain any information about local changes in 2591289180Speter * the working copy; this includes local deletions and 2592289180Speter * replacements. 2593289180Speter * 2594251881Speter * If @a no_ignore is @c FALSE, don't report any file or directory (or 2595251881Speter * recurse into any directory) that is found by recursion (as opposed to 2596251881Speter * being the explicit target @a path) and whose name matches the 2597251881Speter * svn:ignore property on its parent directory or the global-ignores 2598251881Speter * list in @a ctx->config. If @a no_ignore is @c TRUE, report each such 2599251881Speter * file or directory with the status code #svn_wc_status_ignored. 2600251881Speter * 2601251881Speter * If @a ignore_externals is not set, then recurse into externals 2602251881Speter * definitions (if any exist) after handling the main target. This 2603251881Speter * calls the client notification function (in @a ctx) with the 2604251881Speter * #svn_wc_notify_status_external action before handling each externals 2605251881Speter * definition, and with #svn_wc_notify_status_completed 2606251881Speter * after each. 2607251881Speter * 2608251881Speter * If @a depth_as_sticky is set and @a depth is not 2609251881Speter * #svn_depth_unknown, then the status is calculated as if depth_is_sticky 2610251881Speter * was passed to an equivalent update command. 2611251881Speter * 2612251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 2613251881Speter * names, used as a restrictive filter on items whose statuses are 2614251881Speter * reported; that is, don't report status about any item unless 2615251881Speter * it's a member of one of those changelists. If @a changelists is 2616251881Speter * empty (or altogether @c NULL), no changelist filtering occurs. 2617251881Speter * 2618251881Speter * If @a path is an absolute path then the @c path parameter passed in each 2619251881Speter * call to @a status_func will be an absolute path. 2620251881Speter * 2621251881Speter * All temporary allocations are performed in @a scratch_pool. 2622251881Speter * 2623289180Speter * @since New in 1.9. 2624289180Speter */ 2625289180Spetersvn_error_t * 2626289180Spetersvn_client_status6(svn_revnum_t *result_rev, 2627289180Speter svn_client_ctx_t *ctx, 2628289180Speter const char *path, 2629289180Speter const svn_opt_revision_t *revision, 2630289180Speter svn_depth_t depth, 2631289180Speter svn_boolean_t get_all, 2632289180Speter svn_boolean_t check_out_of_date, 2633289180Speter svn_boolean_t check_working_copy, 2634289180Speter svn_boolean_t no_ignore, 2635289180Speter svn_boolean_t ignore_externals, 2636289180Speter svn_boolean_t depth_as_sticky, 2637289180Speter const apr_array_header_t *changelists, 2638289180Speter svn_client_status_func_t status_func, 2639289180Speter void *status_baton, 2640289180Speter apr_pool_t *scratch_pool); 2641289180Speter 2642289180Speter 2643289180Speter/** 2644289180Speter * Same as svn_client_status6(), but with @a check_out_of_date set to 2645289180Speter * @a update and @a check_working_copy set to @c TRUE. 2646289180Speter * 2647251881Speter * @since New in 1.7. 2648289180Speter * @deprecated Provided for backward compatibility with the 1.8 API. 2649251881Speter */ 2650289180SpeterSVN_DEPRECATED 2651251881Spetersvn_error_t * 2652251881Spetersvn_client_status5(svn_revnum_t *result_rev, 2653251881Speter svn_client_ctx_t *ctx, 2654251881Speter const char *path, 2655251881Speter const svn_opt_revision_t *revision, 2656251881Speter svn_depth_t depth, 2657251881Speter svn_boolean_t get_all, 2658251881Speter svn_boolean_t update, 2659251881Speter svn_boolean_t no_ignore, 2660251881Speter svn_boolean_t ignore_externals, 2661251881Speter svn_boolean_t depth_as_sticky, 2662251881Speter const apr_array_header_t *changelists, 2663251881Speter svn_client_status_func_t status_func, 2664251881Speter void *status_baton, 2665251881Speter apr_pool_t *scratch_pool); 2666251881Speter 2667251881Speter/** 2668251881Speter * Same as svn_client_status5(), but using #svn_wc_status_func3_t 2669251881Speter * instead of #svn_client_status_func_t and depth_as_sticky set to TRUE. 2670251881Speter * 2671251881Speter * @since New in 1.6. 2672251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 2673251881Speter */ 2674251881SpeterSVN_DEPRECATED 2675251881Spetersvn_error_t * 2676251881Spetersvn_client_status4(svn_revnum_t *result_rev, 2677251881Speter const char *path, 2678251881Speter const svn_opt_revision_t *revision, 2679251881Speter svn_wc_status_func3_t status_func, 2680251881Speter void *status_baton, 2681251881Speter svn_depth_t depth, 2682251881Speter svn_boolean_t get_all, 2683251881Speter svn_boolean_t update, 2684251881Speter svn_boolean_t no_ignore, 2685251881Speter svn_boolean_t ignore_externals, 2686251881Speter const apr_array_header_t *changelists, 2687251881Speter svn_client_ctx_t *ctx, 2688251881Speter apr_pool_t *pool); 2689251881Speter 2690251881Speter/** 2691251881Speter * Same as svn_client_status4(), but using an #svn_wc_status_func2_t 2692251881Speter * instead of an #svn_wc_status_func3_t. 2693251881Speter * 2694251881Speter * @since New in 1.5. 2695251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 2696251881Speter */ 2697251881SpeterSVN_DEPRECATED 2698251881Spetersvn_error_t * 2699251881Spetersvn_client_status3(svn_revnum_t *result_rev, 2700251881Speter const char *path, 2701251881Speter const svn_opt_revision_t *revision, 2702251881Speter svn_wc_status_func2_t status_func, 2703251881Speter void *status_baton, 2704251881Speter svn_depth_t depth, 2705251881Speter svn_boolean_t get_all, 2706251881Speter svn_boolean_t update, 2707251881Speter svn_boolean_t no_ignore, 2708251881Speter svn_boolean_t ignore_externals, 2709251881Speter const apr_array_header_t *changelists, 2710251881Speter svn_client_ctx_t *ctx, 2711251881Speter apr_pool_t *pool); 2712251881Speter 2713251881Speter/** 2714251881Speter * Like svn_client_status3(), except with @a changelists passed as @c 2715251881Speter * NULL, and with @a recurse instead of @a depth. If @a recurse is 2716251881Speter * TRUE, behave as if for #svn_depth_infinity; else if @a recurse is 2717251881Speter * FALSE, behave as if for #svn_depth_immediates. 2718251881Speter * 2719251881Speter * @since New in 1.2. 2720251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 2721251881Speter */ 2722251881SpeterSVN_DEPRECATED 2723251881Spetersvn_error_t * 2724251881Spetersvn_client_status2(svn_revnum_t *result_rev, 2725251881Speter const char *path, 2726251881Speter const svn_opt_revision_t *revision, 2727251881Speter svn_wc_status_func2_t status_func, 2728251881Speter void *status_baton, 2729251881Speter svn_boolean_t recurse, 2730251881Speter svn_boolean_t get_all, 2731251881Speter svn_boolean_t update, 2732251881Speter svn_boolean_t no_ignore, 2733251881Speter svn_boolean_t ignore_externals, 2734251881Speter svn_client_ctx_t *ctx, 2735251881Speter apr_pool_t *pool); 2736251881Speter 2737251881Speter 2738251881Speter/** 2739251881Speter * Similar to svn_client_status2(), but with @a ignore_externals 2740251881Speter * always set to FALSE, taking the #svn_wc_status_func_t type 2741251881Speter * instead of the #svn_wc_status_func2_t type for @a status_func, 2742251881Speter * and requiring @a *revision to be non-const even though it is 2743251881Speter * treated as constant. 2744251881Speter * 2745251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 2746251881Speter */ 2747251881SpeterSVN_DEPRECATED 2748251881Spetersvn_error_t * 2749251881Spetersvn_client_status(svn_revnum_t *result_rev, 2750251881Speter const char *path, 2751251881Speter svn_opt_revision_t *revision, 2752251881Speter svn_wc_status_func_t status_func, 2753251881Speter void *status_baton, 2754251881Speter svn_boolean_t recurse, 2755251881Speter svn_boolean_t get_all, 2756251881Speter svn_boolean_t update, 2757251881Speter svn_boolean_t no_ignore, 2758251881Speter svn_client_ctx_t *ctx, 2759251881Speter apr_pool_t *pool); 2760251881Speter 2761251881Speter/** @} */ 2762251881Speter 2763251881Speter/** 2764251881Speter * @defgroup Log View information about previous revisions of an object. 2765251881Speter * 2766251881Speter * @{ 2767251881Speter */ 2768251881Speter 2769251881Speter/** 2770251881Speter * Invoke @a receiver with @a receiver_baton on each log message from 2771251881Speter * each (#svn_opt_revision_range_t *) range in @a revision_ranges in turn, 2772251881Speter * inclusive (but never invoke @a receiver on a given log message more 2773251881Speter * than once). 2774251881Speter * 2775251881Speter * @a targets contains either a URL followed by zero or more relative 2776251881Speter * paths, or 1 working copy path, as <tt>const char *</tt>, for which log 2777251881Speter * messages are desired. @a receiver is invoked only on messages whose 2778251881Speter * revisions involved a change to some path in @a targets. @a peg_revision 2779251881Speter * indicates in which revision @a targets are valid. If @a peg_revision is 2780251881Speter * #svn_opt_revision_unspecified, it defaults to #svn_opt_revision_head 2781251881Speter * for URLs or #svn_opt_revision_working for WC paths. 2782251881Speter * 2783289180Speter * If @a limit is greater than zero only invoke @a receiver on the first 2784289180Speter * @a limit logs. 2785251881Speter * 2786251881Speter * If @a discover_changed_paths is set, then the @c changed_paths and @c 2787251881Speter * changed_paths2 fields in the @c log_entry argument to @a receiver will be 2788251881Speter * populated on each invocation. @note The @c text_modified and @c 2789251881Speter * props_modified fields of the changed paths structure may have the value 2790251881Speter * #svn_tristate_unknown if the repository does not report that information. 2791251881Speter * 2792251881Speter * If @a strict_node_history is set, copy history (if any exists) will 2793251881Speter * not be traversed while harvesting revision logs for each target. 2794251881Speter * 2795251881Speter * If @a include_merged_revisions is set, log information for revisions 2796251881Speter * which have been merged to @a targets will also be returned. 2797251881Speter * 2798251881Speter * If @a revprops is NULL, retrieve all revision properties; else, retrieve 2799251881Speter * only the revision properties named by the (const char *) array elements 2800251881Speter * (i.e. retrieve none if the array is empty). 2801251881Speter * 2802251881Speter * Use @a pool for any temporary allocation. 2803251881Speter * 2804251881Speter * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2 2805251881Speter * with a 'skip' signal on any unversioned targets. 2806251881Speter * 2807251881Speter * @since New in 1.6. 2808251881Speter */ 2809251881Spetersvn_error_t * 2810251881Spetersvn_client_log5(const apr_array_header_t *targets, 2811251881Speter const svn_opt_revision_t *peg_revision, 2812251881Speter const apr_array_header_t *revision_ranges, 2813251881Speter int limit, 2814251881Speter svn_boolean_t discover_changed_paths, 2815251881Speter svn_boolean_t strict_node_history, 2816251881Speter svn_boolean_t include_merged_revisions, 2817251881Speter const apr_array_header_t *revprops, 2818251881Speter svn_log_entry_receiver_t receiver, 2819251881Speter void *receiver_baton, 2820251881Speter svn_client_ctx_t *ctx, 2821251881Speter apr_pool_t *pool); 2822251881Speter 2823251881Speter/** 2824251881Speter * Similar to svn_client_log5(), but takes explicit start and end parameters 2825251881Speter * instead of an array of revision ranges. 2826251881Speter * 2827251881Speter * @deprecated Provided for compatibility with the 1.5 API. 2828251881Speter * @since New in 1.5. 2829251881Speter */ 2830251881SpeterSVN_DEPRECATED 2831251881Spetersvn_error_t * 2832251881Spetersvn_client_log4(const apr_array_header_t *targets, 2833251881Speter const svn_opt_revision_t *peg_revision, 2834251881Speter const svn_opt_revision_t *start, 2835251881Speter const svn_opt_revision_t *end, 2836251881Speter int limit, 2837251881Speter svn_boolean_t discover_changed_paths, 2838251881Speter svn_boolean_t strict_node_history, 2839251881Speter svn_boolean_t include_merged_revisions, 2840251881Speter const apr_array_header_t *revprops, 2841251881Speter svn_log_entry_receiver_t receiver, 2842251881Speter void *receiver_baton, 2843251881Speter svn_client_ctx_t *ctx, 2844251881Speter apr_pool_t *pool); 2845251881Speter 2846251881Speter/** 2847251881Speter * Similar to svn_client_log4(), but using #svn_log_message_receiver_t 2848251881Speter * instead of #svn_log_entry_receiver_t. Also, @a 2849251881Speter * include_merged_revisions is set to @c FALSE and @a revprops is 2850251881Speter * svn:author, svn:date, and svn:log. 2851251881Speter * 2852251881Speter * @deprecated Provided for compatibility with the 1.4 API. 2853251881Speter * @since New in 1.4. 2854251881Speter */ 2855251881SpeterSVN_DEPRECATED 2856251881Spetersvn_error_t * 2857251881Spetersvn_client_log3(const apr_array_header_t *targets, 2858251881Speter const svn_opt_revision_t *peg_revision, 2859251881Speter const svn_opt_revision_t *start, 2860251881Speter const svn_opt_revision_t *end, 2861251881Speter int limit, 2862251881Speter svn_boolean_t discover_changed_paths, 2863251881Speter svn_boolean_t strict_node_history, 2864251881Speter svn_log_message_receiver_t receiver, 2865251881Speter void *receiver_baton, 2866251881Speter svn_client_ctx_t *ctx, 2867251881Speter apr_pool_t *pool); 2868251881Speter 2869251881Speter 2870251881Speter/** 2871251881Speter * Similar to svn_client_log3(), but with the @c kind field of 2872251881Speter * @a peg_revision set to #svn_opt_revision_unspecified. 2873251881Speter * 2874251881Speter * @par Important: 2875251881Speter * A special case for the revision range HEAD:1, which was present 2876251881Speter * in svn_client_log(), has been removed from svn_client_log2(). Instead, it 2877251881Speter * is expected that callers will specify the range HEAD:0, to avoid a 2878251881Speter * #SVN_ERR_FS_NO_SUCH_REVISION error when invoked against an empty repository 2879251881Speter * (i.e. one not containing a revision 1). 2880251881Speter * 2881251881Speter * @deprecated Provided for compatibility with the 1.3 API. 2882251881Speter * @since New in 1.2. 2883251881Speter */ 2884251881SpeterSVN_DEPRECATED 2885251881Spetersvn_error_t * 2886251881Spetersvn_client_log2(const apr_array_header_t *targets, 2887251881Speter const svn_opt_revision_t *start, 2888251881Speter const svn_opt_revision_t *end, 2889251881Speter int limit, 2890251881Speter svn_boolean_t discover_changed_paths, 2891251881Speter svn_boolean_t strict_node_history, 2892251881Speter svn_log_message_receiver_t receiver, 2893251881Speter void *receiver_baton, 2894251881Speter svn_client_ctx_t *ctx, 2895251881Speter apr_pool_t *pool); 2896251881Speter 2897251881Speter 2898251881Speter/** 2899251881Speter * Similar to svn_client_log2(), but with @a limit set to 0, and the 2900251881Speter * following special case: 2901251881Speter * 2902251881Speter * Special case for repositories at revision 0: 2903251881Speter * 2904251881Speter * If @a start->kind is #svn_opt_revision_head, and @a end->kind is 2905251881Speter * #svn_opt_revision_number && @a end->number is @c 1, then handle an 2906251881Speter * empty (no revisions) repository specially: instead of erroring 2907251881Speter * because requested revision 1 when the highest revision is 0, just 2908251881Speter * invoke @a receiver on revision 0, passing @c NULL for changed paths and 2909251881Speter * empty strings for the author and date. This is because that 2910251881Speter * particular combination of @a start and @a end usually indicates the 2911251881Speter * common case of log invocation -- the user wants to see all log 2912251881Speter * messages from youngest to oldest, where the oldest commit is 2913251881Speter * revision 1. That works fine, except when there are no commits in 2914251881Speter * the repository, hence this special case. 2915251881Speter * 2916251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 2917251881Speter */ 2918251881SpeterSVN_DEPRECATED 2919251881Spetersvn_error_t * 2920251881Spetersvn_client_log(const apr_array_header_t *targets, 2921251881Speter const svn_opt_revision_t *start, 2922251881Speter const svn_opt_revision_t *end, 2923251881Speter svn_boolean_t discover_changed_paths, 2924251881Speter svn_boolean_t strict_node_history, 2925251881Speter svn_log_message_receiver_t receiver, 2926251881Speter void *receiver_baton, 2927251881Speter svn_client_ctx_t *ctx, 2928251881Speter apr_pool_t *pool); 2929251881Speter 2930251881Speter/** @} */ 2931251881Speter 2932251881Speter/** 2933251881Speter * @defgroup Blame Show modification information about lines in a file. 2934251881Speter * 2935251881Speter * @{ 2936251881Speter */ 2937251881Speter 2938251881Speter/** 2939251881Speter * Invoke @a receiver with @a receiver_baton on each line-blame item 2940251881Speter * associated with revision @a end of @a path_or_url, using @a start 2941251881Speter * as the default source of all blame. @a peg_revision indicates in 2942251881Speter * which revision @a path_or_url is valid. If @a peg_revision->kind 2943251881Speter * is #svn_opt_revision_unspecified, then it defaults to 2944251881Speter * #svn_opt_revision_head for URLs or #svn_opt_revision_working for 2945251881Speter * WC targets. 2946251881Speter * 2947251881Speter * If @a start->kind or @a end->kind is #svn_opt_revision_unspecified, 2948251881Speter * return the error #SVN_ERR_CLIENT_BAD_REVISION. If either are 2949251881Speter * #svn_opt_revision_working, return the error 2950251881Speter * #SVN_ERR_UNSUPPORTED_FEATURE. If any of the revisions of @a 2951251881Speter * path_or_url have a binary mime-type, return the error 2952251881Speter * #SVN_ERR_CLIENT_IS_BINARY_FILE, unless @a ignore_mime_type is TRUE, 2953251881Speter * in which case blame information will be generated regardless of the 2954251881Speter * MIME types of the revisions. 2955251881Speter * 2956289180Speter * @a start may resolve to a revision number greater (younger) than @a end 2957289180Speter * only if the server is 1.8.0 or greater (supports 2958289180Speter * #SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE) and the client is 1.9.0 or 2959289180Speter * newer. 2960289180Speter * 2961362181Sdim * Before the first call to @a receiver, set @a *start_revnum_p and 2962362181Sdim * @a *end_revnum_p to the start and end revision number of the entire 2963362181Sdim * blame operation, as resolved from the repository. This can be useful 2964362181Sdim * for the blame receiver to format the blame output. Any or both of these 2965362181Sdim * arguments may be @c NULL. 2966362181Sdim * 2967251881Speter * Use @a diff_options to determine how to compare different revisions of the 2968251881Speter * target. 2969251881Speter * 2970251881Speter * If @a include_merged_revisions is TRUE, also return data based upon 2971251881Speter * revisions which have been merged to @a path_or_url. 2972251881Speter * 2973251881Speter * Use @a pool for any temporary allocation. 2974251881Speter * 2975362181Sdim * @since New in 1.12. 2976362181Sdim */ 2977362181Sdimsvn_error_t * 2978362181Sdimsvn_client_blame6(svn_revnum_t *start_revnum_p, 2979362181Sdim svn_revnum_t *end_revnum_p, 2980362181Sdim const char *path_or_url, 2981362181Sdim const svn_opt_revision_t *peg_revision, 2982362181Sdim const svn_opt_revision_t *start, 2983362181Sdim const svn_opt_revision_t *end, 2984362181Sdim const svn_diff_file_options_t *diff_options, 2985362181Sdim svn_boolean_t ignore_mime_type, 2986362181Sdim svn_boolean_t include_merged_revisions, 2987362181Sdim svn_client_blame_receiver4_t receiver, 2988362181Sdim void *receiver_baton, 2989362181Sdim svn_client_ctx_t *ctx, 2990362181Sdim apr_pool_t *pool); 2991362181Sdim 2992362181Sdim 2993362181Sdim/** 2994362181Sdim * Similar to svn_client_blame6(), but with #svn_client_blame_receiver3_t 2995362181Sdim * as the receiver. 2996362181Sdim * 2997362181Sdim * @deprecated Provided for backwards compatibility with the 1.11 API. 2998362181Sdim * 2999251881Speter * @since New in 1.7. 3000251881Speter */ 3001362181SdimSVN_DEPRECATED 3002251881Spetersvn_error_t * 3003251881Spetersvn_client_blame5(const char *path_or_url, 3004251881Speter const svn_opt_revision_t *peg_revision, 3005251881Speter const svn_opt_revision_t *start, 3006251881Speter const svn_opt_revision_t *end, 3007251881Speter const svn_diff_file_options_t *diff_options, 3008251881Speter svn_boolean_t ignore_mime_type, 3009251881Speter svn_boolean_t include_merged_revisions, 3010251881Speter svn_client_blame_receiver3_t receiver, 3011251881Speter void *receiver_baton, 3012251881Speter svn_client_ctx_t *ctx, 3013251881Speter apr_pool_t *pool); 3014251881Speter 3015251881Speter/** 3016362181Sdim * Similar to svn_client_blame5(), but with #svn_client_blame_receiver2_t 3017251881Speter * as the receiver. 3018251881Speter * 3019251881Speter * @deprecated Provided for backwards compatibility with the 1.6 API. 3020251881Speter * 3021251881Speter * @since New in 1.5. 3022251881Speter */ 3023251881SpeterSVN_DEPRECATED 3024251881Spetersvn_error_t * 3025251881Spetersvn_client_blame4(const char *path_or_url, 3026251881Speter const svn_opt_revision_t *peg_revision, 3027251881Speter const svn_opt_revision_t *start, 3028251881Speter const svn_opt_revision_t *end, 3029251881Speter const svn_diff_file_options_t *diff_options, 3030251881Speter svn_boolean_t ignore_mime_type, 3031251881Speter svn_boolean_t include_merged_revisions, 3032251881Speter svn_client_blame_receiver2_t receiver, 3033251881Speter void *receiver_baton, 3034251881Speter svn_client_ctx_t *ctx, 3035251881Speter apr_pool_t *pool); 3036251881Speter 3037251881Speter/** 3038251881Speter * Similar to svn_client_blame4(), but with @a include_merged_revisions set 3039251881Speter * to FALSE, and using a #svn_client_blame_receiver2_t as the receiver. 3040251881Speter * 3041251881Speter * @deprecated Provided for backwards compatibility with the 1.4 API. 3042251881Speter * 3043251881Speter * @since New in 1.4. 3044251881Speter */ 3045251881SpeterSVN_DEPRECATED 3046251881Spetersvn_error_t * 3047251881Spetersvn_client_blame3(const char *path_or_url, 3048251881Speter const svn_opt_revision_t *peg_revision, 3049251881Speter const svn_opt_revision_t *start, 3050251881Speter const svn_opt_revision_t *end, 3051251881Speter const svn_diff_file_options_t *diff_options, 3052251881Speter svn_boolean_t ignore_mime_type, 3053251881Speter svn_client_blame_receiver_t receiver, 3054251881Speter void *receiver_baton, 3055251881Speter svn_client_ctx_t *ctx, 3056251881Speter apr_pool_t *pool); 3057251881Speter 3058251881Speter/** 3059251881Speter * Similar to svn_client_blame3(), but with @a diff_options set to 3060251881Speter * default options as returned by svn_diff_file_options_parse() and 3061251881Speter * @a ignore_mime_type set to FALSE. 3062251881Speter * 3063251881Speter * @deprecated Provided for backwards compatibility with the 1.3 API. 3064251881Speter * 3065251881Speter * @since New in 1.2. 3066251881Speter */ 3067251881SpeterSVN_DEPRECATED 3068251881Spetersvn_error_t * 3069251881Spetersvn_client_blame2(const char *path_or_url, 3070251881Speter const svn_opt_revision_t *peg_revision, 3071251881Speter const svn_opt_revision_t *start, 3072251881Speter const svn_opt_revision_t *end, 3073251881Speter svn_client_blame_receiver_t receiver, 3074251881Speter void *receiver_baton, 3075251881Speter svn_client_ctx_t *ctx, 3076251881Speter apr_pool_t *pool); 3077251881Speter 3078251881Speter/** 3079251881Speter * Similar to svn_client_blame2() except that @a peg_revision is always 3080251881Speter * the same as @a end. 3081251881Speter * 3082251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 3083251881Speter */ 3084251881SpeterSVN_DEPRECATED 3085251881Spetersvn_error_t * 3086251881Spetersvn_client_blame(const char *path_or_url, 3087251881Speter const svn_opt_revision_t *start, 3088251881Speter const svn_opt_revision_t *end, 3089251881Speter svn_client_blame_receiver_t receiver, 3090251881Speter void *receiver_baton, 3091251881Speter svn_client_ctx_t *ctx, 3092251881Speter apr_pool_t *pool); 3093251881Speter 3094251881Speter/** @} */ 3095251881Speter 3096251881Speter/** 3097251881Speter * @defgroup Diff Generate differences between paths. 3098251881Speter * 3099251881Speter * @{ 3100251881Speter */ 3101251881Speter 3102251881Speter/** 3103251881Speter * Produce diff output which describes the delta between 3104251881Speter * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2. Print 3105251881Speter * the output of the diff to @a outstream, and any errors to @a 3106251881Speter * errstream. @a path_or_url1 and @a path_or_url2 can be either 3107251881Speter * working-copy paths or URLs. 3108251881Speter * 3109251881Speter * If @a relative_to_dir is not @c NULL, the original path and 3110251881Speter * modified path will have the @a relative_to_dir stripped from the 3111251881Speter * front of the respective paths. If @a relative_to_dir is @c NULL, 3112251881Speter * paths will not be modified. If @a relative_to_dir is not 3113251881Speter * @c NULL but @a relative_to_dir is not a parent path of the target, 3114251881Speter * an error is returned. Finally, if @a relative_to_dir is a URL, an 3115251881Speter * error will be returned. 3116251881Speter * 3117251881Speter * If either @a revision1 or @a revision2 has an `unspecified' or 3118251881Speter * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 3119251881Speter * 3120251881Speter * @a path_or_url1 and @a path_or_url2 must both represent the same node 3121251881Speter * kind -- that is, if @a path_or_url1 is a directory, @a path_or_url2 3122251881Speter * must also be, and if @a path_or_url1 is a file, @a path_or_url2 must 3123251881Speter * also be. 3124251881Speter * 3125251881Speter * If @a depth is #svn_depth_infinity, diff fully recursively. 3126251881Speter * Else if it is #svn_depth_immediates, diff the named paths and 3127251881Speter * their file children (if any), and diff properties of 3128251881Speter * subdirectories, but do not descend further into the subdirectories. 3129251881Speter * Else if #svn_depth_files, behave as if for #svn_depth_immediates 3130251881Speter * except don't diff properties of subdirectories. If 3131251881Speter * #svn_depth_empty, diff exactly the named paths but nothing 3132251881Speter * underneath them. 3133251881Speter * 3134251881Speter * Use @a ignore_ancestry to control whether or not items being 3135251881Speter * diffed will be checked for relatedness first. Unrelated items 3136251881Speter * are typically transmitted to the editor as a deletion of one thing 3137251881Speter * and the addition of another, but if this flag is TRUE, unrelated 3138251881Speter * items will be diffed as if they were related. 3139251881Speter * 3140251881Speter * If @a no_diff_added is TRUE, then no diff output will be generated 3141251881Speter * on added files. 3142251881Speter * 3143251881Speter * If @a no_diff_deleted is TRUE, then no diff output will be 3144251881Speter * generated on deleted files. 3145251881Speter * 3146251881Speter * If @a show_copies_as_adds is TRUE, then copied files will not be diffed 3147251881Speter * against their copyfrom source, and will appear in the diff output 3148251881Speter * in their entirety, as if they were newly added. 3149251881Speter * ### BUGS: For a repos-repos diff, this is ignored. Instead, a file is 3150251881Speter * diffed against its copyfrom source iff the file is the diff target 3151251881Speter * and not if some parent directory is the diff target. For a repos-WC 3152251881Speter * diff, this is ignored if the file is the diff target. 3153251881Speter * 3154251881Speter * If @a use_git_diff_format is TRUE, then the git's extended diff format 3155251881Speter * will be used. 3156251881Speter * ### Do we need to say more about the format? A reference perhaps? 3157251881Speter * 3158251881Speter * If @a ignore_properties is TRUE, do not show property differences. 3159251881Speter * If @a properties_only is TRUE, show only property changes. 3160251881Speter * The above two options are mutually exclusive. It is an error to set 3161251881Speter * both to TRUE. 3162251881Speter * 3163362181Sdim * If @a pretty_print_mergeinfo is true, then describe 'svn:mergeinfo' 3164362181Sdim * property changes in a human-readable form that says what changes were 3165362181Sdim * merged or reverse merged; otherwise (or if the mergeinfo property values 3166362181Sdim * don't parse correctly) display them just like any other property. 3167362181Sdim * 3168251881Speter * Generated headers are encoded using @a header_encoding. 3169251881Speter * 3170362181Sdim * If either side has an svn:mime-type property that indicates 'binary' 3171362181Sdim * content, then if @a ignore_content_type is set, attempt to produce the 3172362181Sdim * diff in the usual way, otherwise produce a 'GIT binary diff' in git mode 3173362181Sdim * or print a warning message in non-git mode. 3174251881Speter * 3175251881Speter * @a diff_options (an array of <tt>const char *</tt>) is used to pass 3176251881Speter * additional command line options to the diff processes invoked to compare 3177251881Speter * files. @a diff_options is allowed to be @c NULL, in which case a value 3178251881Speter * for this option might still be obtained from the Subversion configuration 3179251881Speter * file via client context @a ctx. 3180251881Speter * 3181251881Speter * The authentication baton cached in @a ctx is used to communicate with 3182251881Speter * the repository. 3183251881Speter * 3184251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 3185251881Speter * names, used as a restrictive filter on items whose differences are 3186251881Speter * reported; that is, don't generate diffs about any item unless 3187251881Speter * it's a member of one of those changelists. If @a changelists is 3188251881Speter * empty (or altogether @c NULL), no changelist filtering occurs. 3189251881Speter * 3190251881Speter * @note Changelist filtering only applies to diffs in which at least 3191251881Speter * one side of the diff represents working copy data. 3192251881Speter * 3193251881Speter * @note @a header_encoding doesn't affect headers generated by external 3194251881Speter * diff programs. 3195251881Speter * 3196251881Speter * @note @a relative_to_dir doesn't affect the path index generated by 3197251881Speter * external diff programs. 3198251881Speter * 3199362181Sdim * @since New in 1.11. 3200362181Sdim */ 3201362181Sdimsvn_error_t * 3202362181Sdimsvn_client_diff7(const apr_array_header_t *diff_options, 3203362181Sdim const char *path_or_url1, 3204362181Sdim const svn_opt_revision_t *revision1, 3205362181Sdim const char *path_or_url2, 3206362181Sdim const svn_opt_revision_t *revision2, 3207362181Sdim const char *relative_to_dir, 3208362181Sdim svn_depth_t depth, 3209362181Sdim svn_boolean_t ignore_ancestry, 3210362181Sdim svn_boolean_t no_diff_added, 3211362181Sdim svn_boolean_t no_diff_deleted, 3212362181Sdim svn_boolean_t show_copies_as_adds, 3213362181Sdim svn_boolean_t ignore_content_type, 3214362181Sdim svn_boolean_t ignore_properties, 3215362181Sdim svn_boolean_t properties_only, 3216362181Sdim svn_boolean_t use_git_diff_format, 3217362181Sdim svn_boolean_t pretty_print_mergeinfo, 3218362181Sdim const char *header_encoding, 3219362181Sdim svn_stream_t *outstream, 3220362181Sdim svn_stream_t *errstream, 3221362181Sdim const apr_array_header_t *changelists, 3222362181Sdim svn_client_ctx_t *ctx, 3223362181Sdim apr_pool_t *pool); 3224362181Sdim 3225362181Sdim/** Similar to svn_client_diff7(), but with @a pretty_print_mergeinfo 3226362181Sdim * always passed as @c TRUE. 3227362181Sdim * 3228362181Sdim * @deprecated Provided for backward compatibility with the 1.10 API. 3229251881Speter * @since New in 1.8. 3230251881Speter */ 3231362181SdimSVN_DEPRECATED 3232251881Spetersvn_error_t * 3233251881Spetersvn_client_diff6(const apr_array_header_t *diff_options, 3234251881Speter const char *path_or_url1, 3235251881Speter const svn_opt_revision_t *revision1, 3236251881Speter const char *path_or_url2, 3237251881Speter const svn_opt_revision_t *revision2, 3238251881Speter const char *relative_to_dir, 3239251881Speter svn_depth_t depth, 3240251881Speter svn_boolean_t ignore_ancestry, 3241251881Speter svn_boolean_t no_diff_added, 3242251881Speter svn_boolean_t no_diff_deleted, 3243251881Speter svn_boolean_t show_copies_as_adds, 3244251881Speter svn_boolean_t ignore_content_type, 3245251881Speter svn_boolean_t ignore_properties, 3246251881Speter svn_boolean_t properties_only, 3247251881Speter svn_boolean_t use_git_diff_format, 3248251881Speter const char *header_encoding, 3249251881Speter svn_stream_t *outstream, 3250251881Speter svn_stream_t *errstream, 3251251881Speter const apr_array_header_t *changelists, 3252251881Speter svn_client_ctx_t *ctx, 3253251881Speter apr_pool_t *pool); 3254251881Speter 3255251881Speter/** Similar to svn_client_diff6(), but with @a outfile and @a errfile, 3256251881Speter * instead of @a outstream and @a errstream, and with @a 3257251881Speter * no_diff_added, @a ignore_properties, and @a properties_only always 3258251881Speter * passed as @c FALSE (which means that additions and property changes 3259251881Speter * are always transmitted). 3260251881Speter * 3261251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 3262251881Speter * @since New in 1.7. 3263251881Speter */ 3264251881SpeterSVN_DEPRECATED 3265251881Spetersvn_error_t * 3266251881Spetersvn_client_diff5(const apr_array_header_t *diff_options, 3267251881Speter const char *path1, 3268251881Speter const svn_opt_revision_t *revision1, 3269251881Speter const char *path2, 3270251881Speter const svn_opt_revision_t *revision2, 3271251881Speter const char *relative_to_dir, 3272251881Speter svn_depth_t depth, 3273251881Speter svn_boolean_t ignore_ancestry, 3274251881Speter svn_boolean_t no_diff_deleted, 3275251881Speter svn_boolean_t show_copies_as_adds, 3276251881Speter svn_boolean_t ignore_content_type, 3277251881Speter svn_boolean_t use_git_diff_format, 3278251881Speter const char *header_encoding, 3279251881Speter apr_file_t *outfile, 3280251881Speter apr_file_t *errfile, 3281251881Speter const apr_array_header_t *changelists, 3282251881Speter svn_client_ctx_t *ctx, 3283251881Speter apr_pool_t *pool); 3284251881Speter 3285251881Speter/** 3286251881Speter * Similar to svn_client_diff5(), but with @a show_copies_as_adds set to 3287251881Speter * @c FALSE and @a use_git_diff_format set to @c FALSE. 3288251881Speter * 3289251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 3290251881Speter * @since New in 1.5. 3291251881Speter */ 3292251881SpeterSVN_DEPRECATED 3293251881Spetersvn_error_t * 3294251881Spetersvn_client_diff4(const apr_array_header_t *diff_options, 3295251881Speter const char *path1, 3296251881Speter const svn_opt_revision_t *revision1, 3297251881Speter const char *path2, 3298251881Speter const svn_opt_revision_t *revision2, 3299251881Speter const char *relative_to_dir, 3300251881Speter svn_depth_t depth, 3301251881Speter svn_boolean_t ignore_ancestry, 3302251881Speter svn_boolean_t no_diff_deleted, 3303251881Speter svn_boolean_t ignore_content_type, 3304251881Speter const char *header_encoding, 3305251881Speter apr_file_t *outfile, 3306251881Speter apr_file_t *errfile, 3307251881Speter const apr_array_header_t *changelists, 3308251881Speter svn_client_ctx_t *ctx, 3309251881Speter apr_pool_t *pool); 3310251881Speter 3311251881Speter/** 3312251881Speter * Similar to svn_client_diff4(), but with @a changelists passed as @c 3313251881Speter * NULL, and @a depth set according to @a recurse: if @a recurse is 3314251881Speter * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 3315251881Speter * FALSE, set @a depth to #svn_depth_empty. 3316251881Speter * 3317251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3318251881Speter * @since New in 1.3. 3319251881Speter */ 3320251881SpeterSVN_DEPRECATED 3321251881Spetersvn_error_t * 3322251881Spetersvn_client_diff3(const apr_array_header_t *diff_options, 3323251881Speter const char *path1, 3324251881Speter const svn_opt_revision_t *revision1, 3325251881Speter const char *path2, 3326251881Speter const svn_opt_revision_t *revision2, 3327251881Speter svn_boolean_t recurse, 3328251881Speter svn_boolean_t ignore_ancestry, 3329251881Speter svn_boolean_t no_diff_deleted, 3330251881Speter svn_boolean_t ignore_content_type, 3331251881Speter const char *header_encoding, 3332251881Speter apr_file_t *outfile, 3333251881Speter apr_file_t *errfile, 3334251881Speter svn_client_ctx_t *ctx, 3335251881Speter apr_pool_t *pool); 3336251881Speter 3337251881Speter 3338251881Speter/** 3339251881Speter * Similar to svn_client_diff3(), but with @a header_encoding set to 3340251881Speter * @c APR_LOCALE_CHARSET. 3341251881Speter * 3342251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 3343251881Speter * @since New in 1.2. 3344251881Speter */ 3345251881SpeterSVN_DEPRECATED 3346251881Spetersvn_error_t * 3347251881Spetersvn_client_diff2(const apr_array_header_t *diff_options, 3348251881Speter const char *path1, 3349251881Speter const svn_opt_revision_t *revision1, 3350251881Speter const char *path2, 3351251881Speter const svn_opt_revision_t *revision2, 3352251881Speter svn_boolean_t recurse, 3353251881Speter svn_boolean_t ignore_ancestry, 3354251881Speter svn_boolean_t no_diff_deleted, 3355251881Speter svn_boolean_t ignore_content_type, 3356251881Speter apr_file_t *outfile, 3357251881Speter apr_file_t *errfile, 3358251881Speter svn_client_ctx_t *ctx, 3359251881Speter apr_pool_t *pool); 3360251881Speter 3361251881Speter/** 3362251881Speter * Similar to svn_client_diff2(), but with @a ignore_content_type 3363251881Speter * always set to FALSE. 3364251881Speter * 3365251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 3366251881Speter */ 3367251881SpeterSVN_DEPRECATED 3368251881Spetersvn_error_t * 3369251881Spetersvn_client_diff(const apr_array_header_t *diff_options, 3370251881Speter const char *path1, 3371251881Speter const svn_opt_revision_t *revision1, 3372251881Speter const char *path2, 3373251881Speter const svn_opt_revision_t *revision2, 3374251881Speter svn_boolean_t recurse, 3375251881Speter svn_boolean_t ignore_ancestry, 3376251881Speter svn_boolean_t no_diff_deleted, 3377251881Speter apr_file_t *outfile, 3378251881Speter apr_file_t *errfile, 3379251881Speter svn_client_ctx_t *ctx, 3380251881Speter apr_pool_t *pool); 3381251881Speter 3382251881Speter/** 3383251881Speter * Produce diff output which describes the delta between the filesystem 3384251881Speter * object @a path_or_url in peg revision @a peg_revision, as it changed 3385251881Speter * between @a start_revision and @a end_revision. @a path_or_url can 3386251881Speter * be either a working-copy path or URL. 3387251881Speter * 3388251881Speter * If @a peg_revision is #svn_opt_revision_unspecified, behave 3389362181Sdim * identically to svn_client_diff7(), using @a path_or_url for both of that 3390251881Speter * function's @a path_or_url1 and @a path_or_url2 arguments. 3391251881Speter * 3392362181Sdim * All other options are handled identically to svn_client_diff7(). 3393251881Speter * 3394251881Speter * @since New in 1.8. 3395251881Speter */ 3396251881Spetersvn_error_t * 3397362181Sdimsvn_client_diff_peg7(const apr_array_header_t *diff_options, 3398362181Sdim const char *path_or_url, 3399362181Sdim const svn_opt_revision_t *peg_revision, 3400362181Sdim const svn_opt_revision_t *start_revision, 3401362181Sdim const svn_opt_revision_t *end_revision, 3402362181Sdim const char *relative_to_dir, 3403362181Sdim svn_depth_t depth, 3404362181Sdim svn_boolean_t ignore_ancestry, 3405362181Sdim svn_boolean_t no_diff_added, 3406362181Sdim svn_boolean_t no_diff_deleted, 3407362181Sdim svn_boolean_t show_copies_as_adds, 3408362181Sdim svn_boolean_t ignore_content_type, 3409362181Sdim svn_boolean_t ignore_properties, 3410362181Sdim svn_boolean_t properties_only, 3411362181Sdim svn_boolean_t use_git_diff_format, 3412362181Sdim svn_boolean_t pretty_print_mergeinfo, 3413362181Sdim const char *header_encoding, 3414362181Sdim svn_stream_t *outstream, 3415362181Sdim svn_stream_t *errstream, 3416362181Sdim const apr_array_header_t *changelists, 3417362181Sdim svn_client_ctx_t *ctx, 3418362181Sdim apr_pool_t *pool); 3419362181Sdim 3420362181Sdim/** Similar to svn_client_diff_peg7(), but with @a pretty_print_mergeinfo 3421362181Sdim * always passed as @c TRUE. 3422362181Sdim * 3423362181Sdim * @deprecated Provided for backward compatibility with the 1.7 API. 3424362181Sdim * @since New in 1.7. 3425362181Sdim */ 3426362181SdimSVN_DEPRECATED 3427362181Sdimsvn_error_t * 3428251881Spetersvn_client_diff_peg6(const apr_array_header_t *diff_options, 3429251881Speter const char *path_or_url, 3430251881Speter const svn_opt_revision_t *peg_revision, 3431251881Speter const svn_opt_revision_t *start_revision, 3432251881Speter const svn_opt_revision_t *end_revision, 3433251881Speter const char *relative_to_dir, 3434251881Speter svn_depth_t depth, 3435251881Speter svn_boolean_t ignore_ancestry, 3436251881Speter svn_boolean_t no_diff_added, 3437251881Speter svn_boolean_t no_diff_deleted, 3438251881Speter svn_boolean_t show_copies_as_adds, 3439251881Speter svn_boolean_t ignore_content_type, 3440251881Speter svn_boolean_t ignore_properties, 3441251881Speter svn_boolean_t properties_only, 3442251881Speter svn_boolean_t use_git_diff_format, 3443251881Speter const char *header_encoding, 3444251881Speter svn_stream_t *outstream, 3445251881Speter svn_stream_t *errstream, 3446251881Speter const apr_array_header_t *changelists, 3447251881Speter svn_client_ctx_t *ctx, 3448251881Speter apr_pool_t *pool); 3449251881Speter 3450251881Speter/** Similar to svn_client_diff6_peg6(), but with @a outfile and @a errfile, 3451251881Speter * instead of @a outstream and @a errstream, and with @a 3452251881Speter * no_diff_added, @a ignore_properties, and @a properties_only always 3453251881Speter * passed as @c FALSE (which means that additions and property changes 3454251881Speter * are always transmitted). 3455251881Speter * 3456251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 3457251881Speter * @since New in 1.7. 3458251881Speter */ 3459251881SpeterSVN_DEPRECATED 3460251881Spetersvn_error_t * 3461251881Spetersvn_client_diff_peg5(const apr_array_header_t *diff_options, 3462251881Speter const char *path, 3463251881Speter const svn_opt_revision_t *peg_revision, 3464251881Speter const svn_opt_revision_t *start_revision, 3465251881Speter const svn_opt_revision_t *end_revision, 3466251881Speter const char *relative_to_dir, 3467251881Speter svn_depth_t depth, 3468251881Speter svn_boolean_t ignore_ancestry, 3469251881Speter svn_boolean_t no_diff_deleted, 3470251881Speter svn_boolean_t show_copies_as_adds, 3471251881Speter svn_boolean_t ignore_content_type, 3472251881Speter svn_boolean_t use_git_diff_format, 3473251881Speter const char *header_encoding, 3474251881Speter apr_file_t *outfile, 3475251881Speter apr_file_t *errfile, 3476251881Speter const apr_array_header_t *changelists, 3477251881Speter svn_client_ctx_t *ctx, 3478251881Speter apr_pool_t *pool); 3479251881Speter 3480251881Speter/** 3481251881Speter * Similar to svn_client_diff_peg5(), but with @a show_copies_as_adds set to 3482251881Speter * @c FALSE and @a use_git_diff_format set to @c FALSE. 3483251881Speter * 3484251881Speter * @since New in 1.5. 3485251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 3486251881Speter */ 3487251881SpeterSVN_DEPRECATED 3488251881Spetersvn_error_t * 3489251881Spetersvn_client_diff_peg4(const apr_array_header_t *diff_options, 3490251881Speter const char *path, 3491251881Speter const svn_opt_revision_t *peg_revision, 3492251881Speter const svn_opt_revision_t *start_revision, 3493251881Speter const svn_opt_revision_t *end_revision, 3494251881Speter const char *relative_to_dir, 3495251881Speter svn_depth_t depth, 3496251881Speter svn_boolean_t ignore_ancestry, 3497251881Speter svn_boolean_t no_diff_deleted, 3498251881Speter svn_boolean_t ignore_content_type, 3499251881Speter const char *header_encoding, 3500251881Speter apr_file_t *outfile, 3501251881Speter apr_file_t *errfile, 3502251881Speter const apr_array_header_t *changelists, 3503251881Speter svn_client_ctx_t *ctx, 3504251881Speter apr_pool_t *pool); 3505251881Speter 3506251881Speter/** 3507251881Speter * Similar to svn_client_diff_peg4(), but with @a changelists passed 3508251881Speter * as @c NULL, and @a depth set according to @a recurse: if @a recurse 3509251881Speter * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 3510251881Speter * FALSE, set @a depth to #svn_depth_files. 3511251881Speter * 3512251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3513251881Speter * @since New in 1.3. 3514251881Speter */ 3515251881SpeterSVN_DEPRECATED 3516251881Spetersvn_error_t * 3517251881Spetersvn_client_diff_peg3(const apr_array_header_t *diff_options, 3518251881Speter const char *path, 3519251881Speter const svn_opt_revision_t *peg_revision, 3520251881Speter const svn_opt_revision_t *start_revision, 3521251881Speter const svn_opt_revision_t *end_revision, 3522251881Speter svn_boolean_t recurse, 3523251881Speter svn_boolean_t ignore_ancestry, 3524251881Speter svn_boolean_t no_diff_deleted, 3525251881Speter svn_boolean_t ignore_content_type, 3526251881Speter const char *header_encoding, 3527251881Speter apr_file_t *outfile, 3528251881Speter apr_file_t *errfile, 3529251881Speter svn_client_ctx_t *ctx, 3530251881Speter apr_pool_t *pool); 3531251881Speter 3532251881Speter/** 3533251881Speter * Similar to svn_client_diff_peg3(), but with @a header_encoding set to 3534251881Speter * @c APR_LOCALE_CHARSET. 3535251881Speter * 3536251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 3537251881Speter * @since New in 1.2. 3538251881Speter */ 3539251881SpeterSVN_DEPRECATED 3540251881Spetersvn_error_t * 3541251881Spetersvn_client_diff_peg2(const apr_array_header_t *diff_options, 3542251881Speter const char *path, 3543251881Speter const svn_opt_revision_t *peg_revision, 3544251881Speter const svn_opt_revision_t *start_revision, 3545251881Speter const svn_opt_revision_t *end_revision, 3546251881Speter svn_boolean_t recurse, 3547251881Speter svn_boolean_t ignore_ancestry, 3548251881Speter svn_boolean_t no_diff_deleted, 3549251881Speter svn_boolean_t ignore_content_type, 3550251881Speter apr_file_t *outfile, 3551251881Speter apr_file_t *errfile, 3552251881Speter svn_client_ctx_t *ctx, 3553251881Speter apr_pool_t *pool); 3554251881Speter 3555251881Speter/** 3556251881Speter * Similar to svn_client_diff_peg2(), but with @a ignore_content_type 3557251881Speter * always set to FALSE. 3558251881Speter * 3559251881Speter * @since New in 1.1. 3560251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 3561251881Speter */ 3562251881SpeterSVN_DEPRECATED 3563251881Spetersvn_error_t * 3564251881Spetersvn_client_diff_peg(const apr_array_header_t *diff_options, 3565251881Speter const char *path, 3566251881Speter const svn_opt_revision_t *peg_revision, 3567251881Speter const svn_opt_revision_t *start_revision, 3568251881Speter const svn_opt_revision_t *end_revision, 3569251881Speter svn_boolean_t recurse, 3570251881Speter svn_boolean_t ignore_ancestry, 3571251881Speter svn_boolean_t no_diff_deleted, 3572251881Speter apr_file_t *outfile, 3573251881Speter apr_file_t *errfile, 3574251881Speter svn_client_ctx_t *ctx, 3575251881Speter apr_pool_t *pool); 3576251881Speter 3577251881Speter/** 3578251881Speter * Produce a diff summary which lists the changed items between 3579251881Speter * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2 without 3580251881Speter * creating text deltas. @a path_or_url1 and @a path_or_url2 can be 3581251881Speter * either working-copy paths or URLs. 3582251881Speter * 3583251881Speter * The function may report false positives if @a ignore_ancestry is false, 3584251881Speter * since a file might have been modified between two revisions, but still 3585251881Speter * have the same contents. 3586251881Speter * 3587251881Speter * Calls @a summarize_func with @a summarize_baton for each difference 3588251881Speter * with a #svn_client_diff_summarize_t structure describing the difference. 3589251881Speter * 3590362181Sdim * See svn_client_diff7() for a description of the other parameters. 3591251881Speter * 3592251881Speter * @since New in 1.5. 3593251881Speter */ 3594251881Spetersvn_error_t * 3595251881Spetersvn_client_diff_summarize2(const char *path_or_url1, 3596251881Speter const svn_opt_revision_t *revision1, 3597251881Speter const char *path_or_url2, 3598251881Speter const svn_opt_revision_t *revision2, 3599251881Speter svn_depth_t depth, 3600251881Speter svn_boolean_t ignore_ancestry, 3601251881Speter const apr_array_header_t *changelists, 3602251881Speter svn_client_diff_summarize_func_t summarize_func, 3603251881Speter void *summarize_baton, 3604251881Speter svn_client_ctx_t *ctx, 3605251881Speter apr_pool_t *pool); 3606251881Speter 3607251881Speter/** 3608251881Speter * Similar to svn_client_diff_summarize2(), but with @a changelists 3609251881Speter * passed as @c NULL, and @a depth set according to @a recurse: if @a 3610251881Speter * recurse is TRUE, set @a depth to #svn_depth_infinity, if @a 3611251881Speter * recurse is FALSE, set @a depth to #svn_depth_files. 3612251881Speter * 3613251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3614251881Speter * 3615251881Speter * @since New in 1.4. 3616251881Speter */ 3617251881SpeterSVN_DEPRECATED 3618251881Spetersvn_error_t * 3619251881Spetersvn_client_diff_summarize(const char *path1, 3620251881Speter const svn_opt_revision_t *revision1, 3621251881Speter const char *path2, 3622251881Speter const svn_opt_revision_t *revision2, 3623251881Speter svn_boolean_t recurse, 3624251881Speter svn_boolean_t ignore_ancestry, 3625251881Speter svn_client_diff_summarize_func_t summarize_func, 3626251881Speter void *summarize_baton, 3627251881Speter svn_client_ctx_t *ctx, 3628251881Speter apr_pool_t *pool); 3629251881Speter 3630251881Speter/** 3631251881Speter * Produce a diff summary which lists the changed items between the 3632251881Speter * filesystem object @a path_or_url in peg revision @a peg_revision, as it 3633251881Speter * changed between @a start_revision and @a end_revision. @a path_or_url can 3634251881Speter * be either a working-copy path or URL. 3635251881Speter * 3636251881Speter * If @a peg_revision is #svn_opt_revision_unspecified, behave 3637251881Speter * identically to svn_client_diff_summarize2(), using @a path_or_url for 3638251881Speter * both of that function's @a path_or_url1 and @a path_or_url2 arguments. 3639251881Speter * 3640251881Speter * The function may report false positives if @a ignore_ancestry is false, 3641251881Speter * as described in the documentation for svn_client_diff_summarize2(). 3642251881Speter * 3643251881Speter * Call @a summarize_func with @a summarize_baton for each difference 3644251881Speter * with a #svn_client_diff_summarize_t structure describing the difference. 3645251881Speter * 3646251881Speter * See svn_client_diff_peg5() for a description of the other parameters. 3647251881Speter * 3648251881Speter * @since New in 1.5. 3649251881Speter */ 3650251881Spetersvn_error_t * 3651251881Spetersvn_client_diff_summarize_peg2(const char *path_or_url, 3652251881Speter const svn_opt_revision_t *peg_revision, 3653251881Speter const svn_opt_revision_t *start_revision, 3654251881Speter const svn_opt_revision_t *end_revision, 3655251881Speter svn_depth_t depth, 3656251881Speter svn_boolean_t ignore_ancestry, 3657251881Speter const apr_array_header_t *changelists, 3658251881Speter svn_client_diff_summarize_func_t summarize_func, 3659251881Speter void *summarize_baton, 3660251881Speter svn_client_ctx_t *ctx, 3661251881Speter apr_pool_t *pool); 3662251881Speter 3663251881Speter/** 3664251881Speter * Similar to svn_client_diff_summarize_peg2(), but with @a 3665251881Speter * changelists passed as @c NULL, and @a depth set according to @a 3666251881Speter * recurse: if @a recurse is TRUE, set @a depth to 3667251881Speter * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to 3668251881Speter * #svn_depth_files. 3669251881Speter * 3670251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3671251881Speter * 3672251881Speter * @since New in 1.4. 3673251881Speter */ 3674251881SpeterSVN_DEPRECATED 3675251881Spetersvn_error_t * 3676251881Spetersvn_client_diff_summarize_peg(const char *path, 3677251881Speter const svn_opt_revision_t *peg_revision, 3678251881Speter const svn_opt_revision_t *start_revision, 3679251881Speter const svn_opt_revision_t *end_revision, 3680251881Speter svn_boolean_t recurse, 3681251881Speter svn_boolean_t ignore_ancestry, 3682251881Speter svn_client_diff_summarize_func_t summarize_func, 3683251881Speter void *summarize_baton, 3684251881Speter svn_client_ctx_t *ctx, 3685251881Speter apr_pool_t *pool); 3686251881Speter 3687251881Speter/** @} */ 3688251881Speter 3689251881Speter/** 3690251881Speter * @defgroup Merge Merge changes between branches. 3691251881Speter * 3692251881Speter * @{ 3693251881Speter */ 3694251881Speter 3695251881Speter/** Get information about the state of merging between two branches. 3696251881Speter * 3697251881Speter * The source is specified by @a source_path_or_url at @a source_revision. 3698251881Speter * The target is specified by @a target_path_or_url at @a target_revision, 3699251881Speter * which refers to either a WC or a repository location. 3700251881Speter * 3701251881Speter * Set @a *needs_reintegration to true if an automatic merge from source 3702251881Speter * to target would be a reintegration merge: that is, if the last automatic 3703251881Speter * merge was in the opposite direction; or to false otherwise. 3704251881Speter * 3705251881Speter * Set @a *yca_url, @a *yca_rev, @a *base_url, @a *base_rev, @a *right_url, 3706251881Speter * @a *right_rev, @a *target_url, @a *target_rev to the repository locations 3707251881Speter * of, respectively: the youngest common ancestor of the branches, the base 3708251881Speter * chosen for 3-way merge, the right-hand side of the source diff, and the 3709251881Speter * target. 3710251881Speter * 3711251881Speter * Set @a repos_root_url to the URL of the repository root. This is a 3712251881Speter * common prefix of all four URL outputs. 3713251881Speter * 3714251881Speter * Allocate the results in @a result_pool. Any of the output pointers may 3715251881Speter * be NULL if not wanted. 3716251881Speter * 3717251881Speter * @since New in 1.8. 3718251881Speter */ 3719251881Spetersvn_error_t * 3720251881Spetersvn_client_get_merging_summary(svn_boolean_t *needs_reintegration, 3721251881Speter const char **yca_url, svn_revnum_t *yca_rev, 3722251881Speter const char **base_url, svn_revnum_t *base_rev, 3723251881Speter const char **right_url, svn_revnum_t *right_rev, 3724251881Speter const char **target_url, svn_revnum_t *target_rev, 3725251881Speter const char **repos_root_url, 3726251881Speter const char *source_path_or_url, 3727251881Speter const svn_opt_revision_t *source_revision, 3728251881Speter const char *target_path_or_url, 3729251881Speter const svn_opt_revision_t *target_revision, 3730251881Speter svn_client_ctx_t *ctx, 3731251881Speter apr_pool_t *result_pool, 3732251881Speter apr_pool_t *scratch_pool); 3733251881Speter 3734251881Speter 3735251881Speter/** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into 3736251881Speter * the working-copy path @a target_wcpath. 3737251881Speter * 3738251881Speter * @a source1 and @a source2 are either URLs that refer to entries in the 3739251881Speter * repository, or paths to entries in the working copy. 3740251881Speter * 3741251881Speter * By "merging", we mean: apply file differences using 3742251881Speter * svn_wc_merge(), and schedule additions & deletions when appropriate. 3743251881Speter * 3744251881Speter * @a source1 and @a source2 must both represent the same node kind -- that 3745251881Speter * is, if @a source1 is a directory, @a source2 must also be, and if @a source1 3746251881Speter * is a file, @a source2 must also be. 3747251881Speter * 3748251881Speter * If either @a revision1 or @a revision2 has an `unspecified' or 3749251881Speter * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 3750251881Speter * 3751251881Speter * If @a depth is #svn_depth_infinity, merge fully recursively. 3752251881Speter * Else if #svn_depth_immediates, merge changes at most to files 3753251881Speter * that are immediate children of @a target_wcpath and to directory 3754251881Speter * properties of @a target_wcpath and its immediate subdirectory children. 3755251881Speter * Else if #svn_depth_files, merge at most to immediate file 3756251881Speter * children of @a target_wcpath and to @a target_wcpath itself. 3757251881Speter * Else if #svn_depth_empty, apply changes only to @a target_wcpath 3758251881Speter * (i.e., directory property changes only) 3759251881Speter * 3760251881Speter * If @a depth is #svn_depth_unknown, use the depth of @a target_wcpath. 3761251881Speter * 3762251881Speter * If @a ignore_mergeinfo is true, disable merge tracking, by treating the 3763251881Speter * two sources as unrelated even if they actually have a common ancestor. 3764251881Speter * 3765251881Speter * If @a diff_ignore_ancestry is true, diff unrelated nodes as if related: 3766251881Speter * that is, diff the 'left' and 'right' versions of a node as if they were 3767251881Speter * related (if they are the same kind) even if they are not related. 3768251881Speter * Otherwise, diff unrelated items as a deletion of one thing and the 3769251881Speter * addition of another. 3770251881Speter * 3771251881Speter * If @a force_delete is false and the merge involves deleting a file whose 3772251881Speter * content differs from the source-left version, or a locally modified 3773251881Speter * directory, or an unversioned item, then the operation will fail. If 3774251881Speter * @a force_delete is true then all such items will be deleted. 3775251881Speter * 3776251881Speter * @a merge_options (an array of <tt>const char *</tt>), if non-NULL, 3777251881Speter * is used to pass additional command line arguments to the merge 3778251881Speter * processes (internal or external). @see 3779251881Speter * svn_diff_file_options_parse(). 3780251881Speter * 3781251881Speter * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with @a 3782251881Speter * ctx->notify_baton2 once for each merged target, passing the target's local 3783251881Speter * path. 3784251881Speter * 3785251881Speter * If @a record_only is TRUE, the merge is performed, but is limited only to 3786251881Speter * mergeinfo property changes on existing paths in @a target_wcpath. 3787251881Speter * 3788251881Speter * If @a dry_run is TRUE, the merge is carried out, and full notification 3789251881Speter * feedback is provided, but the working copy is not modified. 3790251881Speter * 3791251881Speter * If allow_mixed_rev is @c FALSE, and @a merge_target is a mixed-revision 3792251881Speter * working copy, raise @c SVN_ERR_CLIENT_MERGE_UPDATE_REQUIRED. 3793251881Speter * Because users rarely intend to merge into mixed-revision working copies, 3794251881Speter * it is recommended to set this parameter to FALSE by default unless the 3795251881Speter * user has explicitly requested a merge into a mixed-revision working copy. 3796251881Speter * 3797251881Speter * The authentication baton cached in @a ctx is used to communicate with the 3798251881Speter * repository. 3799251881Speter * 3800251881Speter * @since New in 1.8. 3801251881Speter */ 3802251881Spetersvn_error_t * 3803251881Spetersvn_client_merge5(const char *source1, 3804251881Speter const svn_opt_revision_t *revision1, 3805251881Speter const char *source2, 3806251881Speter const svn_opt_revision_t *revision2, 3807251881Speter const char *target_wcpath, 3808251881Speter svn_depth_t depth, 3809251881Speter svn_boolean_t ignore_mergeinfo, 3810251881Speter svn_boolean_t diff_ignore_ancestry, 3811251881Speter svn_boolean_t force_delete, 3812251881Speter svn_boolean_t record_only, 3813251881Speter svn_boolean_t dry_run, 3814251881Speter svn_boolean_t allow_mixed_rev, 3815251881Speter const apr_array_header_t *merge_options, 3816251881Speter svn_client_ctx_t *ctx, 3817251881Speter apr_pool_t *pool); 3818251881Speter 3819251881Speter/** 3820251881Speter * Similar to svn_client_merge5(), but the single @a ignore_ancestry 3821251881Speter * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry. 3822251881Speter * 3823251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 3824251881Speter * @since New in 1.7. 3825251881Speter */ 3826251881SpeterSVN_DEPRECATED 3827251881Spetersvn_error_t * 3828251881Spetersvn_client_merge4(const char *source1, 3829251881Speter const svn_opt_revision_t *revision1, 3830251881Speter const char *source2, 3831251881Speter const svn_opt_revision_t *revision2, 3832251881Speter const char *target_wcpath, 3833251881Speter svn_depth_t depth, 3834251881Speter svn_boolean_t ignore_ancestry, 3835251881Speter svn_boolean_t force_delete, 3836251881Speter svn_boolean_t record_only, 3837251881Speter svn_boolean_t dry_run, 3838251881Speter svn_boolean_t allow_mixed_rev, 3839251881Speter const apr_array_header_t *merge_options, 3840251881Speter svn_client_ctx_t *ctx, 3841251881Speter apr_pool_t *pool); 3842251881Speter 3843251881Speter/** 3844251881Speter * Similar to svn_client_merge4(), but with @a allow_mixed_rev set to 3845251881Speter * @c TRUE. The @a force parameter maps to the @c force_delete parameter 3846251881Speter * of svn_client_merge4(). 3847251881Speter * 3848251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 3849251881Speter * 3850251881Speter * @since New in 1.5. 3851251881Speter */ 3852251881SpeterSVN_DEPRECATED 3853251881Spetersvn_error_t * 3854251881Spetersvn_client_merge3(const char *source1, 3855251881Speter const svn_opt_revision_t *revision1, 3856251881Speter const char *source2, 3857251881Speter const svn_opt_revision_t *revision2, 3858251881Speter const char *target_wcpath, 3859251881Speter svn_depth_t depth, 3860251881Speter svn_boolean_t ignore_ancestry, 3861251881Speter svn_boolean_t force, 3862251881Speter svn_boolean_t record_only, 3863251881Speter svn_boolean_t dry_run, 3864251881Speter const apr_array_header_t *merge_options, 3865251881Speter svn_client_ctx_t *ctx, 3866251881Speter apr_pool_t *pool); 3867251881Speter 3868251881Speter/** 3869251881Speter * Similar to svn_client_merge3(), but with @a record_only set to @c 3870251881Speter * FALSE, and @a depth set according to @a recurse: if @a recurse is 3871251881Speter * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 3872251881Speter * FALSE, set @a depth to #svn_depth_files. 3873251881Speter * 3874251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3875251881Speter * 3876251881Speter * @since New in 1.4. 3877251881Speter */ 3878251881SpeterSVN_DEPRECATED 3879251881Spetersvn_error_t * 3880251881Spetersvn_client_merge2(const char *source1, 3881251881Speter const svn_opt_revision_t *revision1, 3882251881Speter const char *source2, 3883251881Speter const svn_opt_revision_t *revision2, 3884251881Speter const char *target_wcpath, 3885251881Speter svn_boolean_t recurse, 3886251881Speter svn_boolean_t ignore_ancestry, 3887251881Speter svn_boolean_t force, 3888251881Speter svn_boolean_t dry_run, 3889251881Speter const apr_array_header_t *merge_options, 3890251881Speter svn_client_ctx_t *ctx, 3891251881Speter apr_pool_t *pool); 3892251881Speter 3893251881Speter 3894251881Speter/** 3895251881Speter * Similar to svn_client_merge2(), but with @a merge_options set to NULL. 3896251881Speter * 3897251881Speter * @deprecated Provided for backwards compatibility with the 1.3 API. 3898251881Speter */ 3899251881SpeterSVN_DEPRECATED 3900251881Spetersvn_error_t * 3901251881Spetersvn_client_merge(const char *source1, 3902251881Speter const svn_opt_revision_t *revision1, 3903251881Speter const char *source2, 3904251881Speter const svn_opt_revision_t *revision2, 3905251881Speter const char *target_wcpath, 3906251881Speter svn_boolean_t recurse, 3907251881Speter svn_boolean_t ignore_ancestry, 3908251881Speter svn_boolean_t force, 3909251881Speter svn_boolean_t dry_run, 3910251881Speter svn_client_ctx_t *ctx, 3911251881Speter apr_pool_t *pool); 3912251881Speter 3913251881Speter 3914251881Speter/** 3915251881Speter * Perform a reintegration merge of @a source_path_or_url at @a source_peg_revision 3916251881Speter * into @a target_wcpath. 3917251881Speter * @a target_wcpath must be a single-revision, #svn_depth_infinity, 3918251881Speter * pristine, unswitched working copy -- in other words, it must 3919251881Speter * reflect a single revision tree, the "target". The mergeinfo on @a 3920251881Speter * source_path_or_url must reflect that all of the target has been merged into it. 3921251881Speter * Then this behaves like a merge with svn_client_merge5() from the 3922251881Speter * target's URL to the source. 3923251881Speter * 3924251881Speter * All other options are handled identically to svn_client_merge5(). 3925251881Speter * The depth of the merge is always #svn_depth_infinity. 3926251881Speter * 3927251881Speter * @since New in 1.5. 3928251881Speter * @deprecated Provided for backwards compatibility with the 1.7 API. 3929251881Speter */ 3930251881SpeterSVN_DEPRECATED 3931251881Spetersvn_error_t * 3932251881Spetersvn_client_merge_reintegrate(const char *source_path_or_url, 3933251881Speter const svn_opt_revision_t *source_peg_revision, 3934251881Speter const char *target_wcpath, 3935251881Speter svn_boolean_t dry_run, 3936251881Speter const apr_array_header_t *merge_options, 3937251881Speter svn_client_ctx_t *ctx, 3938251881Speter apr_pool_t *pool); 3939251881Speter 3940251881Speter/** 3941251881Speter * Merge changes from the source branch identified by 3942251881Speter * @a source_path_or_url in peg revision @a source_peg_revision, 3943251881Speter * into the target branch working copy at @a target_wcpath. 3944251881Speter * 3945251881Speter * If @a ranges_to_merge is NULL then perform an automatic merge of 3946251881Speter * all the eligible changes up to @a source_peg_revision. If the merge 3947251881Speter * required is a reintegrate merge, then return an error if the WC has 3948251881Speter * mixed revisions, local modifications and/or switched subtrees; if 3949251881Speter * the merge is determined to be of the non-reintegrate kind, then 3950251881Speter * return an error if @a allow_mixed_rev is false and the WC contains 3951251881Speter * mixed revisions. 3952251881Speter * 3953251881Speter * If @a ranges_to_merge is not NULL then merge the changes specified 3954251881Speter * by the revision ranges in @a ranges_to_merge, or, when honouring 3955251881Speter * mergeinfo, only the eligible parts of those revision ranges. 3956251881Speter * @a ranges_to_merge is an array of <tt>svn_opt_revision_range_t 3957251881Speter * *</tt> ranges. These ranges may describe additive and/or 3958251881Speter * subtractive merge ranges, they may overlap fully or partially, 3959251881Speter * and/or they may partially or fully negate each other. This 3960251881Speter * rangelist is not required to be sorted. If any revision in the 3961251881Speter * list of provided ranges has an `unspecified' or unrecognized 3962251881Speter * `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 3963251881Speter * 3964251881Speter * If @a ranges_to_merge is an empty array, then do nothing. 3965251881Speter * 3966251881Speter * All other options are handled identically to svn_client_merge5(). 3967251881Speter * 3968251881Speter * @since New in 1.8. 3969251881Speter */ 3970251881Spetersvn_error_t * 3971251881Spetersvn_client_merge_peg5(const char *source_path_or_url, 3972251881Speter const apr_array_header_t *ranges_to_merge, 3973251881Speter const svn_opt_revision_t *source_peg_revision, 3974251881Speter const char *target_wcpath, 3975251881Speter svn_depth_t depth, 3976251881Speter svn_boolean_t ignore_mergeinfo, 3977251881Speter svn_boolean_t diff_ignore_ancestry, 3978251881Speter svn_boolean_t force_delete, 3979251881Speter svn_boolean_t record_only, 3980251881Speter svn_boolean_t dry_run, 3981251881Speter svn_boolean_t allow_mixed_rev, 3982251881Speter const apr_array_header_t *merge_options, 3983251881Speter svn_client_ctx_t *ctx, 3984251881Speter apr_pool_t *pool); 3985251881Speter 3986251881Speter/** 3987251881Speter * Similar to svn_client_merge_peg5(), but automatic merge is not available 3988251881Speter * (@a ranges_to_merge must not be NULL), and the single @a ignore_ancestry 3989251881Speter * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry. 3990251881Speter * 3991251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 3992251881Speter * @since New in 1.7. 3993251881Speter */ 3994251881SpeterSVN_DEPRECATED 3995251881Spetersvn_error_t * 3996251881Spetersvn_client_merge_peg4(const char *source_path_or_url, 3997251881Speter const apr_array_header_t *ranges_to_merge, 3998251881Speter const svn_opt_revision_t *source_peg_revision, 3999251881Speter const char *target_wcpath, 4000251881Speter svn_depth_t depth, 4001251881Speter svn_boolean_t ignore_ancestry, 4002251881Speter svn_boolean_t force_delete, 4003251881Speter svn_boolean_t record_only, 4004251881Speter svn_boolean_t dry_run, 4005251881Speter svn_boolean_t allow_mixed_rev, 4006251881Speter const apr_array_header_t *merge_options, 4007251881Speter svn_client_ctx_t *ctx, 4008251881Speter apr_pool_t *pool); 4009251881Speter 4010251881Speter/** 4011251881Speter * Similar to svn_client_merge_peg4(), but with @a allow_mixed_rev set to 4012251881Speter * @c TRUE. The @a force parameter maps to the @c force_delete parameter 4013251881Speter * of svn_client_merge_peg4(). 4014251881Speter * 4015251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 4016251881Speter * 4017251881Speter * @since New in 1.5. 4018251881Speter */ 4019251881SpeterSVN_DEPRECATED 4020251881Spetersvn_error_t * 4021251881Spetersvn_client_merge_peg3(const char *source, 4022251881Speter const apr_array_header_t *ranges_to_merge, 4023251881Speter const svn_opt_revision_t *peg_revision, 4024251881Speter const char *target_wcpath, 4025251881Speter svn_depth_t depth, 4026251881Speter svn_boolean_t ignore_ancestry, 4027251881Speter svn_boolean_t force, 4028251881Speter svn_boolean_t record_only, 4029251881Speter svn_boolean_t dry_run, 4030251881Speter const apr_array_header_t *merge_options, 4031251881Speter svn_client_ctx_t *ctx, 4032251881Speter apr_pool_t *pool); 4033251881Speter 4034251881Speter/** 4035251881Speter * Similar to svn_client_merge_peg3(), but with @a record_only set to 4036251881Speter * @c FALSE, and @a depth set according to @a recurse: if @a recurse 4037251881Speter * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 4038251881Speter * FALSE, set @a depth to #svn_depth_files. 4039251881Speter * 4040251881Speter * @deprecated Provided for backwards compatibility with the 1.4 API. 4041251881Speter * 4042251881Speter * @since New in 1.4. 4043251881Speter */ 4044251881SpeterSVN_DEPRECATED 4045251881Spetersvn_error_t * 4046251881Spetersvn_client_merge_peg2(const char *source, 4047251881Speter const svn_opt_revision_t *revision1, 4048251881Speter const svn_opt_revision_t *revision2, 4049251881Speter const svn_opt_revision_t *peg_revision, 4050251881Speter const char *target_wcpath, 4051251881Speter svn_boolean_t recurse, 4052251881Speter svn_boolean_t ignore_ancestry, 4053251881Speter svn_boolean_t force, 4054251881Speter svn_boolean_t dry_run, 4055251881Speter const apr_array_header_t *merge_options, 4056251881Speter svn_client_ctx_t *ctx, 4057251881Speter apr_pool_t *pool); 4058251881Speter 4059251881Speter/** 4060251881Speter * Similar to svn_client_merge_peg2(), but with @a merge_options set to 4061251881Speter * NULL. 4062251881Speter * 4063251881Speter * @deprecated Provided for backwards compatibility with the 1.3 API. 4064251881Speter * 4065251881Speter * @since New in 1.1. 4066251881Speter */ 4067251881SpeterSVN_DEPRECATED 4068251881Spetersvn_error_t * 4069251881Spetersvn_client_merge_peg(const char *source, 4070251881Speter const svn_opt_revision_t *revision1, 4071251881Speter const svn_opt_revision_t *revision2, 4072251881Speter const svn_opt_revision_t *peg_revision, 4073251881Speter const char *target_wcpath, 4074251881Speter svn_boolean_t recurse, 4075251881Speter svn_boolean_t ignore_ancestry, 4076251881Speter svn_boolean_t force, 4077251881Speter svn_boolean_t dry_run, 4078251881Speter svn_client_ctx_t *ctx, 4079251881Speter apr_pool_t *pool); 4080251881Speter 4081251881Speter 4082251881Speter/** Set @a suggestions to an ordered array of @c const char * 4083251881Speter * potential merge sources (expressed as full repository URLs) for @a 4084251881Speter * path_or_url at @a peg_revision. @a path_or_url is a working copy 4085251881Speter * path or repository URL. @a ctx is a context used for 4086251881Speter * authentication in the repository case. Use @a pool for all 4087251881Speter * allocations. 4088251881Speter * 4089251881Speter * @since New in 1.5. 4090251881Speter */ 4091251881Spetersvn_error_t * 4092251881Spetersvn_client_suggest_merge_sources(apr_array_header_t **suggestions, 4093251881Speter const char *path_or_url, 4094251881Speter const svn_opt_revision_t *peg_revision, 4095251881Speter svn_client_ctx_t *ctx, 4096251881Speter apr_pool_t *pool); 4097251881Speter 4098251881Speter 4099251881Speter/** 4100251881Speter * Get the mergeinfo for a single target node (ignoring any subtrees). 4101251881Speter * 4102251881Speter * Set @a *mergeinfo to a hash mapping <tt>const char *</tt> merge source 4103251881Speter * URLs to <tt>svn_rangelist_t *</tt> rangelists describing the ranges which 4104251881Speter * have been merged into @a path_or_url as of @a peg_revision, per 4105251881Speter * @a path_or_url's explicit mergeinfo or inherited mergeinfo if no 4106251881Speter * explicit mergeinfo if found. If no explicit or inherited mergeinfo 4107251881Speter * is found, then set @a *mergeinfo to NULL. 4108251881Speter * 4109251881Speter * Use @a pool for all necessary allocations. 4110251881Speter * 4111251881Speter * If the server doesn't support retrieval of mergeinfo (which will 4112251881Speter * never happen for file:// URLs), return an 4113251881Speter * #SVN_ERR_UNSUPPORTED_FEATURE error. 4114251881Speter * 4115251881Speter * @note Unlike most APIs which deal with mergeinfo, this one returns 4116251881Speter * data where the keys of the hash are absolute repository URLs rather 4117251881Speter * than repository filesystem paths. 4118251881Speter * 4119251881Speter * @since New in 1.5. 4120251881Speter */ 4121251881Spetersvn_error_t * 4122251881Spetersvn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo, 4123251881Speter const char *path_or_url, 4124251881Speter const svn_opt_revision_t *peg_revision, 4125251881Speter svn_client_ctx_t *ctx, 4126251881Speter apr_pool_t *pool); 4127251881Speter 4128251881Speter 4129251881Speter/** 4130251881Speter * Describe the revisions that either have or have not been merged from 4131251881Speter * one source branch (or subtree) into another. 4132251881Speter * 4133251881Speter * If @a finding_merged is TRUE, then drive log entry callbacks 4134251881Speter * @a receiver / @a receiver_baton with the revisions merged from 4135251881Speter * @a source_path_or_url (as of @a source_peg_revision) into 4136251881Speter * @a target_path_or_url (as of @a target_peg_revision). If @a 4137251881Speter * finding_merged is FALSE then find the revisions eligible for merging. 4138251881Speter * 4139251881Speter * If both @a source_start_revision and @a source_end_revision are 4140251881Speter * unspecified (that is, of kind @c svn_opt_revision_unspecified), 4141251881Speter * @a receiver will be called the requested revisions from 0 to 4142251881Speter * @a source_peg_revision and in that order (that is, oldest to 4143251881Speter * youngest). Otherwise, both @a source_start_revision and 4144251881Speter * @a source_end_revision must be specified, which has two effects: 4145251881Speter * 4146251881Speter * - @a receiver will be called only with revisions which fall 4147251881Speter * within range of @a source_start_revision to 4148251881Speter * @a source_end_revision, inclusive, and 4149251881Speter * 4150251881Speter * - those revisions will be ordered in the same "direction" as the 4151251881Speter * walk from @a source_start_revision to @a source_end_revision. 4152251881Speter * (If @a source_start_revision is the younger of the two, @a 4153251881Speter * receiver will be called with revisions in youngest-to-oldest 4154251881Speter * order; otherwise, the reverse occurs.) 4155251881Speter * 4156251881Speter * If @a depth is #svn_depth_empty consider only the explicit or 4157251881Speter * inherited mergeinfo on @a target_path_or_url when calculating merged 4158251881Speter * revisions from @a source_path_or_url. If @a depth is #svn_depth_infinity 4159251881Speter * then also consider the explicit subtree mergeinfo under @a 4160251881Speter * target_path_or_url. 4161251881Speter * If a depth other than #svn_depth_empty or #svn_depth_infinity is 4162251881Speter * requested then return a #SVN_ERR_UNSUPPORTED_FEATURE error. 4163251881Speter * 4164289180Speter * In addition to the behavior of @a discover_changed_paths described in 4165289180Speter * svn_client_log5(), if set to TRUE it enables detection of sub-tree 4166289180Speter * merges that are complete but can't be detected as complete without 4167289180Speter * access to the changed paths. Sub-tree merges detected as complete will 4168289180Speter * be included if @a finding_merged is TRUE or filtered if @a finding_merged 4169289180Speter * is FALSE. 4170251881Speter * 4171289180Speter * @a revprops is the same as for svn_client_log5(). Use @a scratch_pool for 4172289180Speter * all temporary allocations. 4173289180Speter * 4174251881Speter * @a ctx is a context used for authentication. 4175251881Speter * 4176251881Speter * If the server doesn't support retrieval of mergeinfo, return an 4177251881Speter * #SVN_ERR_UNSUPPORTED_FEATURE error. 4178251881Speter * 4179251881Speter * @since New in 1.8. 4180251881Speter */ 4181251881Spetersvn_error_t * 4182251881Spetersvn_client_mergeinfo_log2(svn_boolean_t finding_merged, 4183251881Speter const char *target_path_or_url, 4184251881Speter const svn_opt_revision_t *target_peg_revision, 4185251881Speter const char *source_path_or_url, 4186251881Speter const svn_opt_revision_t *source_peg_revision, 4187251881Speter const svn_opt_revision_t *source_start_revision, 4188251881Speter const svn_opt_revision_t *source_end_revision, 4189251881Speter svn_log_entry_receiver_t receiver, 4190251881Speter void *receiver_baton, 4191251881Speter svn_boolean_t discover_changed_paths, 4192251881Speter svn_depth_t depth, 4193251881Speter const apr_array_header_t *revprops, 4194251881Speter svn_client_ctx_t *ctx, 4195251881Speter apr_pool_t *scratch_pool); 4196251881Speter 4197251881Speter/** 4198251881Speter * Similar to svn_client_mergeinfo_log2(), but with @a source_start_revision 4199251881Speter * and @a source_end_revision always of kind @c svn_opt_revision_unspecified; 4200251881Speter * 4201251881Speter * @deprecated Provided for backwards compatibility with the 1.7 API. 4202251881Speter * @since New in 1.7. 4203251881Speter */ 4204251881SpeterSVN_DEPRECATED 4205251881Spetersvn_error_t * 4206251881Spetersvn_client_mergeinfo_log(svn_boolean_t finding_merged, 4207251881Speter const char *target_path_or_url, 4208251881Speter const svn_opt_revision_t *target_peg_revision, 4209251881Speter const char *source_path_or_url, 4210251881Speter const svn_opt_revision_t *source_peg_revision, 4211251881Speter svn_log_entry_receiver_t receiver, 4212251881Speter void *receiver_baton, 4213251881Speter svn_boolean_t discover_changed_paths, 4214251881Speter svn_depth_t depth, 4215251881Speter const apr_array_header_t *revprops, 4216251881Speter svn_client_ctx_t *ctx, 4217251881Speter apr_pool_t *scratch_pool); 4218251881Speter 4219251881Speter/** 4220251881Speter * Similar to svn_client_mergeinfo_log(), but finds only merged revisions 4221251881Speter * and always operates at @a depth #svn_depth_empty. 4222251881Speter * 4223251881Speter * @deprecated Provided for backwards compatibility with the 1.6 API. Use 4224251881Speter * svn_client_mergeinfo_log() instead. 4225251881Speter * @since New in 1.5. 4226251881Speter */ 4227251881SpeterSVN_DEPRECATED 4228251881Spetersvn_error_t * 4229251881Spetersvn_client_mergeinfo_log_merged(const char *path_or_url, 4230251881Speter const svn_opt_revision_t *peg_revision, 4231251881Speter const char *merge_source_path_or_url, 4232251881Speter const svn_opt_revision_t *src_peg_revision, 4233251881Speter svn_log_entry_receiver_t receiver, 4234251881Speter void *receiver_baton, 4235251881Speter svn_boolean_t discover_changed_paths, 4236251881Speter const apr_array_header_t *revprops, 4237251881Speter svn_client_ctx_t *ctx, 4238251881Speter apr_pool_t *pool); 4239251881Speter 4240251881Speter/** 4241251881Speter * Similar to svn_client_mergeinfo_log(), but finds only eligible revisions 4242251881Speter * and always operates at @a depth #svn_depth_empty. 4243251881Speter * 4244251881Speter * @deprecated Provided for backwards compatibility with the 1.6 API. Use 4245251881Speter * svn_client_mergeinfo_log() instead. 4246251881Speter * @since New in 1.5. 4247251881Speter */ 4248251881SpeterSVN_DEPRECATED 4249251881Spetersvn_error_t * 4250251881Spetersvn_client_mergeinfo_log_eligible(const char *path_or_url, 4251251881Speter const svn_opt_revision_t *peg_revision, 4252251881Speter const char *merge_source_path_or_url, 4253251881Speter const svn_opt_revision_t *src_peg_revision, 4254251881Speter svn_log_entry_receiver_t receiver, 4255251881Speter void *receiver_baton, 4256251881Speter svn_boolean_t discover_changed_paths, 4257251881Speter const apr_array_header_t *revprops, 4258251881Speter svn_client_ctx_t *ctx, 4259251881Speter apr_pool_t *pool); 4260251881Speter 4261251881Speter/** @} */ 4262251881Speter 4263251881Speter/** 4264251881Speter * @defgroup Cleanup Cleanup an abnormally terminated working copy. 4265251881Speter * 4266251881Speter * @{ 4267251881Speter */ 4268251881Speter 4269298845Sdim/** Recursively vacuum a working copy directory @a dir_abspath, 4270298845Sdim * removing unnecessary data. 4271289180Speter * 4272289180Speter * If @a include_externals is @c TRUE, recurse into externals and vacuum them 4273289180Speter * as well. 4274289180Speter * 4275289180Speter * If @a remove_unversioned_items is @c TRUE, remove unversioned items 4276298845Sdim * in @a dir_abspath after successful working copy cleanup. 4277289180Speter * If @a remove_ignored_items is @c TRUE, remove ignored unversioned items 4278298845Sdim * in @a dir_abspath after successful working copy cleanup. 4279289180Speter * 4280289180Speter * If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded 4281289180Speter * timestamps for unmodified files in the working copy, reducing comparision 4282289180Speter * time on future checks. 4283289180Speter * 4284289180Speter * If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working 4285289180Speter * copy root unreferenced files in the pristine store are removed. 4286289180Speter * 4287289180Speter * When asked to remove unversioned or ignored items, and the working copy 4288289180Speter * is already locked, return #SVN_ERR_WC_LOCKED. This prevents accidental 4289289180Speter * working copy corruption in case users run the cleanup operation to 4290289180Speter * remove unversioned items while another client is performing some other 4291289180Speter * operation on the working copy. 4292289180Speter * 4293289180Speter * If @a ctx->cancel_func is non-NULL, invoke it with @a 4294289180Speter * ctx->cancel_baton at various points during the operation. If it 4295289180Speter * returns an error (typically #SVN_ERR_CANCELLED), return that error 4296289180Speter * immediately. 4297289180Speter * 4298289180Speter * Use @a scratch_pool for any temporary allocations. 4299289180Speter * 4300289180Speter * @since New in 1.9. 4301289180Speter */ 4302289180Spetersvn_error_t * 4303289180Spetersvn_client_vacuum(const char *dir_abspath, 4304289180Speter svn_boolean_t remove_unversioned_items, 4305289180Speter svn_boolean_t remove_ignored_items, 4306289180Speter svn_boolean_t fix_recorded_timestamps, 4307289180Speter svn_boolean_t vacuum_pristines, 4308289180Speter svn_boolean_t include_externals, 4309289180Speter svn_client_ctx_t *ctx, 4310289180Speter apr_pool_t *scratch_pool); 4311289180Speter 4312289180Speter 4313289180Speter/** Recursively cleanup a working copy directory @a dir_abspath, finishing any 4314251881Speter * incomplete operations, removing lockfiles, etc. 4315251881Speter * 4316289180Speter * If @a break_locks is @c TRUE, existing working copy locks at or below @a 4317289180Speter * dir_abspath are broken, otherwise a normal write lock is obtained. 4318289180Speter * 4319289180Speter * If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded 4320289180Speter * timestamps for unmodified files in the working copy, reducing comparision 4321289180Speter * time on future checks. 4322289180Speter * 4323289180Speter * If @a clear_dav_cache is @c TRUE, the caching of DAV information for older 4324289180Speter * mod_dav served repositories is cleared. This clearing invalidates some 4325289180Speter * cached information used for pre-HTTPv2 repositories. 4326289180Speter * 4327289180Speter * If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working 4328289180Speter * copy root unreferenced files in the pristine store are removed. 4329289180Speter * 4330289180Speter * If @a include_externals is @c TRUE, recurse into externals and clean 4331289180Speter * them up as well. 4332289180Speter * 4333251881Speter * If @a ctx->cancel_func is non-NULL, invoke it with @a 4334251881Speter * ctx->cancel_baton at various points during the operation. If it 4335251881Speter * returns an error (typically #SVN_ERR_CANCELLED), return that error 4336251881Speter * immediately. 4337251881Speter * 4338251881Speter * Use @a scratch_pool for any temporary allocations. 4339289180Speter * 4340289180Speter * @since New in 1.9. 4341251881Speter */ 4342251881Spetersvn_error_t * 4343289180Spetersvn_client_cleanup2(const char *dir_abspath, 4344289180Speter svn_boolean_t break_locks, 4345289180Speter svn_boolean_t fix_recorded_timestamps, 4346289180Speter svn_boolean_t clear_dav_cache, 4347289180Speter svn_boolean_t vacuum_pristines, 4348289180Speter svn_boolean_t include_externals, 4349289180Speter svn_client_ctx_t *ctx, 4350289180Speter apr_pool_t *scratch_pool); 4351289180Speter 4352289180Speter/** Like svn_client_cleanup2(), but no support for not breaking locks and 4353289180Speter * cleaning up externals and using a potentially non absolute path. 4354289180Speter * 4355289180Speter * @deprecated Provided for limited backwards compatibility with the 1.8 API. 4356289180Speter */ 4357289180SpeterSVN_DEPRECATED 4358289180Spetersvn_error_t * 4359251881Spetersvn_client_cleanup(const char *dir, 4360251881Speter svn_client_ctx_t *ctx, 4361251881Speter apr_pool_t *scratch_pool); 4362251881Speter 4363251881Speter 4364251881Speter/** @} */ 4365251881Speter 4366251881Speter/** 4367251881Speter * @defgroup Upgrade Upgrade a working copy. 4368251881Speter * 4369251881Speter * @{ 4370251881Speter */ 4371251881Speter 4372251881Speter/** Recursively upgrade a working copy from any older format to the current 4373251881Speter * WC metadata storage format. @a wcroot_dir is the path to the WC root. 4374251881Speter * 4375251881Speter * Use @a scratch_pool for any temporary allocations. 4376251881Speter * 4377251881Speter * @since New in 1.7. 4378251881Speter */ 4379251881Spetersvn_error_t * 4380251881Spetersvn_client_upgrade(const char *wcroot_dir, 4381251881Speter svn_client_ctx_t *ctx, 4382251881Speter apr_pool_t *scratch_pool); 4383251881Speter 4384251881Speter 4385251881Speter/** @} */ 4386251881Speter 4387251881Speter/** 4388251881Speter * @defgroup Relocate Switch a working copy to a different repository. 4389251881Speter * 4390251881Speter * @{ 4391251881Speter */ 4392251881Speter 4393251881Speter/** 4394251881Speter * Recursively modify a working copy rooted at @a wcroot_dir, changing 4395251881Speter * any repository URLs that begin with @a from_prefix to begin with @a 4396251881Speter * to_prefix instead. 4397251881Speter * 4398251881Speter * @param wcroot_dir Working copy root directory 4399251881Speter * @param from_prefix Original URL 4400251881Speter * @param to_prefix New URL 4401251881Speter * @param ignore_externals If not set, recurse into external working 4402251881Speter * copies after relocating the primary working copy 4403251881Speter * @param ctx svn_client_ctx_t 4404251881Speter * @param pool The pool from which to perform memory allocations 4405251881Speter * 4406251881Speter * @since New in 1.7 4407251881Speter */ 4408251881Spetersvn_error_t * 4409251881Spetersvn_client_relocate2(const char *wcroot_dir, 4410251881Speter const char *from_prefix, 4411251881Speter const char *to_prefix, 4412251881Speter svn_boolean_t ignore_externals, 4413251881Speter svn_client_ctx_t *ctx, 4414251881Speter apr_pool_t *pool); 4415251881Speter 4416251881Speter/** 4417251881Speter * Similar to svn_client_relocate2(), but with @a ignore_externals 4418251881Speter * always TRUE. 4419251881Speter * 4420251881Speter * @note As of the 1.7 API, @a dir is required to be a working copy 4421251881Speter * root directory, and @a recurse is required to be TRUE. 4422251881Speter * 4423251881Speter * @deprecated Provided for limited backwards compatibility with the 4424251881Speter * 1.6 API. 4425251881Speter */ 4426251881SpeterSVN_DEPRECATED 4427251881Spetersvn_error_t * 4428251881Spetersvn_client_relocate(const char *dir, 4429251881Speter const char *from_prefix, 4430251881Speter const char *to_prefix, 4431251881Speter svn_boolean_t recurse, 4432251881Speter svn_client_ctx_t *ctx, 4433251881Speter apr_pool_t *pool); 4434251881Speter 4435251881Speter/** @} */ 4436251881Speter 4437251881Speter/** 4438251881Speter * @defgroup Revert Remove local changes in a repository. 4439251881Speter * 4440251881Speter * @{ 4441251881Speter */ 4442251881Speter 4443251881Speter/** 4444251881Speter * Restore the pristine version of working copy @a paths, 4445362181Sdim * effectively undoing any local mods. This means returning each 4446362181Sdim * path's versioned status to 'unmodified' and changing its on-disk 4447362181Sdim * state to match that. 4448251881Speter * 4449362181Sdim * If an item was in a state of conflict, reverting also marks the 4450362181Sdim * conflict as resolved. If there are conflict marker files attached 4451362181Sdim * to the item, these are removed. 4452362181Sdim * 4453251881Speter * @a paths is an array of (const char *) local WC paths. 4454251881Speter * 4455362181Sdim * For each path in @a paths, revert it if it is a file. Else if it is 4456362181Sdim * a directory, revert according to @a depth: 4457362181Sdim * If @a depth is #svn_depth_empty, revert just 4458362181Sdim * the directory; else if #svn_depth_files, revert the directory 4459251881Speter * and any files immediately under the directory; else if 4460251881Speter * #svn_depth_immediates, revert all of the preceding plus 4461362181Sdim * immediate subdirectories; else if #svn_depth_infinity, 4462251881Speter * revert path and everything under it fully recursively. 4463251881Speter * 4464251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 4465251881Speter * names, used as a restrictive filter on items reverted; that is, 4466251881Speter * don't revert any item unless it's a member of one of those 4467251881Speter * changelists. If @a changelists is empty (or altogether @c NULL), 4468251881Speter * no changelist filtering occurs. 4469251881Speter * 4470289180Speter * If @a clear_changelists is TRUE, then changelist information for the 4471289180Speter * paths is cleared while reverting. 4472289180Speter * 4473362181Sdim * The @a metadata_only and @a added_keep_local options control the 4474362181Sdim * extent of reverting. If @a metadata_only is TRUE, the working copy 4475362181Sdim * files are untouched, but if there are conflict marker files attached 4476362181Sdim * to these files these markers are removed. Otherwise, if 4477362181Sdim * @a added_keep_local is TRUE, then all items are reverted except an 4478362181Sdim * item that was scheduled as plain 'add' (not a copy) will not be 4479362181Sdim * removed from the working copy. Otherwise, all items are reverted and 4480362181Sdim * their on-disk state changed to match. 4481289180Speter * 4482362181Sdim * Consult the @c SVN_CONFIG_OPTION_USE_COMMIT_TIMES option in @a ctx to 4483362181Sdim * determine whether or not to revert timestamp to the time of last 4484362181Sdim * commit ('use-commit-times = yes'). 4485362181Sdim * 4486251881Speter * If @a ctx->notify_func2 is non-NULL, then for each item reverted, 4487251881Speter * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of 4488251881Speter * the reverted item. 4489251881Speter * 4490251881Speter * If an item specified for reversion is not under version control, 4491251881Speter * then do not error, just invoke @a ctx->notify_func2 with @a 4492251881Speter * ctx->notify_baton2, using notification code #svn_wc_notify_skip. 4493251881Speter * 4494362181Sdim * @warning The 'revert' command intentionally and permanently loses 4495362181Sdim * local modifications. 4496362181Sdim * 4497362181Sdim * @since New in 1.11. 4498362181Sdim */ 4499362181Sdimsvn_error_t * 4500362181Sdimsvn_client_revert4(const apr_array_header_t *paths, 4501362181Sdim svn_depth_t depth, 4502362181Sdim const apr_array_header_t *changelists, 4503362181Sdim svn_boolean_t clear_changelists, 4504362181Sdim svn_boolean_t metadata_only, 4505362181Sdim svn_boolean_t added_keep_local, 4506362181Sdim svn_client_ctx_t *ctx, 4507362181Sdim apr_pool_t *scratch_pool); 4508362181Sdim 4509362181Sdim/** Similar to svn_client_revert4(), but with @a added_keep_local set to 4510362181Sdim * TRUE. 4511362181Sdim * 4512289180Speter * @since New in 1.9. 4513362181Sdim * @deprecated Provided for backwards compatibility with the 1.10 API. 4514289180Speter */ 4515362181SdimSVN_DEPRECATED 4516289180Spetersvn_error_t * 4517289180Spetersvn_client_revert3(const apr_array_header_t *paths, 4518289180Speter svn_depth_t depth, 4519289180Speter const apr_array_header_t *changelists, 4520289180Speter svn_boolean_t clear_changelists, 4521289180Speter svn_boolean_t metadata_only, 4522289180Speter svn_client_ctx_t *ctx, 4523289180Speter apr_pool_t *pool); 4524289180Speter 4525289180Speter/** Similar to svn_client_revert2, but with @a clear_changelists set to 4526289180Speter * FALSE and @a metadata_only set to FALSE. 4527289180Speter * 4528251881Speter * @since New in 1.5. 4529289180Speter * @deprecated Provided for backwards compatibility with the 1.8 API. 4530251881Speter */ 4531289180SpeterSVN_DEPRECATED 4532251881Spetersvn_error_t * 4533251881Spetersvn_client_revert2(const apr_array_header_t *paths, 4534251881Speter svn_depth_t depth, 4535251881Speter const apr_array_header_t *changelists, 4536251881Speter svn_client_ctx_t *ctx, 4537251881Speter apr_pool_t *pool); 4538251881Speter 4539251881Speter 4540251881Speter/** 4541251881Speter * Similar to svn_client_revert2(), but with @a changelists passed as 4542251881Speter * @c NULL, and @a depth set according to @a recurse: if @a recurse is 4543251881Speter * TRUE, @a depth is #svn_depth_infinity, else if @a recurse is 4544251881Speter * FALSE, @a depth is #svn_depth_empty. 4545251881Speter * 4546251881Speter * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files; 4547251881Speter * revert is deliberately different. 4548251881Speter * 4549289180Speter * @deprecated Provided for backwards compatibility with the 1.4 API. 4550251881Speter */ 4551251881SpeterSVN_DEPRECATED 4552251881Spetersvn_error_t * 4553251881Spetersvn_client_revert(const apr_array_header_t *paths, 4554251881Speter svn_boolean_t recursive, 4555251881Speter svn_client_ctx_t *ctx, 4556251881Speter apr_pool_t *pool); 4557251881Speter 4558251881Speter 4559251881Speter/** @} */ 4560251881Speter 4561251881Speter/** 4562362181Sdim * @defgroup Conflicts Dealing with conflicted paths. 4563362181Sdim * 4564362181Sdim * @{ 4565362181Sdim */ 4566362181Sdim 4567362181Sdim/** 4568362181Sdim * An opaque type which represents a conflicted node in the working copy. 4569362181Sdim * 4570362181Sdim * @since New in 1.10. 4571362181Sdim */ 4572362181Sdimtypedef struct svn_client_conflict_t svn_client_conflict_t; 4573362181Sdim 4574362181Sdim/** 4575362181Sdim * An opaque type which represents a resolution option for a conflict. 4576362181Sdim * 4577362181Sdim * @since New in 1.10. 4578362181Sdim */ 4579362181Sdimtypedef struct svn_client_conflict_option_t svn_client_conflict_option_t; 4580362181Sdim 4581362181Sdim/** 4582362181Sdim * A public enumeration of conflict option IDs. 4583362181Sdim * 4584362181Sdim * @since New in 1.10, unless noted otherwise. 4585362181Sdim */ 4586362181Sdimtypedef enum svn_client_conflict_option_id_t { 4587362181Sdim 4588362181Sdim /* Options for text and property conflicts. 4589362181Sdim * These values intentionally mirror svn_wc_conflict_choice_t. */ 4590362181Sdim svn_client_conflict_option_undefined = -1, /* for private use only */ 4591362181Sdim svn_client_conflict_option_postpone = 0, 4592362181Sdim svn_client_conflict_option_base_text, 4593362181Sdim svn_client_conflict_option_incoming_text, /* "theirs-full" */ 4594362181Sdim svn_client_conflict_option_working_text, /* "mine-full" */ 4595362181Sdim svn_client_conflict_option_incoming_text_where_conflicted, 4596362181Sdim svn_client_conflict_option_working_text_where_conflicted, 4597362181Sdim svn_client_conflict_option_merged_text, 4598362181Sdim svn_client_conflict_option_unspecified, 4599362181Sdim /* Values derived from svn_wc_conflict_choice_t end here. */ 4600362181Sdim 4601362181Sdim /* Tree conflict resolution options start here. */ 4602362181Sdim 4603362181Sdim /* Accept current working copy state. */ 4604362181Sdim svn_client_conflict_option_accept_current_wc_state, 4605362181Sdim 4606362181Sdim /* Options for local move vs incoming edit on update. */ 4607362181Sdim svn_client_conflict_option_update_move_destination, 4608362181Sdim 4609362181Sdim /* Options for local delete/replace vs incoming edit on update. */ 4610362181Sdim svn_client_conflict_option_update_any_moved_away_children, 4611362181Sdim 4612362181Sdim /* Options for incoming add vs local add or obstruction. */ 4613362181Sdim svn_client_conflict_option_incoming_add_ignore, 4614362181Sdim 4615362181Sdim /* Options for incoming file add vs local file add or obstruction. */ 4616362181Sdim svn_client_conflict_option_incoming_added_file_text_merge, 4617362181Sdim svn_client_conflict_option_incoming_added_file_replace_and_merge, 4618362181Sdim 4619362181Sdim /* Options for incoming dir add vs local dir add or obstruction. */ 4620362181Sdim svn_client_conflict_option_incoming_added_dir_merge, 4621362181Sdim svn_client_conflict_option_incoming_added_dir_replace, 4622362181Sdim svn_client_conflict_option_incoming_added_dir_replace_and_merge, 4623362181Sdim 4624362181Sdim /* Options for incoming delete vs any */ 4625362181Sdim svn_client_conflict_option_incoming_delete_ignore, 4626362181Sdim svn_client_conflict_option_incoming_delete_accept, 4627362181Sdim 4628362181Sdim /* Options for incoming move vs local edit */ 4629362181Sdim svn_client_conflict_option_incoming_move_file_text_merge, 4630362181Sdim svn_client_conflict_option_incoming_move_dir_merge, 4631362181Sdim 4632362181Sdim /* Options for local move vs incoming edit on merge. */ 4633362181Sdim svn_client_conflict_option_local_move_file_text_merge, 4634362181Sdim svn_client_conflict_option_local_move_dir_merge, /**< @since New in 1.11. */ 4635362181Sdim 4636362181Sdim /* Options for local missing vs incoming edit on merge. */ 4637362181Sdim svn_client_conflict_option_sibling_move_file_text_merge, /**< @since New in 1.11. */ 4638362181Sdim svn_client_conflict_option_sibling_move_dir_merge, /**< @since New in 1.11. */ 4639362181Sdim 4640362181Sdim /* Options for local move vs incoming move on merge. */ 4641362181Sdim svn_client_conflict_option_both_moved_file_merge, /*< @since New in 1.12 */ 4642362181Sdim svn_client_conflict_option_both_moved_file_move_merge, /*< @since New in 1.12 */ 4643362181Sdim svn_client_conflict_option_both_moved_dir_merge, /*< @since New in 1.12 */ 4644362181Sdim svn_client_conflict_option_both_moved_dir_move_merge, /*< @since New in 1.12 */ 4645362181Sdim} svn_client_conflict_option_id_t; 4646362181Sdim 4647362181Sdim/** 4648362181Sdim * Set a merged property value on @a option to @a merged_propval. 4649362181Sdim * 4650362181Sdim * Setting the merged value is required before resolving the property 4651362181Sdim * conflict using an option with ID svn_client_conflict_option_merged_text. 4652362181Sdim * 4653362181Sdim * The contents of @a merged_propval are not copied, so the storage it 4654362181Sdim * points to needs to remain valid until svn_client_conflict_prop_resolve() 4655362181Sdim * has been called with @a option. 4656362181Sdim * 4657362181Sdim * @since New in 1.10. 4658362181Sdim */ 4659362181Sdimvoid 4660362181Sdimsvn_client_conflict_option_set_merged_propval( 4661362181Sdim svn_client_conflict_option_t *option, 4662362181Sdim const svn_string_t *merged_propval); 4663362181Sdim 4664362181Sdim/** 4665362181Sdim * Get a list of possible repository paths which can be applied to @a option. 4666362181Sdim * 4667362181Sdim * In some situations, there can be multiple possible destinations for a move. 4668362181Sdim * One such situation is where a file was copied and moved in the same revision: 4669362181Sdim * svn cp a b; svn mv a c; svn commit 4670362181Sdim * When this move is merged elsewhere, both b and c will appear as valid move 4671362181Sdim * destinations to the conflict resolver. To resolve such ambiguity, the client 4672362181Sdim * may call this function to obtain a list of possible destinations the user 4673362181Sdim * may choose from. 4674362181Sdim * 4675362181Sdim * @a *possible_moved_to_repos_relpaths is set to NULL if the @a option does 4676362181Sdim * not support multiple move targets. API users may assume that only one option 4677362181Sdim * among those which can be applied to a conflict supports move targets. 4678362181Sdim * 4679362181Sdim * The array is allocated in @a result_pool and will have "const char *" 4680362181Sdim * elements pointing to strings also allocated in @a result_pool. 4681362181Sdim * All paths are relpaths, and relative to the repository root. 4682362181Sdim * 4683362181Sdim * @see svn_client_conflict_option_set_moved_to_repos_relpath2() 4684362181Sdim * @since New in 1.11. 4685362181Sdim */ 4686362181Sdimsvn_error_t * 4687362181Sdimsvn_client_conflict_option_get_moved_to_repos_relpath_candidates2( 4688362181Sdim apr_array_header_t **possible_moved_to_repos_relpaths, 4689362181Sdim svn_client_conflict_option_t *option, 4690362181Sdim apr_pool_t *result_pool, 4691362181Sdim apr_pool_t *scratch_pool); 4692362181Sdim 4693362181Sdim/** 4694362181Sdim * Get a list of possible repository paths which can be applied to the 4695362181Sdim * svn_client_conflict_option_incoming_move_file_text_merge, or the 4696362181Sdim * svn_client_conflict_option_incoming_move_dir_merge resolution @a option. 4697362181Sdim * 4698362181Sdim * In SVN 1.10, if a different option is passed in, this function will 4699362181Sdim * raise an assertion failure. Otherwise this function behaves just like 4700362181Sdim * svn_client_conflict_option_get_moved_to_repos_relpath_candidates2(). 4701362181Sdim * 4702362181Sdim * @since New in 1.10. 4703362181Sdim * @deprecated use svn_client_conflict_option_get_moved_to_repos_relpath_candidates2() 4704362181Sdim */ 4705362181Sdimsvn_error_t * 4706362181Sdimsvn_client_conflict_option_get_moved_to_repos_relpath_candidates( 4707362181Sdim apr_array_header_t **possible_moved_to_repos_relpaths, 4708362181Sdim svn_client_conflict_option_t *option, 4709362181Sdim apr_pool_t *result_pool, 4710362181Sdim apr_pool_t *scratch_pool); 4711362181Sdim 4712362181Sdim/** 4713362181Sdim * Set the preferred moved target repository path. If @a option is not 4714362181Sdim * applicable to a moved target repository path, do nothing. 4715362181Sdim * 4716362181Sdim * @a preferred_move_target_idx must be a valid index into the list returned 4717362181Sdim * by svn_client_conflict_option_get_moved_to_repos_relpath_candidates(). 4718362181Sdim * 4719362181Sdim * This function can be called multiple times. 4720362181Sdim * It affects the output of svn_client_conflict_tree_get_description() and 4721362181Sdim * svn_client_conflict_option_get_description(). Call these functions again 4722362181Sdim * to get updated descriptions containing the newly selected move target. 4723362181Sdim * 4724362181Sdim * @since New in 1.11. 4725362181Sdim */ 4726362181Sdimsvn_error_t * 4727362181Sdimsvn_client_conflict_option_set_moved_to_repos_relpath2( 4728362181Sdim svn_client_conflict_option_t *option, 4729362181Sdim int preferred_move_target_idx, 4730362181Sdim svn_client_ctx_t *ctx, 4731362181Sdim apr_pool_t *scratch_pool); 4732362181Sdim 4733362181Sdim/** 4734362181Sdim * Like svn_client_conflict_option_set_moved_to_repos_relpath2(), except 4735362181Sdim * that in SVN 1.10 it raises an assertion failure if an option other 4736362181Sdim * than svn_client_conflict_option_incoming_move_file_text_merge or 4737362181Sdim * svn_client_conflict_option_incoming_move_dir_merge is passed. 4738362181Sdim * 4739362181Sdim * @since New in 1.10. 4740362181Sdim * @deprecated use svn_client_conflict_option_set_moved_to_repos_relpath2() 4741362181Sdim */ 4742362181Sdimsvn_error_t * 4743362181Sdimsvn_client_conflict_option_set_moved_to_repos_relpath( 4744362181Sdim svn_client_conflict_option_t *option, 4745362181Sdim int preferred_move_target_idx, 4746362181Sdim svn_client_ctx_t *ctx, 4747362181Sdim apr_pool_t *scratch_pool); 4748362181Sdim 4749362181Sdim/** 4750362181Sdim * Get a list of possible moved-to abspaths in the working copy which can be 4751362181Sdim * applied to @a option. 4752362181Sdim * 4753362181Sdim * All working copy paths in the returned list correspond to one repository 4754362181Sdim * path which is be one of the possible destinations of a move operation. 4755362181Sdim * More than one repository-side move target candidate may exist; call 4756362181Sdim * svn_client_conflict_option_get_moved_to_repos_relpath_candidates() before 4757362181Sdim * calling this function to let the user select a repository path first. 4758362181Sdim * Otherwise, one of the repository-side paths will be selected internally. 4759362181Sdim * 4760362181Sdim * @a *possible_moved_to_abspaths is set to NULL if the @a option does not 4761362181Sdim * support multiple move targets. API users may assume that only one option 4762362181Sdim * among those which can be applied to a conflict supports move targets. 4763362181Sdim * 4764362181Sdim * If no possible moved-to paths can be found, return an empty array. 4765362181Sdim * This doesn't mean that no move happened in the repository. It is possible 4766362181Sdim * that the move destination is outside the scope of the current working copy, 4767362181Sdim * for example, in which case the conflict must be resolved in some other way. 4768362181Sdim * 4769362181Sdim * @see svn_client_conflict_option_set_moved_to_abspath2() 4770362181Sdim * @since New in 1.11. 4771362181Sdim */ 4772362181Sdimsvn_error_t * 4773362181Sdimsvn_client_conflict_option_get_moved_to_abspath_candidates2( 4774362181Sdim apr_array_header_t **possible_moved_to_abspaths, 4775362181Sdim svn_client_conflict_option_t *option, 4776362181Sdim apr_pool_t *result_pool, 4777362181Sdim apr_pool_t *scratch_pool); 4778362181Sdim 4779362181Sdim/** 4780362181Sdim * Get a list of possible moved-to abspaths in the working copy which can be 4781362181Sdim * svn_client_conflict_option_incoming_move_file_text_merge, or the 4782362181Sdim * svn_client_conflict_option_incoming_move_dir_merge resolution @a option. 4783362181Sdim * 4784362181Sdim * In SVN 1.10, if a different option is passed in, this function will 4785362181Sdim * raise an assertion failure. Otherwise this function behaves just like 4786362181Sdim * svn_client_conflict_option_get_moved_to_abspath_candidates2(). 4787362181Sdim * 4788362181Sdim * @since New in 1.10. 4789362181Sdim * @deprecated use svn_client_conflict_option_get_moved_to_abspath_candidates2() 4790362181Sdim */ 4791362181Sdimsvn_error_t * 4792362181Sdimsvn_client_conflict_option_get_moved_to_abspath_candidates( 4793362181Sdim apr_array_header_t **possible_moved_to_abspaths, 4794362181Sdim svn_client_conflict_option_t *option, 4795362181Sdim apr_pool_t *result_pool, 4796362181Sdim apr_pool_t *scratch_pool); 4797362181Sdim 4798362181Sdim/** 4799362181Sdim * Set the preferred moved target working copy path. If @a option is not 4800362181Sdim * applicable to a moved target working copy path, do nothing. 4801362181Sdim * 4802362181Sdim * @a preferred_move_target_idx must be a valid index into the list 4803362181Sdim * returned by svn_client_conflict_option_get_moved_to_abspath_candidates2(). 4804362181Sdim * 4805362181Sdim * This function can be called multiple times. 4806362181Sdim * It affects the output of svn_client_conflict_tree_get_description() and 4807362181Sdim * svn_client_conflict_option_get_description(). Call these functions again 4808362181Sdim * to get updated descriptions containing the newly selected move target. 4809362181Sdim * 4810362181Sdim * @since New in 1.11. 4811362181Sdim */ 4812362181Sdimsvn_error_t * 4813362181Sdimsvn_client_conflict_option_set_moved_to_abspath2( 4814362181Sdim svn_client_conflict_option_t *option, 4815362181Sdim int preferred_move_target_idx, 4816362181Sdim svn_client_ctx_t *ctx, 4817362181Sdim apr_pool_t *scratch_pool); 4818362181Sdim 4819362181Sdim/** 4820362181Sdim * Like svn_client_conflict_option_set_moved_to_abspath2(), except that 4821362181Sdim * in SVN 1.10 this function raises an assertion failure if an option 4822362181Sdim * other than svn_client_conflict_option_incoming_move_file_text_merge or 4823362181Sdim * svn_client_conflict_option_incoming_move_dir_merge is passed. 4824362181Sdim * 4825362181Sdim * @since New in 1.10. 4826362181Sdim * @deprecated use svn_client_conflict_option_set_moved_to_abspath2() 4827362181Sdim */ 4828362181Sdimsvn_error_t * 4829362181Sdimsvn_client_conflict_option_set_moved_to_abspath( 4830362181Sdim svn_client_conflict_option_t *option, 4831362181Sdim int preferred_move_target_idx, 4832362181Sdim svn_client_ctx_t *ctx, 4833362181Sdim apr_pool_t *scratch_pool); 4834362181Sdim 4835362181Sdim/** 4836362181Sdim * Given an @a option_id, try to find the corresponding option in @a options, 4837362181Sdim * which is an array of svn_client_conflict_option_t * elements. 4838362181Sdim * 4839362181Sdim * Return NULL if no corresponding option can be be found. 4840362181Sdim * 4841362181Sdim * @since New in 1.10. 4842362181Sdim */ 4843362181Sdimsvn_client_conflict_option_t * 4844362181Sdimsvn_client_conflict_option_find_by_id( 4845362181Sdim apr_array_header_t *options, 4846362181Sdim svn_client_conflict_option_id_t option_id); 4847362181Sdim 4848362181Sdim/** 4849362181Sdim * Return a conflict for the conflicted path @a local_abspath. 4850362181Sdim * 4851362181Sdim * @since New in 1.10. 4852362181Sdim */ 4853362181Sdimsvn_error_t * 4854362181Sdimsvn_client_conflict_get(svn_client_conflict_t **conflict, 4855362181Sdim const char *local_abspath, 4856362181Sdim svn_client_ctx_t *ctx, 4857362181Sdim apr_pool_t *result_pool, 4858362181Sdim apr_pool_t *scratch_pool); 4859362181Sdim 4860362181Sdim/** 4861362181Sdim * Callback for svn_client_conflict_conflict_walk(); 4862362181Sdim * 4863362181Sdim * The lifetime of @a conflict is limited. Its allocation in 4864362181Sdim * memory will not persist beyond this callback's execution. 4865362181Sdim * 4866362181Sdim * @since New in 1.10. 4867362181Sdim */ 4868362181Sdimtypedef svn_error_t *(*svn_client_conflict_walk_func_t)( 4869362181Sdim void *baton, 4870362181Sdim svn_client_conflict_t *conflict, 4871362181Sdim apr_pool_t *scratch_pool); 4872362181Sdim 4873362181Sdim/** 4874362181Sdim * Walk all conflicts within the specified @a depth of @a local_abspath. 4875362181Sdim * Pass each conflict found during the walk to the @a conflict_walk_func 4876362181Sdim * callback, along with @a conflict_walk_func_baton. 4877362181Sdim * Use cancellation and notification support provided by client context @a ctx. 4878362181Sdim * 4879362181Sdim * This callback may choose to resolve the conflict. If the act of resolving 4880362181Sdim * a conflict creates new conflicts within the walked working copy (as might 4881362181Sdim * be the case for some tree conflicts), the callback will be invoked for each 4882362181Sdim * such new conflict as well. 4883362181Sdim * 4884362181Sdim * @since New in 1.10. 4885362181Sdim */ 4886362181Sdimsvn_error_t * 4887362181Sdimsvn_client_conflict_walk(const char *local_abspath, 4888362181Sdim svn_depth_t depth, 4889362181Sdim svn_client_conflict_walk_func_t conflict_walk_func, 4890362181Sdim void *conflict_walk_func_baton, 4891362181Sdim svn_client_ctx_t *ctx, 4892362181Sdim apr_pool_t *scratch_pool); 4893362181Sdim 4894362181Sdim/** 4895362181Sdim* Indicate the types of conflicts present on the working copy node 4896362181Sdim* described by @a conflict. Any output argument may be @c NULL if 4897362181Sdim* the caller is not interested in the status of a particular type. 4898362181Sdim* 4899362181Sdim* The returned @a *props_conflicted array is allocated in @a result_pool. 4900362181Sdim* It contains the names of conflicted properties. If no property conflict 4901362181Sdim* exists, the array will contain no elements. 4902362181Sdim* 4903362181Sdim* @since New in 1.10. 4904362181Sdim*/ 4905362181Sdimsvn_error_t * 4906362181Sdimsvn_client_conflict_get_conflicted(svn_boolean_t *text_conflicted, 4907362181Sdim apr_array_header_t **props_conflicted, 4908362181Sdim svn_boolean_t *tree_conflicted, 4909362181Sdim svn_client_conflict_t *conflict, 4910362181Sdim apr_pool_t *result_pool, 4911362181Sdim apr_pool_t *scratch_pool); 4912362181Sdim 4913362181Sdim/** 4914362181Sdim * Return a textual human-readable description of the property conflict 4915362181Sdim * described by @a conflict, allocated in @a result_pool. The description 4916362181Sdim * is encoded in UTF-8 and may contain multiple lines separated by 4917362181Sdim * @c APR_EOL_STR. The last line is not terminated by a newline. 4918362181Sdim * 4919362181Sdim * Additionally, the description may be localized to the language used 4920362181Sdim * by the current locale. 4921362181Sdim * 4922362181Sdim * @since New in 1.10. 4923362181Sdim */ 4924362181Sdimsvn_error_t * 4925362181Sdimsvn_client_conflict_prop_get_description(const char **description, 4926362181Sdim svn_client_conflict_t *conflict, 4927362181Sdim apr_pool_t *result_pool, 4928362181Sdim apr_pool_t *scratch_pool); 4929362181Sdim 4930362181Sdim/** 4931362181Sdim * Return a textual human-readable description of the tree conflict 4932362181Sdim * described by @a conflict, allocated in @a result_pool. The description 4933362181Sdim * is encoded in UTF-8 and may contain multiple lines separated by 4934362181Sdim * @c APR_EOL_STR. The last line is not terminated by a newline. 4935362181Sdim * 4936362181Sdim * Additionally, the description may be localized to the language used 4937362181Sdim * by the current locale. 4938362181Sdim * 4939362181Sdim * While client implementors are free to enhance descriptions by adding 4940362181Sdim * additional information to the text, or break up very long lines for 4941362181Sdim * formatting purposes, there is no syntax defined for descriptions, and 4942362181Sdim * implementors should not rely on any particular parts of descriptions 4943362181Sdim * to remain stable over time, apart from what is stated below. 4944362181Sdim * Descriptions may or may not form complete sentences. They may contain 4945362181Sdim * paths relative to the repository root; such paths always start with "^/", 4946362181Sdim * and end with either a peg revision (e.g. "@100") or a colon followed by 4947362181Sdim * a range of revisions (as in svn:mergeinfo, e.g. ":100-200"). 4948362181Sdim * Paths may appear on a line of their own to avoid overlong lines. 4949362181Sdim * Any revision numbers mentioned elsewhere in the description are 4950362181Sdim * prefixed with the letter 'r' (e.g. "r99"). 4951362181Sdim * 4952362181Sdim * The description has two parts: One part describes the "incoming change" 4953362181Sdim * applied by an update, merge, or switch operation. The other part 4954362181Sdim * describes the "local change" which occurred in the working copy or 4955362181Sdim * perhaps in the history of a merge target branch. 4956362181Sdim * Both parts are provided independently to allow for some flexibility 4957362181Sdim * when displaying the description. As a convention, displaying the 4958362181Sdim * "incoming change" first and the "local change" second is recommended. 4959362181Sdim * 4960362181Sdim * By default, the description is based only on information available in 4961362181Sdim * the working copy. If svn_client_conflict_tree_get_details() was already 4962362181Sdim * called for @a conflict, the description might also contain useful 4963362181Sdim * information obtained from the repository and provide for a much better 4964362181Sdim * user experience. 4965362181Sdim * 4966362181Sdim * @since New in 1.10. 4967362181Sdim */ 4968362181Sdimsvn_error_t * 4969362181Sdimsvn_client_conflict_tree_get_description( 4970362181Sdim const char **incoming_change_description, 4971362181Sdim const char **local_change_description, 4972362181Sdim svn_client_conflict_t *conflict, 4973362181Sdim svn_client_ctx_t *ctx, 4974362181Sdim apr_pool_t *result_pool, 4975362181Sdim apr_pool_t *scratch_pool); 4976362181Sdim 4977362181Sdim/** 4978362181Sdim * Set @a *options to an array of pointers to svn_client_conflict_option_t 4979362181Sdim * objects applicable to text conflicts described by @a conflict. 4980362181Sdim * 4981362181Sdim * @since New in 1.10. 4982362181Sdim */ 4983362181Sdimsvn_error_t * 4984362181Sdimsvn_client_conflict_text_get_resolution_options(apr_array_header_t **options, 4985362181Sdim svn_client_conflict_t *conflict, 4986362181Sdim svn_client_ctx_t *ctx, 4987362181Sdim apr_pool_t *result_pool, 4988362181Sdim apr_pool_t *scratch_pool); 4989362181Sdim 4990362181Sdim/** 4991362181Sdim * Set @a *options to an array of pointers to svn_client_conflict_option_t 4992362181Sdim * objects applicable to property conflicts described by @a conflict. 4993362181Sdim * 4994362181Sdim * @since New in 1.10. 4995362181Sdim */ 4996362181Sdimsvn_error_t * 4997362181Sdimsvn_client_conflict_prop_get_resolution_options(apr_array_header_t **options, 4998362181Sdim svn_client_conflict_t *conflict, 4999362181Sdim svn_client_ctx_t *ctx, 5000362181Sdim apr_pool_t *result_pool, 5001362181Sdim apr_pool_t *scratch_pool); 5002362181Sdim 5003362181Sdim/** 5004362181Sdim * Set @a *options to an array of pointers to svn_client_conflict_option_t 5005362181Sdim * objects applicable to the tree conflict described by @a conflict. 5006362181Sdim * 5007362181Sdim * By default, the list of options is based only on information available in 5008362181Sdim * the working copy. If svn_client_conflict_tree_get_details() was already 5009362181Sdim * called for @a conflict, a more useful list of options might be returned. 5010362181Sdim * 5011362181Sdim * @since New in 1.10. 5012362181Sdim */ 5013362181Sdimsvn_error_t * 5014362181Sdimsvn_client_conflict_tree_get_resolution_options(apr_array_header_t **options, 5015362181Sdim svn_client_conflict_t *conflict, 5016362181Sdim svn_client_ctx_t *ctx, 5017362181Sdim apr_pool_t *result_pool, 5018362181Sdim apr_pool_t *scratch_pool); 5019362181Sdim 5020362181Sdim/** 5021362181Sdim * Find more information about the tree conflict represented by @a conflict. 5022362181Sdim * 5023362181Sdim * A call to svn_client_conflict_tree_get_description() may yield much better 5024362181Sdim * results after this function has been called. 5025362181Sdim * 5026362181Sdim * A call to svn_client_conflict_tree_get_resolution_options() may provide 5027362181Sdim * more useful resolution options if this function has been called. 5028362181Sdim * 5029362181Sdim * This function may contact the repository. Use the authentication baton 5030362181Sdim * cached in @a ctx for authentication if contacting the repository. 5031362181Sdim * 5032362181Sdim * @since New in 1.10. 5033362181Sdim */ 5034362181Sdimsvn_error_t * 5035362181Sdimsvn_client_conflict_tree_get_details(svn_client_conflict_t *conflict, 5036362181Sdim svn_client_ctx_t *ctx, 5037362181Sdim apr_pool_t *scratch_pool); 5038362181Sdim 5039362181Sdim/** 5040362181Sdim * Return an ID for @a option. This ID can be used by callers to associate 5041362181Sdim * arbitrary data with a particular conflict resolution option. 5042362181Sdim * 5043362181Sdim * The ID of a particular resolution option will never change in future 5044362181Sdim * revisions of this API. 5045362181Sdim * 5046362181Sdim * @since New in 1.10. 5047362181Sdim */ 5048362181Sdimsvn_client_conflict_option_id_t 5049362181Sdimsvn_client_conflict_option_get_id(svn_client_conflict_option_t *option); 5050362181Sdim 5051362181Sdim/** 5052362181Sdim * Return a textual human-readable label of @a option, allocated in 5053362181Sdim * @a result_pool. The label is encoded in UTF-8 and usually 5054362181Sdim * contains up to three words. 5055362181Sdim * 5056362181Sdim * Additionally, the label may be localized to the language used 5057362181Sdim * by the current locale. 5058362181Sdim * 5059362181Sdim * @since New in 1.10. 5060362181Sdim */ 5061362181Sdimconst char * 5062362181Sdimsvn_client_conflict_option_get_label(svn_client_conflict_option_t *option, 5063362181Sdim apr_pool_t *result_pool); 5064362181Sdim 5065362181Sdim/** 5066362181Sdim * Return a textual human-readable description of @a option, allocated in 5067362181Sdim * @a result_pool. The description is encoded in UTF-8 and may contain 5068362181Sdim * multiple lines separated by @c APR_EOL_STR. 5069362181Sdim * 5070362181Sdim * Additionally, the description may be localized to the language used 5071362181Sdim * by the current locale. 5072362181Sdim * 5073362181Sdim * @since New in 1.10. 5074362181Sdim */ 5075362181Sdimconst char * 5076362181Sdimsvn_client_conflict_option_get_description(svn_client_conflict_option_t *option, 5077362181Sdim apr_pool_t *result_pool); 5078362181Sdim 5079362181Sdim/** 5080362181Sdim * Return the ID of the recommended resolution option. If no specific option 5081362181Sdim * is recommended, return @c svn_client_conflict_option_unspecified; 5082362181Sdim * 5083362181Sdim * Client implementations which aim to avoid excessive interactive prompting 5084362181Sdim * may wish to try a recommended resolution option before falling back to 5085362181Sdim * asking the user which option to use. 5086362181Sdim * 5087362181Sdim * Conflict resolution with a recommended option is not guaranteed to succeed. 5088362181Sdim * Clients should check for errors when trying to resolve a conflict and fall 5089362181Sdim * back to other options and/or interactive prompting when the recommended 5090362181Sdim * option fails to resolve a conflict. 5091362181Sdim * 5092362181Sdim * If @a conflict is a tree conflict, svn_client_conflict_tree_get_details() 5093362181Sdim * should be called before this function to allow for useful recommendations. 5094362181Sdim * 5095362181Sdim * @since New in 1.10. 5096362181Sdim */ 5097362181Sdimsvn_client_conflict_option_id_t 5098362181Sdimsvn_client_conflict_get_recommended_option_id(svn_client_conflict_t *conflict); 5099362181Sdim 5100362181Sdim/** 5101362181Sdim * Return the absolute path to the conflicted working copy node described 5102362181Sdim * by @a conflict. 5103362181Sdim * 5104362181Sdim * @since New in 1.10. 5105362181Sdim */ 5106362181Sdimconst char * 5107362181Sdimsvn_client_conflict_get_local_abspath(svn_client_conflict_t *conflict); 5108362181Sdim 5109362181Sdim/** 5110362181Sdim * Return the operation during which the conflict described by @a 5111362181Sdim * conflict was recorded. 5112362181Sdim * 5113362181Sdim * @since New in 1.10. 5114362181Sdim */ 5115362181Sdimsvn_wc_operation_t 5116362181Sdimsvn_client_conflict_get_operation(svn_client_conflict_t *conflict); 5117362181Sdim 5118362181Sdim/** 5119362181Sdim * Return the action an update, switch, or merge operation attempted to 5120362181Sdim * perform on the working copy node described by @a conflict. 5121362181Sdim * 5122362181Sdim * @since New in 1.10. 5123362181Sdim */ 5124362181Sdimsvn_wc_conflict_action_t 5125362181Sdimsvn_client_conflict_get_incoming_change(svn_client_conflict_t *conflict); 5126362181Sdim 5127362181Sdim/** 5128362181Sdim * Return the reason why the attempted action performed by an update, switch, 5129362181Sdim * or merge operation conflicted with the state of the node in the working copy. 5130362181Sdim * 5131362181Sdim * During update and switch operations this local change is part of uncommitted 5132362181Sdim * modifications in the working copy. During merge operations it may 5133362181Sdim * additionally be part of the history of the merge target branch, anywhere 5134362181Sdim * between the common ancestor revision and the working copy revision. 5135362181Sdim * 5136362181Sdim * @since New in 1.10. 5137362181Sdim */ 5138362181Sdimsvn_wc_conflict_reason_t 5139362181Sdimsvn_client_conflict_get_local_change(svn_client_conflict_t *conflict); 5140362181Sdim 5141362181Sdim/** 5142362181Sdim * Return information about the repository associated with @a conflict. 5143362181Sdim * In case of a foreign-repository merge this will differ from the 5144362181Sdim * repository information associated with the merge target working copy. 5145362181Sdim * 5146362181Sdim * @since New in 1.10. 5147362181Sdim */ 5148362181Sdimsvn_error_t * 5149362181Sdimsvn_client_conflict_get_repos_info(const char **repos_root_url, 5150362181Sdim const char **repos_uuid, 5151362181Sdim svn_client_conflict_t *conflict, 5152362181Sdim apr_pool_t *result_pool, 5153362181Sdim apr_pool_t *scratch_pool); 5154362181Sdim 5155362181Sdim/** 5156362181Sdim * Return the repository-relative location and the node kind of the incoming 5157362181Sdim * old version of the conflicted node described by @a conflict. 5158362181Sdim * 5159362181Sdim * If the repository-relative path is not available, the @a 5160362181Sdim * *incoming_old_repos_relpath will be set to @c NULL, 5161362181Sdim * 5162362181Sdim * If the peg revision is not available, @a *incoming_old_regrev will be 5163362181Sdim * set to SVN_INVALID_REVNUM. 5164362181Sdim * 5165362181Sdim * If the node kind is not available or if the node does not exist at the 5166362181Sdim * specified path and revision, @a *incoming_old_node_kind will be set to 5167362181Sdim * svn_node_none. 5168362181Sdim * ### Should return svn_node_unkown if not available? 5169362181Sdim * 5170362181Sdim * Any output parameter may be set to @c NULL by the caller to indicate that 5171362181Sdim * a particular piece of information should not be returned. 5172362181Sdim * 5173362181Sdim * In case of tree conflicts, this "path@revision" does not necessarily exist 5174362181Sdim * in the repository, and it does not necessarily represent the incoming 5175362181Sdim * change which is responsible for the occurance of the tree conflict. 5176362181Sdim * The responsible incoming change is generally located somewhere between 5177362181Sdim * the old and new incoming versions. 5178362181Sdim * 5179362181Sdim * @since New in 1.10. 5180362181Sdim */ 5181362181Sdimsvn_error_t * 5182362181Sdimsvn_client_conflict_get_incoming_old_repos_location( 5183362181Sdim const char **incoming_old_repos_relpath, 5184362181Sdim svn_revnum_t *incoming_old_regrev, 5185362181Sdim svn_node_kind_t *incoming_old_node_kind, 5186362181Sdim svn_client_conflict_t *conflict, 5187362181Sdim apr_pool_t *result_pool, 5188362181Sdim apr_pool_t *scratch_pool); 5189362181Sdim 5190362181Sdim/** 5191362181Sdim * Like svn_client_conflict_get_incoming_old_repos_location(), expect this 5192362181Sdim * function returns the same data for the incoming new version. 5193362181Sdim * 5194362181Sdim * The same note about tree conflicts applies. 5195362181Sdim * 5196362181Sdim * @since New in 1.10. 5197362181Sdim */ 5198362181Sdimsvn_error_t * 5199362181Sdimsvn_client_conflict_get_incoming_new_repos_location( 5200362181Sdim const char **incoming_new_repos_relpath, 5201362181Sdim svn_revnum_t *incoming_new_regrev, 5202362181Sdim svn_node_kind_t *incoming_new_node_kind, 5203362181Sdim svn_client_conflict_t *conflict, 5204362181Sdim apr_pool_t *result_pool, 5205362181Sdim apr_pool_t *scratch_pool); 5206362181Sdim 5207362181Sdim/** 5208362181Sdim * Return the node kind of the tree conflict victim described by @a conflict. 5209362181Sdim * The victim is the local node in the working copy which was affected by the 5210362181Sdim * tree conflict at the time the conflict was raised. 5211362181Sdim * 5212362181Sdim * @since New in 1.10. 5213362181Sdim */ 5214362181Sdimsvn_node_kind_t 5215362181Sdimsvn_client_conflict_tree_get_victim_node_kind(svn_client_conflict_t *conflict); 5216362181Sdim 5217362181Sdim/** 5218362181Sdim * Resolve a tree @a conflict using resolution option @a option. 5219362181Sdim * 5220362181Sdim * May raise an error in case the tree conflict cannot be resolved yet, for 5221362181Sdim * instance @c SVN_ERR_WC_OBSTRUCTED_UPDATE, @c SVN_ERR_WC_FOUND_CONFLICT, 5222362181Sdim * or @c SVN_ERR_WC_CONFLICT_RESOLVER_FAILUE. 5223362181Sdim * This may happen when other tree conflicts, or unversioned obstructions, 5224362181Sdim * block the resolution of this tree conflict. In such a case the other 5225362181Sdim * conflicts should be resolved first and resolution of this conflict should 5226362181Sdim * be attempted again later. 5227362181Sdim * 5228362181Sdim * @since New in 1.10. 5229362181Sdim */ 5230362181Sdimsvn_error_t * 5231362181Sdimsvn_client_conflict_tree_resolve(svn_client_conflict_t *conflict, 5232362181Sdim svn_client_conflict_option_t *option, 5233362181Sdim svn_client_ctx_t *ctx, 5234362181Sdim apr_pool_t *scratch_pool); 5235362181Sdim 5236362181Sdim/** 5237362181Sdim * Like svn_client_conflict_tree_resolve(), except that it identifies 5238362181Sdim * the desired resolution option by ID @a option_id. 5239362181Sdim * 5240362181Sdim * If the provided @a option_id is the ID of an option which resolves 5241362181Sdim * @a conflict, try to resolve the tree conflict using that option. 5242362181Sdim * Else, return @c SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE. 5243362181Sdim * 5244362181Sdim * @since New in 1.10. 5245362181Sdim */ 5246362181Sdimsvn_error_t * 5247362181Sdimsvn_client_conflict_tree_resolve_by_id( 5248362181Sdim svn_client_conflict_t *conflict, 5249362181Sdim svn_client_conflict_option_id_t option_id, 5250362181Sdim svn_client_ctx_t *ctx, 5251362181Sdim apr_pool_t *scratch_pool); 5252362181Sdim 5253362181Sdim/** 5254362181Sdim * Return the ID of the option this tree @a conflict has been resolved to. 5255362181Sdim * If the conflict has not been resolved yet, then return 5256362181Sdim * @c svn_client_conflict_option_unspecified. 5257362181Sdim * 5258362181Sdim * @since New in 1.10. 5259362181Sdim */ 5260362181Sdimsvn_client_conflict_option_id_t 5261362181Sdimsvn_client_conflict_tree_get_resolution(svn_client_conflict_t *conflict); 5262362181Sdim 5263362181Sdim/** 5264362181Sdim * Return the path to the legacy property conflicts reject file 5265362181Sdim * for the property conflicts represented by @a conflict. 5266362181Sdim * 5267362181Sdim * This function exists for backwards compatibility only and should not be 5268362181Sdim * used in new code. 5269362181Sdim * 5270362181Sdim * @since New in 1.10. 5271362181Sdim */ 5272362181Sdimconst char * 5273362181Sdimsvn_client_conflict_prop_get_reject_abspath(svn_client_conflict_t *conflict); 5274362181Sdim 5275362181Sdim/** 5276362181Sdim * Return the set of property values involved in the conflict of property 5277362181Sdim * PROPNAME described by @a conflict. If a property value is unavailable the 5278362181Sdim * corresponding output argument is set to @c NULL. 5279362181Sdim * 5280362181Sdim * A 3-way diff of these property values can be generated with 5281362181Sdim * svn_diff_mem_string_diff3(). A merged version with conflict 5282362181Sdim * markers can be generated with svn_diff_mem_string_output_merge3(). 5283362181Sdim * 5284362181Sdim * @since New in 1.10. 5285362181Sdim */ 5286362181Sdimsvn_error_t * 5287362181Sdimsvn_client_conflict_prop_get_propvals(const svn_string_t **base_propval, 5288362181Sdim const svn_string_t **working_propval, 5289362181Sdim const svn_string_t **incoming_old_propval, 5290362181Sdim const svn_string_t **incoming_new_propval, 5291362181Sdim svn_client_conflict_t *conflict, 5292362181Sdim const char *propname, 5293362181Sdim apr_pool_t *result_pool); 5294362181Sdim 5295362181Sdim/** 5296362181Sdim * Resolve a property @a conflict in property @a propname using resolution 5297362181Sdim * option @a option. To resolve all properties to the same option at once, 5298362181Sdim * set @a propname to the empty string "". 5299362181Sdim * 5300362181Sdim * @since New in 1.10. 5301362181Sdim */ 5302362181Sdimsvn_error_t * 5303362181Sdimsvn_client_conflict_prop_resolve(svn_client_conflict_t *conflict, 5304362181Sdim const char *propname, 5305362181Sdim svn_client_conflict_option_t *option, 5306362181Sdim svn_client_ctx_t *ctx, 5307362181Sdim apr_pool_t *scratch_pool); 5308362181Sdim/** 5309362181Sdim * If the provided @a option_id is the ID of an option which resolves 5310362181Sdim * @a conflict, resolve the property conflict in property @a propname 5311362181Sdim * using that option. 5312362181Sdim * Else, return @c SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE. 5313362181Sdim * 5314362181Sdim * @since New in 1.10. 5315362181Sdim */ 5316362181Sdimsvn_error_t * 5317362181Sdimsvn_client_conflict_prop_resolve_by_id( 5318362181Sdim svn_client_conflict_t *conflict, 5319362181Sdim const char *propname, 5320362181Sdim svn_client_conflict_option_id_t option_id, 5321362181Sdim svn_client_ctx_t *ctx, 5322362181Sdim apr_pool_t *scratch_pool); 5323362181Sdim 5324362181Sdim/** 5325362181Sdim * Return the ID of the option this property @a conflict in property 5326362181Sdim * @a propname has been resolved to. 5327362181Sdim * If the conflict has not been resolved yet, then return 5328362181Sdim * @c svn_client_conflict_option_unspecified. 5329362181Sdim * 5330362181Sdim * @since New in 1.10. 5331362181Sdim */ 5332362181Sdimsvn_client_conflict_option_id_t 5333362181Sdimsvn_client_conflict_prop_get_resolution(svn_client_conflict_t *conflict, 5334362181Sdim const char *propname); 5335362181Sdim 5336362181Sdim/** 5337362181Sdim * Return the MIME-type of the working version of the text-conflicted file 5338362181Sdim * described by @a conflict. 5339362181Sdim * 5340362181Sdim * ### Really needed? What about base/incoming_old/incoming_new values? 5341362181Sdim * @since: New in 1.10. 5342362181Sdim */ 5343362181Sdimconst char * 5344362181Sdimsvn_client_conflict_text_get_mime_type(svn_client_conflict_t *conflict); 5345362181Sdim 5346362181Sdim/** 5347362181Sdim * Return absolute paths to the versions of the text-conflicted file 5348362181Sdim * described by @a conflict. 5349362181Sdim * 5350362181Sdim * If a particular content is not available, it is set to @c NULL. 5351362181Sdim * 5352362181Sdim * ### Should this be returning svn_stream_t instead of paths? 5353362181Sdim * @since: New in 1.10. 5354362181Sdim */ 5355362181Sdimsvn_error_t * 5356362181Sdimsvn_client_conflict_text_get_contents(const char **base_abspath, 5357362181Sdim const char **working_abspath, 5358362181Sdim const char **incoming_old_abspath, 5359362181Sdim const char **incoming_new_abspath, 5360362181Sdim svn_client_conflict_t *conflict, 5361362181Sdim apr_pool_t *result_pool, 5362362181Sdim apr_pool_t *scratch_pool); 5363362181Sdim 5364362181Sdim/** 5365362181Sdim * Resolve a text @a conflict using resolution option @a option. 5366362181Sdim * 5367362181Sdim * @since New in 1.10. 5368362181Sdim */ 5369362181Sdimsvn_error_t * 5370362181Sdimsvn_client_conflict_text_resolve(svn_client_conflict_t *conflict, 5371362181Sdim svn_client_conflict_option_t *option, 5372362181Sdim svn_client_ctx_t *ctx, 5373362181Sdim apr_pool_t *scratch_pool); 5374362181Sdim 5375362181Sdim/** 5376362181Sdim * If the provided @a option_id is the ID of an option which resolves 5377362181Sdim * @a conflict, resolve the text conflict using that option. 5378362181Sdim * Else, return @c SVN_ERR_CLIENT_CONFLICT_OPTION_NOT_APPLICABLE. 5379362181Sdim * 5380362181Sdim * @since New in 1.10. 5381362181Sdim */ 5382362181Sdimsvn_error_t * 5383362181Sdimsvn_client_conflict_text_resolve_by_id( 5384362181Sdim svn_client_conflict_t *conflict, 5385362181Sdim svn_client_conflict_option_id_t option_id, 5386362181Sdim svn_client_ctx_t *ctx, 5387362181Sdim apr_pool_t *scratch_pool); 5388362181Sdim 5389362181Sdim/** 5390362181Sdim * Return the ID of the option this text @a conflict has been resolved to. 5391362181Sdim * If the conflict has not been resolved yet, then return 5392362181Sdim * @c svn_client_conflict_option_unspecified. 5393362181Sdim * 5394362181Sdim * @since New in 1.10. 5395362181Sdim */ 5396362181Sdimsvn_client_conflict_option_id_t 5397362181Sdimsvn_client_conflict_text_get_resolution(svn_client_conflict_t *conflict); 5398362181Sdim 5399362181Sdim/** @} */ 5400362181Sdim 5401362181Sdim/** 5402251881Speter * @defgroup Resolved Mark conflicted paths as resolved. 5403251881Speter * 5404251881Speter * @{ 5405251881Speter */ 5406251881Speter 5407251881Speter/** 5408251881Speter * Similar to svn_client_resolve(), but without automatic conflict 5409251881Speter * resolution support. 5410251881Speter * 5411251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 5412251881Speter * Use svn_client_resolve() with @a conflict_choice == @c 5413251881Speter * svn_wc_conflict_choose_merged instead. 5414251881Speter */ 5415251881SpeterSVN_DEPRECATED 5416251881Spetersvn_error_t * 5417251881Spetersvn_client_resolved(const char *path, 5418251881Speter svn_boolean_t recursive, 5419251881Speter svn_client_ctx_t *ctx, 5420251881Speter apr_pool_t *pool); 5421251881Speter 5422251881Speter/** Perform automatic conflict resolution on a working copy @a path. 5423251881Speter * 5424251881Speter * If @a conflict_choice is 5425251881Speter * 5426251881Speter * - #svn_wc_conflict_choose_base: 5427251881Speter * resolve the conflict with the old file contents 5428251881Speter * 5429251881Speter * - #svn_wc_conflict_choose_mine_full: 5430251881Speter * use the original working contents 5431251881Speter * 5432251881Speter * - #svn_wc_conflict_choose_theirs_full: 5433251881Speter * use the new contents 5434251881Speter * 5435251881Speter * - #svn_wc_conflict_choose_merged: 5436251881Speter * don't change the contents at all, just remove the conflict 5437251881Speter * status, which is the pre-1.5 behavior. 5438251881Speter * 5439251881Speter * - #svn_wc_conflict_choose_theirs_conflict 5440251881Speter * ###... 5441251881Speter * 5442251881Speter * - #svn_wc_conflict_choose_mine_conflict 5443251881Speter * ###... 5444251881Speter * 5445251881Speter * - svn_wc_conflict_choose_unspecified 5446251881Speter * invoke @a ctx->conflict_func2 with @a ctx->conflict_baton2 to obtain 5447251881Speter * a resolution decision for each conflict. This can be used to 5448362181Sdim * implement interactive conflict resolution but is NOT RECOMMENDED for 5449362181Sdim * new code. To perform conflict resolution based on interactive user 5450362181Sdim * input on a per-conflict basis, use svn_client_conflict_text_resolve(), 5451362181Sdim * svn_client_conflict_prop_resolve(), and 5452362181Sdim * svn_client_conflict_tree_resolve() instead of svn_client_resolve(). 5453251881Speter * 5454251881Speter * #svn_wc_conflict_choose_theirs_conflict and 5455251881Speter * #svn_wc_conflict_choose_mine_conflict are not legal for binary 5456251881Speter * files or properties. 5457251881Speter * 5458251881Speter * If @a path is not in a state of conflict to begin with, do nothing. 5459251881Speter * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL, 5460251881Speter * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path. 5461251881Speter * ### with what notification parameters? 5462251881Speter * 5463251881Speter * If @a depth is #svn_depth_empty, act only on @a path; if 5464251881Speter * #svn_depth_files, resolve @a path and its conflicted file 5465251881Speter * children (if any); if #svn_depth_immediates, resolve @a path and 5466251881Speter * all its immediate conflicted children (both files and directories, 5467251881Speter * if any); if #svn_depth_infinity, resolve @a path and every 5468251881Speter * conflicted file or directory anywhere beneath it. 5469251881Speter * 5470251881Speter * Note that this operation will try to lock the parent directory of 5471251881Speter * @a path in order to be able to resolve tree-conflicts on @a path. 5472251881Speter * 5473251881Speter * @since New in 1.5. 5474251881Speter */ 5475251881Spetersvn_error_t * 5476251881Spetersvn_client_resolve(const char *path, 5477251881Speter svn_depth_t depth, 5478251881Speter svn_wc_conflict_choice_t conflict_choice, 5479251881Speter svn_client_ctx_t *ctx, 5480251881Speter apr_pool_t *pool); 5481251881Speter 5482251881Speter 5483251881Speter/** @} */ 5484251881Speter 5485251881Speter/** 5486251881Speter * @defgroup Copy Copy paths in the working copy and repository. 5487251881Speter * 5488251881Speter * @{ 5489251881Speter */ 5490251881Speter 5491251881Speter/** 5492251881Speter * A structure which describes the source of a copy operation--its path, 5493251881Speter * revision, and peg revision. 5494251881Speter * 5495251881Speter * @since New in 1.5. 5496251881Speter */ 5497251881Spetertypedef struct svn_client_copy_source_t 5498251881Speter{ 5499251881Speter /** The source path or URL. */ 5500251881Speter const char *path; 5501251881Speter 5502251881Speter /** The source operational revision. */ 5503251881Speter const svn_opt_revision_t *revision; 5504251881Speter 5505251881Speter /** The source peg revision. */ 5506251881Speter const svn_opt_revision_t *peg_revision; 5507251881Speter} svn_client_copy_source_t; 5508251881Speter 5509251881Speter/** Copy each source in @a sources to @a dst_path. 5510251881Speter * 5511251881Speter * If multiple @a sources are given, @a dst_path must be a directory, 5512251881Speter * and @a sources will be copied as children of @a dst_path. 5513251881Speter * 5514251881Speter * @a sources is an array of <tt>svn_client_copy_source_t *</tt> elements, 5515251881Speter * either all referring to local WC items or all referring to versioned 5516251881Speter * items in the repository. 5517251881Speter * 5518251881Speter * If @a sources has only one item, attempt to copy it to @a dst_path. If 5519251881Speter * @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the 5520251881Speter * item as a child of @a dst_path. If @a copy_as_child is FALSE and 5521251881Speter * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path 5522251881Speter * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a 5523251881Speter * URL. 5524251881Speter * 5525251881Speter * If @a sources has multiple items, and @a copy_as_child is TRUE, all 5526251881Speter * @a sources are copied as children of @a dst_path. If any child of 5527251881Speter * @a dst_path already exists with the same name any item in @a sources, 5528251881Speter * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and 5529251881Speter * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL. 5530251881Speter * 5531251881Speter * If @a sources has multiple items, and @a copy_as_child is FALSE, fail 5532251881Speter * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED. 5533251881Speter * 5534251881Speter * If @a dst_path is a URL, use the authentication baton 5535251881Speter * in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately 5536251881Speter * attempt to commit the copy action in the repository. 5537251881Speter * 5538251881Speter * If @a dst_path is not a URL, then this is just a variant of 5539251881Speter * svn_client_add(), where the @a sources are scheduled for addition 5540251881Speter * as copies. No changes will happen to the repository until a commit occurs. 5541251881Speter * This scheduling can be removed with svn_client_revert2(). 5542251881Speter * 5543251881Speter * If @a make_parents is TRUE, create any non-existent parent directories 5544251881Speter * also. Otherwise the parent of @a dst_path must already exist. 5545251881Speter * 5546251881Speter * If @a ignore_externals is set, don't process externals definitions 5547251881Speter * as part of this operation. 5548251881Speter * 5549289180Speter * If @a metadata_only is @c TRUE and copying a file in a working copy, 5550289180Speter * everything in the metadata is updated as if the node is moved, but the 5551289180Speter * actual disk copy operation is not performed. This feature is useful for 5552289180Speter * clients that want to keep the working copy in sync while the actual working 5553289180Speter * copy is updated by some other task. 5554289180Speter * 5555289180Speter * If @a pin_externals is set, pin URLs in copied externals definitions 5556289180Speter * to their current revision unless they were already pinned to a 5557289180Speter * particular revision. A pinned external uses a URL which points at a 5558289180Speter * fixed revision, rather than the HEAD revision. Externals in the copy 5559289180Speter * destination are pinned to either a working copy base revision or the 5560289180Speter * HEAD revision of a repository (as of the time the copy operation is 5561289180Speter * performed), depending on the type of the copy source: 5562289180Speter <pre> 5563289180Speter copy source: working copy (WC) REPOS 5564289180Speter ------------+------------------------+---------------------------+ 5565289180Speter copy WC | external's WC BASE rev | external's repos HEAD rev | 5566289180Speter dest: |------------------------+---------------------------+ 5567289180Speter REPOS | external's WC BASE rev | external's repos HEAD rev | 5568289180Speter ------------+------------------------+---------------------------+ 5569289180Speter </pre> 5570289180Speter * If the copy source is a working copy, then all externals must be checked 5571289180Speter * out, be at a single-revision, contain no local modifications, and contain 5572289180Speter * no switched subtrees. Else, #SVN_ERR_WC_PATH_UNEXPECTED_STATUS is returned. 5573289180Speter * 5574289180Speter * If non-NULL, @a externals_to_pin restricts pinning to a subset of externals. 5575289180Speter * It is a hash table keyed by either a local absolute path or a URL at which 5576289180Speter * an svn:externals property is set. The hash table contains apr_array_header_t* 5577289180Speter * elements as returned by svn_wc_parse_externals_description3(). These arrays 5578289180Speter * contain elements of type svn_wc_external_item2_t*, each of which corresponds 5579289180Speter * to a single line of an svn:externals definition. Externals corresponding to 5580289180Speter * these items will be pinned, other externals will not be pinned. 5581289180Speter * If @a externals_to_pin is @c NULL then all externals are pinned. 5582289180Speter * If @a pin_externals is @c FALSE then @a externals_to_pin is ignored. 5583289180Speter * 5584251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 5585251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 5586251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision in 5587251881Speter * the event that this is a committing operation. This table cannot 5588251881Speter * contain any standard Subversion properties. 5589251881Speter * 5590251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo 5591251881Speter * that this function can use to query for a commit log message when one is 5592251881Speter * needed. 5593251881Speter * 5594251881Speter * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2 5595251881Speter * for each item added at the new location, passing the new, relative path of 5596251881Speter * the added item. 5597251881Speter * 5598251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 5599251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 5600251881Speter * the commit. 5601251881Speter * 5602289180Speter * @since New in 1.9. 5603289180Speter */ 5604289180Spetersvn_error_t * 5605289180Spetersvn_client_copy7(const apr_array_header_t *sources, 5606289180Speter const char *dst_path, 5607289180Speter svn_boolean_t copy_as_child, 5608289180Speter svn_boolean_t make_parents, 5609289180Speter svn_boolean_t ignore_externals, 5610289180Speter svn_boolean_t metadata_only, 5611289180Speter svn_boolean_t pin_externals, 5612289180Speter const apr_hash_t *externals_to_pin, 5613289180Speter const apr_hash_t *revprop_table, 5614289180Speter svn_commit_callback2_t commit_callback, 5615289180Speter void *commit_baton, 5616289180Speter svn_client_ctx_t *ctx, 5617289180Speter apr_pool_t *pool); 5618289180Speter 5619289180Speter/** 5620289180Speter * Similar to svn_client_copy7(), but doesn't support meta_data_only 5621289180Speter * and cannot pin externals. 5622289180Speter * 5623362181Sdim * 5624251881Speter * @since New in 1.7. 5625289180Speter * @deprecated Provided for backward compatibility with the 1.8 API. 5626251881Speter */ 5627289180SpeterSVN_DEPRECATED 5628251881Spetersvn_error_t * 5629251881Spetersvn_client_copy6(const apr_array_header_t *sources, 5630251881Speter const char *dst_path, 5631251881Speter svn_boolean_t copy_as_child, 5632251881Speter svn_boolean_t make_parents, 5633251881Speter svn_boolean_t ignore_externals, 5634251881Speter const apr_hash_t *revprop_table, 5635251881Speter svn_commit_callback2_t commit_callback, 5636251881Speter void *commit_baton, 5637251881Speter svn_client_ctx_t *ctx, 5638251881Speter apr_pool_t *pool); 5639251881Speter 5640251881Speter/** 5641251881Speter * Similar to svn_client_copy6(), but returns the commit info in 5642251881Speter * @a *commit_info_p rather than through a callback function. 5643251881Speter * 5644251881Speter * @since New in 1.6. 5645251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 5646251881Speter */ 5647251881SpeterSVN_DEPRECATED 5648251881Spetersvn_error_t * 5649251881Spetersvn_client_copy5(svn_commit_info_t **commit_info_p, 5650251881Speter const apr_array_header_t *sources, 5651251881Speter const char *dst_path, 5652251881Speter svn_boolean_t copy_as_child, 5653251881Speter svn_boolean_t make_parents, 5654251881Speter svn_boolean_t ignore_externals, 5655251881Speter const apr_hash_t *revprop_table, 5656251881Speter svn_client_ctx_t *ctx, 5657251881Speter apr_pool_t *pool); 5658251881Speter 5659251881Speter/** 5660251881Speter * Similar to svn_client_copy5(), with @a ignore_externals set to @c FALSE. 5661251881Speter * 5662251881Speter * @since New in 1.5. 5663251881Speter * 5664251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 5665251881Speter */ 5666251881SpeterSVN_DEPRECATED 5667251881Spetersvn_error_t * 5668251881Spetersvn_client_copy4(svn_commit_info_t **commit_info_p, 5669251881Speter const apr_array_header_t *sources, 5670251881Speter const char *dst_path, 5671251881Speter svn_boolean_t copy_as_child, 5672251881Speter svn_boolean_t make_parents, 5673251881Speter const apr_hash_t *revprop_table, 5674251881Speter svn_client_ctx_t *ctx, 5675251881Speter apr_pool_t *pool); 5676251881Speter 5677251881Speter/** 5678251881Speter * Similar to svn_client_copy4(), with only one @a src_path, @a 5679251881Speter * copy_as_child set to @c FALSE, @a revprop_table passed as NULL, and 5680251881Speter * @a make_parents set to @c FALSE. Also, use @a src_revision as both 5681251881Speter * the operational and peg revision. 5682251881Speter * 5683251881Speter * @since New in 1.4. 5684251881Speter * 5685251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 5686251881Speter */ 5687251881SpeterSVN_DEPRECATED 5688251881Spetersvn_error_t * 5689251881Spetersvn_client_copy3(svn_commit_info_t **commit_info_p, 5690251881Speter const char *src_path, 5691251881Speter const svn_opt_revision_t *src_revision, 5692251881Speter const char *dst_path, 5693251881Speter svn_client_ctx_t *ctx, 5694251881Speter apr_pool_t *pool); 5695251881Speter 5696251881Speter 5697251881Speter/** 5698251881Speter * Similar to svn_client_copy3(), with the difference that if @a dst_path 5699251881Speter * already exists and is a directory, copy the item into that directory, 5700251881Speter * keeping its name (the last component of @a src_path). 5701251881Speter * 5702251881Speter * @since New in 1.3. 5703251881Speter * 5704251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 5705251881Speter */ 5706251881SpeterSVN_DEPRECATED 5707251881Spetersvn_error_t * 5708251881Spetersvn_client_copy2(svn_commit_info_t **commit_info_p, 5709251881Speter const char *src_path, 5710251881Speter const svn_opt_revision_t *src_revision, 5711251881Speter const char *dst_path, 5712251881Speter svn_client_ctx_t *ctx, 5713251881Speter apr_pool_t *pool); 5714251881Speter 5715251881Speter 5716251881Speter/** 5717251881Speter * Similar to svn_client_copy2(), but uses #svn_client_commit_info_t 5718251881Speter * for @a commit_info_p. 5719251881Speter * 5720251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 5721251881Speter */ 5722251881SpeterSVN_DEPRECATED 5723251881Spetersvn_error_t * 5724251881Spetersvn_client_copy(svn_client_commit_info_t **commit_info_p, 5725251881Speter const char *src_path, 5726251881Speter const svn_opt_revision_t *src_revision, 5727251881Speter const char *dst_path, 5728251881Speter svn_client_ctx_t *ctx, 5729251881Speter apr_pool_t *pool); 5730251881Speter 5731251881Speter 5732251881Speter/** @} */ 5733251881Speter 5734251881Speter/** 5735251881Speter * @defgroup Move Move paths in the working copy or repository. 5736251881Speter * 5737251881Speter * @{ 5738251881Speter */ 5739251881Speter 5740251881Speter/** 5741251881Speter * Move @a src_paths to @a dst_path. 5742251881Speter * 5743251881Speter * @a src_paths is an array of (const char *) paths -- either all WC paths 5744251881Speter * or all URLs -- of versioned items. If multiple @a src_paths are given, 5745251881Speter * @a dst_path must be a directory and @a src_paths will be moved as 5746251881Speter * children of @a dst_path. 5747251881Speter * 5748251881Speter * If @a src_paths are repository URLs: 5749251881Speter * 5750251881Speter * - @a dst_path must also be a repository URL. 5751251881Speter * 5752251881Speter * - The authentication baton in @a ctx and @a ctx->log_msg_func/@a 5753251881Speter * ctx->log_msg_baton are used to commit the move. 5754251881Speter * 5755251881Speter * - The move operation will be immediately committed. 5756251881Speter * 5757251881Speter * If @a src_paths are working copy paths: 5758251881Speter * 5759251881Speter * - @a dst_path must also be a working copy path. 5760251881Speter * 5761251881Speter * - @a ctx->log_msg_func3 and @a ctx->log_msg_baton3 are ignored. 5762251881Speter * 5763251881Speter * - This is a scheduling operation. No changes will happen to the 5764251881Speter * repository until a commit occurs. This scheduling can be removed 5765251881Speter * with svn_client_revert2(). If one of @a src_paths is a file it is 5766251881Speter * removed from the working copy immediately. If one of @a src_path 5767251881Speter * is a directory it will remain in the working copy but all the files, 5768251881Speter * and unversioned items, it contains will be removed. 5769251881Speter * 5770251881Speter * If @a src_paths has only one item, attempt to move it to @a dst_path. If 5771251881Speter * @a move_as_child is TRUE and @a dst_path already exists, attempt to move the 5772251881Speter * item as a child of @a dst_path. If @a move_as_child is FALSE and 5773251881Speter * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path 5774251881Speter * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a 5775251881Speter * URL. 5776251881Speter * 5777251881Speter * If @a src_paths has multiple items, and @a move_as_child is TRUE, all 5778251881Speter * @a src_paths are moved as children of @a dst_path. If any child of 5779251881Speter * @a dst_path already exists with the same name any item in @a src_paths, 5780251881Speter * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and 5781251881Speter * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL. 5782251881Speter * 5783251881Speter * If @a src_paths has multiple items, and @a move_as_child is FALSE, fail 5784251881Speter * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED. 5785251881Speter * 5786251881Speter * If @a make_parents is TRUE, create any non-existent parent directories 5787251881Speter * also. Otherwise, the parent of @a dst_path must already exist. 5788251881Speter * 5789251881Speter * If @a allow_mixed_revisions is @c FALSE, #SVN_ERR_WC_MIXED_REVISIONS 5790251881Speter * will be raised if the move source is a mixed-revision subtree. 5791251881Speter * If @a allow_mixed_revisions is TRUE, a mixed-revision move source is 5792251881Speter * allowed but the move will degrade to a copy and a delete without local 5793251881Speter * move tracking. This parameter should be set to FALSE except where backwards 5794251881Speter * compatibility to svn_client_move6() is required. 5795251881Speter * 5796251881Speter * If @a metadata_only is @c TRUE and moving a file in a working copy, 5797251881Speter * everything in the metadata is updated as if the node is moved, but the 5798251881Speter * actual disk move operation is not performed. This feature is useful for 5799251881Speter * clients that want to keep the working copy in sync while the actual working 5800251881Speter * copy is updated by some other task. 5801251881Speter * 5802251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 5803251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 5804251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision in 5805251881Speter * the event that this is a committing operation. This table cannot 5806251881Speter * contain any standard Subversion properties. 5807251881Speter * 5808251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo that 5809251881Speter * this function can use to query for a commit log message when one is needed. 5810251881Speter * 5811251881Speter * If @a ctx->notify_func2 is non-NULL, then for each item moved, call 5812251881Speter * @a ctx->notify_func2 with the @a ctx->notify_baton2 twice, once to indicate 5813251881Speter * the deletion of the moved thing, and once to indicate the addition of 5814251881Speter * the new location of the thing. 5815251881Speter * 5816251881Speter * ### Is this really true? What about svn_wc_notify_commit_replaced()? ### 5817251881Speter * 5818251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 5819251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 5820251881Speter * the commit. 5821251881Speter * 5822251881Speter * @since New in 1.8. 5823251881Speter */ 5824251881Spetersvn_error_t * 5825251881Spetersvn_client_move7(const apr_array_header_t *src_paths, 5826251881Speter const char *dst_path, 5827251881Speter svn_boolean_t move_as_child, 5828251881Speter svn_boolean_t make_parents, 5829251881Speter svn_boolean_t allow_mixed_revisions, 5830251881Speter svn_boolean_t metadata_only, 5831251881Speter const apr_hash_t *revprop_table, 5832251881Speter svn_commit_callback2_t commit_callback, 5833251881Speter void *commit_baton, 5834251881Speter svn_client_ctx_t *ctx, 5835251881Speter apr_pool_t *pool); 5836251881Speter 5837251881Speter/** 5838251881Speter * Similar to svn_client_move7(), but with @a allow_mixed_revisions always 5839251881Speter * set to @c TRUE and @a metadata_only always to @c FALSE. 5840251881Speter * 5841251881Speter * @since New in 1.7. 5842251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 5843251881Speter */ 5844251881SpeterSVN_DEPRECATED 5845251881Spetersvn_error_t * 5846251881Spetersvn_client_move6(const apr_array_header_t *src_paths, 5847251881Speter const char *dst_path, 5848251881Speter svn_boolean_t move_as_child, 5849251881Speter svn_boolean_t make_parents, 5850251881Speter const apr_hash_t *revprop_table, 5851251881Speter svn_commit_callback2_t commit_callback, 5852251881Speter void *commit_baton, 5853251881Speter svn_client_ctx_t *ctx, 5854251881Speter apr_pool_t *pool); 5855251881Speter 5856251881Speter/** 5857251881Speter * Similar to svn_client_move6(), but returns the commit info in 5858251881Speter * @a *commit_info_p rather than through a callback function. 5859251881Speter * 5860251881Speter * A WC-to-WC move will include any modified and/or unversioned children. 5861251881Speter * @a force is ignored. 5862251881Speter * 5863251881Speter * @since New in 1.5. 5864251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 5865251881Speter */ 5866251881SpeterSVN_DEPRECATED 5867251881Spetersvn_error_t * 5868251881Spetersvn_client_move5(svn_commit_info_t **commit_info_p, 5869251881Speter const apr_array_header_t *src_paths, 5870251881Speter const char *dst_path, 5871251881Speter svn_boolean_t force, 5872251881Speter svn_boolean_t move_as_child, 5873251881Speter svn_boolean_t make_parents, 5874251881Speter const apr_hash_t *revprop_table, 5875251881Speter svn_client_ctx_t *ctx, 5876251881Speter apr_pool_t *pool); 5877251881Speter 5878251881Speter/** 5879251881Speter * Similar to svn_client_move5(), with only one @a src_path, @a 5880251881Speter * move_as_child set to @c FALSE, @a revprop_table passed as NULL, and 5881251881Speter * @a make_parents set to @c FALSE. 5882251881Speter * 5883251881Speter * Note: The behaviour of @a force changed in 1.5 (r860885 and r861421), when 5884251881Speter * the 'move' semantics were improved to just move the source including any 5885251881Speter * modified and/or unversioned items in it. Before that, @a force 5886251881Speter * controlled what happened to such items, but now @a force is ignored. 5887251881Speter * 5888251881Speter * @since New in 1.4. 5889251881Speter * 5890251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 5891251881Speter */ 5892251881SpeterSVN_DEPRECATED 5893251881Spetersvn_error_t * 5894251881Spetersvn_client_move4(svn_commit_info_t **commit_info_p, 5895251881Speter const char *src_path, 5896251881Speter const char *dst_path, 5897251881Speter svn_boolean_t force, 5898251881Speter svn_client_ctx_t *ctx, 5899251881Speter apr_pool_t *pool); 5900251881Speter 5901251881Speter/** 5902251881Speter * Similar to svn_client_move4(), with the difference that if @a dst_path 5903251881Speter * already exists and is a directory, move the item into that directory, 5904251881Speter * keeping its name (the last component of @a src_path). 5905251881Speter * 5906251881Speter * @since New in 1.3. 5907251881Speter * 5908251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 5909251881Speter */ 5910251881SpeterSVN_DEPRECATED 5911251881Spetersvn_error_t * 5912251881Spetersvn_client_move3(svn_commit_info_t **commit_info_p, 5913251881Speter const char *src_path, 5914251881Speter const char *dst_path, 5915251881Speter svn_boolean_t force, 5916251881Speter svn_client_ctx_t *ctx, 5917251881Speter apr_pool_t *pool); 5918251881Speter 5919251881Speter/** 5920251881Speter * Similar to svn_client_move3(), but uses #svn_client_commit_info_t 5921251881Speter * for @a commit_info_p. 5922251881Speter * 5923251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 5924251881Speter * 5925251881Speter * @since New in 1.2. 5926251881Speter */ 5927251881SpeterSVN_DEPRECATED 5928251881Spetersvn_error_t * 5929251881Spetersvn_client_move2(svn_client_commit_info_t **commit_info_p, 5930251881Speter const char *src_path, 5931251881Speter const char *dst_path, 5932251881Speter svn_boolean_t force, 5933251881Speter svn_client_ctx_t *ctx, 5934251881Speter apr_pool_t *pool); 5935251881Speter 5936251881Speter/** 5937251881Speter * Similar to svn_client_move2(), but an extra argument @a src_revision 5938251881Speter * must be passed. This has no effect, but must be of kind 5939251881Speter * #svn_opt_revision_unspecified or #svn_opt_revision_head, 5940251881Speter * otherwise error #SVN_ERR_UNSUPPORTED_FEATURE is returned. 5941251881Speter * 5942251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 5943251881Speter */ 5944251881SpeterSVN_DEPRECATED 5945251881Spetersvn_error_t * 5946251881Spetersvn_client_move(svn_client_commit_info_t **commit_info_p, 5947251881Speter const char *src_path, 5948251881Speter const svn_opt_revision_t *src_revision, 5949251881Speter const char *dst_path, 5950251881Speter svn_boolean_t force, 5951251881Speter svn_client_ctx_t *ctx, 5952251881Speter apr_pool_t *pool); 5953251881Speter 5954251881Speter/** @} */ 5955251881Speter 5956251881Speter 5957251881Speter/** Properties 5958251881Speter * 5959251881Speter * Note that certain svn-controlled properties must always have their 5960251881Speter * values set and stored in UTF8 with LF line endings. When 5961251881Speter * retrieving these properties, callers must convert the values back 5962251881Speter * to native locale and native line-endings before displaying them to 5963251881Speter * the user. For help with this task, see 5964251881Speter * svn_prop_needs_translation(), svn_subst_translate_string(), and 5965251881Speter * svn_subst_detranslate_string(). 5966251881Speter * 5967251881Speter * @defgroup svn_client_prop_funcs Property functions 5968251881Speter * @{ 5969251881Speter */ 5970251881Speter 5971251881Speter 5972251881Speter/** 5973251881Speter * Set @a propname to @a propval on @a url. A @a propval of @c NULL will 5974251881Speter * delete the property. 5975251881Speter * 5976251881Speter * Immediately attempt to commit the property change in the repository, 5977251881Speter * using the authentication baton in @a ctx and @a 5978251881Speter * ctx->log_msg_func3/@a ctx->log_msg_baton3. 5979251881Speter * 5980251881Speter * If the property has changed on @a url since revision 5981251881Speter * @a base_revision_for_url (which must not be #SVN_INVALID_REVNUM), no 5982251881Speter * change will be made and an error will be returned. 5983251881Speter * 5984251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 5985251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 5986251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision. This 5987251881Speter * table cannot contain any standard Subversion properties. 5988251881Speter * 5989251881Speter * If @a commit_callback is non-NULL, then call @a commit_callback with 5990251881Speter * @a commit_baton and a #svn_commit_info_t for the commit. 5991251881Speter * 5992251881Speter * If @a propname is an svn-controlled property (i.e. prefixed with 5993251881Speter * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 5994251881Speter * the value is UTF8-encoded and uses LF line-endings. 5995251881Speter * 5996251881Speter * If @a skip_checks is TRUE, do no validity checking. But if @a 5997251881Speter * skip_checks is FALSE, and @a propname is not a valid property for @a 5998251881Speter * url, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the property is 5999251881Speter * not appropriate for @a url), or * #SVN_ERR_BAD_MIME_TYPE (if @a propname 6000251881Speter * is "svn:mime-type", but @a propval is not a valid mime-type). 6001251881Speter * 6002251881Speter * Use @a scratch_pool for all memory allocation. 6003251881Speter * 6004251881Speter * @since New in 1.7. 6005251881Speter */ 6006251881Spetersvn_error_t * 6007251881Spetersvn_client_propset_remote(const char *propname, 6008251881Speter const svn_string_t *propval, 6009251881Speter const char *url, 6010251881Speter svn_boolean_t skip_checks, 6011251881Speter svn_revnum_t base_revision_for_url, 6012251881Speter const apr_hash_t *revprop_table, 6013251881Speter svn_commit_callback2_t commit_callback, 6014251881Speter void *commit_baton, 6015251881Speter svn_client_ctx_t *ctx, 6016251881Speter apr_pool_t *scratch_pool); 6017251881Speter 6018251881Speter/** 6019251881Speter * Set @a propname to @a propval on each (const char *) target in @a 6020251881Speter * targets. The targets must be all working copy paths. A @a propval 6021251881Speter * of @c NULL will delete the property. 6022251881Speter * 6023251881Speter * If @a depth is #svn_depth_empty, set the property on each member of 6024251881Speter * @a targets only; if #svn_depth_files, set it on @a targets and their 6025251881Speter * file children (if any); if #svn_depth_immediates, on @a targets and all 6026251881Speter * of their immediate children (both files and directories); if 6027251881Speter * #svn_depth_infinity, on @a targets and everything beneath them. 6028251881Speter * 6029251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 6030251881Speter * names, used as a restrictive filter on items whose properties are 6031251881Speter * set; that is, don't set properties on any item unless it's a member 6032251881Speter * of one of those changelists. If @a changelists is empty (or 6033251881Speter * altogether @c NULL), no changelist filtering occurs. 6034251881Speter * 6035251881Speter * If @a propname is an svn-controlled property (i.e. prefixed with 6036251881Speter * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 6037251881Speter * the value is UTF8-encoded and uses LF line-endings. 6038251881Speter * 6039251881Speter * If @a skip_checks is TRUE, do no validity checking. But if @a 6040251881Speter * skip_checks is FALSE, and @a propname is not a valid property for @a 6041251881Speter * targets, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the 6042251881Speter * property is not appropriate for @a targets), or 6043251881Speter * #SVN_ERR_BAD_MIME_TYPE (if @a propname is "svn:mime-type", but @a 6044251881Speter * propval is not a valid mime-type). 6045251881Speter * 6046251881Speter * If @a ctx->cancel_func is non-NULL, invoke it passing @a 6047251881Speter * ctx->cancel_baton at various places during the operation. 6048251881Speter * 6049251881Speter * Use @a scratch_pool for all memory allocation. 6050251881Speter * 6051251881Speter * @since New in 1.7. 6052251881Speter */ 6053251881Spetersvn_error_t * 6054251881Spetersvn_client_propset_local(const char *propname, 6055251881Speter const svn_string_t *propval, 6056251881Speter const apr_array_header_t *targets, 6057251881Speter svn_depth_t depth, 6058251881Speter svn_boolean_t skip_checks, 6059251881Speter const apr_array_header_t *changelists, 6060251881Speter svn_client_ctx_t *ctx, 6061251881Speter apr_pool_t *scratch_pool); 6062251881Speter 6063251881Speter/** 6064251881Speter * An amalgamation of svn_client_propset_local() and 6065251881Speter * svn_client_propset_remote() that takes only a single target, and 6066251881Speter * returns the commit info in @a *commit_info_p rather than through a 6067251881Speter * callback function. 6068251881Speter * 6069251881Speter * @since New in 1.5. 6070251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 6071251881Speter */ 6072251881SpeterSVN_DEPRECATED 6073251881Spetersvn_error_t * 6074251881Spetersvn_client_propset3(svn_commit_info_t **commit_info_p, 6075251881Speter const char *propname, 6076251881Speter const svn_string_t *propval, 6077251881Speter const char *target, 6078251881Speter svn_depth_t depth, 6079251881Speter svn_boolean_t skip_checks, 6080251881Speter svn_revnum_t base_revision_for_url, 6081251881Speter const apr_array_header_t *changelists, 6082251881Speter const apr_hash_t *revprop_table, 6083251881Speter svn_client_ctx_t *ctx, 6084251881Speter apr_pool_t *pool); 6085251881Speter 6086251881Speter/** 6087251881Speter * Like svn_client_propset3(), but with @a base_revision_for_url 6088251881Speter * always #SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a 6089251881Speter * changelists always @c NULL; @a revprop_table always @c NULL; and @a 6090251881Speter * depth set according to @a recurse: if @a recurse is TRUE, @a depth 6091251881Speter * is #svn_depth_infinity, else #svn_depth_empty. 6092251881Speter * 6093251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 6094251881Speter */ 6095251881SpeterSVN_DEPRECATED 6096251881Spetersvn_error_t * 6097251881Spetersvn_client_propset2(const char *propname, 6098251881Speter const svn_string_t *propval, 6099251881Speter const char *target, 6100251881Speter svn_boolean_t recurse, 6101251881Speter svn_boolean_t skip_checks, 6102251881Speter svn_client_ctx_t *ctx, 6103251881Speter apr_pool_t *pool); 6104251881Speter 6105251881Speter/** 6106251881Speter * Like svn_client_propset2(), but with @a skip_checks always FALSE and a 6107251881Speter * newly created @a ctx. 6108251881Speter * 6109251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 6110251881Speter */ 6111251881SpeterSVN_DEPRECATED 6112251881Spetersvn_error_t * 6113251881Spetersvn_client_propset(const char *propname, 6114251881Speter const svn_string_t *propval, 6115251881Speter const char *target, 6116251881Speter svn_boolean_t recurse, 6117251881Speter apr_pool_t *pool); 6118251881Speter 6119251881Speter/** Set @a propname to @a propval on revision @a revision in the repository 6120251881Speter * represented by @a URL. Use the authentication baton in @a ctx for 6121251881Speter * authentication, and @a pool for all memory allocation. Return the actual 6122251881Speter * rev affected in @a *set_rev. A @a propval of @c NULL will delete the 6123251881Speter * property. 6124251881Speter * 6125251881Speter * If @a original_propval is non-NULL, then just before setting the 6126251881Speter * new value, check that the old value matches @a original_propval; 6127251881Speter * if they do not match, return the error #SVN_ERR_RA_OUT_OF_DATE. 6128251881Speter * This is to help clients support interactive editing of revprops: 6129251881Speter * without this check, the window during which the property may change 6130251881Speter * underneath the user is as wide as the amount of time the user 6131251881Speter * spends editing the property. With this check, the window is 6132251881Speter * reduced to a small, constant amount of time right before we set the 6133251881Speter * new value. (To check that an old value is still non-existent, set 6134251881Speter * @a original_propval->data to NULL, and @a original_propval->len is 6135251881Speter * ignored.) 6136251881Speter * If the server advertises #SVN_RA_CAPABILITY_ATOMIC_REVPROPS, the 6137251881Speter * check of @a original_propval is done atomically. 6138251881Speter * 6139251881Speter * Note: the representation of "property is not set" in @a 6140251881Speter * original_propval differs from the representation in other APIs 6141251881Speter * (such as svn_fs_change_rev_prop2() and svn_ra_change_rev_prop2()). 6142251881Speter * 6143251881Speter * If @a force is TRUE, allow newlines in the author property. 6144251881Speter * 6145251881Speter * If @a propname is an svn-controlled property (i.e. prefixed with 6146251881Speter * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 6147251881Speter * the value UTF8-encoded and uses LF line-endings. 6148251881Speter * 6149251881Speter * Note that unlike its cousin svn_client_propset3(), this routine 6150251881Speter * doesn't affect the working copy at all; it's a pure network 6151251881Speter * operation that changes an *unversioned* property attached to a 6152251881Speter * revision. This can be used to tweak log messages, dates, authors, 6153251881Speter * and the like. Be careful: it's a lossy operation. 6154251881Speter 6155251881Speter * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification 6156251881Speter * functions and baton which are called upon successful setting of the 6157251881Speter * property. 6158251881Speter * 6159251881Speter * Also note that unless the administrator creates a 6160251881Speter * pre-revprop-change hook in the repository, this feature will fail. 6161251881Speter * 6162251881Speter * @since New in 1.6. 6163251881Speter */ 6164251881Spetersvn_error_t * 6165251881Spetersvn_client_revprop_set2(const char *propname, 6166251881Speter const svn_string_t *propval, 6167251881Speter const svn_string_t *original_propval, 6168251881Speter const char *URL, 6169251881Speter const svn_opt_revision_t *revision, 6170251881Speter svn_revnum_t *set_rev, 6171251881Speter svn_boolean_t force, 6172251881Speter svn_client_ctx_t *ctx, 6173251881Speter apr_pool_t *pool); 6174251881Speter 6175251881Speter/** 6176251881Speter * Similar to svn_client_revprop_set2(), but with @a original_propval 6177251881Speter * always @c NULL. 6178251881Speter * 6179251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 6180251881Speter */ 6181251881SpeterSVN_DEPRECATED 6182251881Spetersvn_error_t * 6183251881Spetersvn_client_revprop_set(const char *propname, 6184251881Speter const svn_string_t *propval, 6185251881Speter const char *URL, 6186251881Speter const svn_opt_revision_t *revision, 6187251881Speter svn_revnum_t *set_rev, 6188251881Speter svn_boolean_t force, 6189251881Speter svn_client_ctx_t *ctx, 6190251881Speter apr_pool_t *pool); 6191251881Speter 6192251881Speter/** 6193251881Speter * Set @a *props to a hash table whose keys are absolute paths or URLs 6194251881Speter * of items on which property @a propname is explicitly set, and whose 6195251881Speter * values are <tt>svn_string_t *</tt> representing the property value for 6196251881Speter * @a propname at that path. 6197251881Speter * 6198251881Speter * If @a inherited_props is not @c NULL, then set @a *inherited_props to a 6199251881Speter * depth-first ordered array of #svn_prop_inherited_item_t * structures 6200251881Speter * representing the properties inherited by @a target. If @a target is a 6201251881Speter * working copy path, then properties inherited by @a target as far as the 6202251881Speter * root of the working copy are obtained from the working copy's actual 6203251881Speter * property values. Properties inherited from above the working copy root 6204251881Speter * come from the inherited properties cache. If @a target is a URL, then 6205251881Speter * the inherited properties come from the repository. If @a inherited_props 6206251881Speter * is not @c NULL and no inheritable properties are found, then set 6207251881Speter * @a *inherited_props to an empty array. 6208251881Speter * 6209251881Speter * The #svn_prop_inherited_item_t->path_or_url members of the 6210251881Speter * #svn_prop_inherited_item_t * structures in @a *inherited_props are 6211251881Speter * URLs if @a target is a URL or if @a target is a working copy path but the 6212251881Speter * property represented by the structure is above the working copy root (i.e. 6213251881Speter * the inherited property is from the cache). In all other cases the 6214251881Speter * #svn_prop_inherited_item_t->path_or_url members are absolute working copy 6215251881Speter * paths. 6216251881Speter * 6217251881Speter * Allocate @a *props (including keys and values) and @a *inherited_props 6218251881Speter * (including its elements) in @a result_pool, use @a scratch_pool for 6219251881Speter * temporary allocations. 6220251881Speter * 6221251881Speter * @a target is a WC absolute path or a URL. 6222251881Speter * 6223251881Speter * Don't store any path, not even @a target, if it does not have a 6224251881Speter * property named @a propname. 6225251881Speter * 6226251881Speter * If @a revision->kind is #svn_opt_revision_unspecified, then: get 6227251881Speter * properties from the working copy if @a target is a working copy 6228251881Speter * path, or from the repository head if @a target is a URL. Else get 6229251881Speter * the properties as of @a revision. The actual node revision 6230251881Speter * selected is determined by the path as it exists in @a peg_revision. 6231251881Speter * If @a peg_revision->kind is #svn_opt_revision_unspecified, then 6232251881Speter * it defaults to #svn_opt_revision_head for URLs or 6233251881Speter * #svn_opt_revision_working for WC targets. Use the authentication 6234251881Speter * baton in @a ctx for authentication if contacting the repository. 6235251881Speter * If @a actual_revnum is not @c NULL, the actual revision number used 6236251881Speter * for the fetch is stored in @a *actual_revnum. 6237251881Speter * 6238251881Speter * If @a depth is #svn_depth_empty, fetch the property from 6239251881Speter * @a target only; if #svn_depth_files, fetch from @a target and its 6240251881Speter * file children (if any); if #svn_depth_immediates, from @a target 6241251881Speter * and all of its immediate children (both files and directories); if 6242251881Speter * #svn_depth_infinity, from @a target and everything beneath it. 6243251881Speter * 6244251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 6245251881Speter * names, used as a restrictive filter on items whose properties are 6246251881Speter * gotten; that is, don't get @a propname on any item unless it's a member 6247251881Speter * of one of those changelists. If @a changelists is empty (or 6248251881Speter * altogether @c NULL), no changelist filtering occurs. 6249251881Speter * 6250251881Speter * If error, don't touch @a *props, otherwise @a *props is a hash table 6251251881Speter * even if empty. 6252251881Speter * 6253251881Speter * This function returns SVN_ERR_UNVERSIONED_RESOURCE when it is called on 6254251881Speter * unversioned nodes. 6255251881Speter * 6256251881Speter * @since New in 1.8. 6257251881Speter */ 6258251881Spetersvn_error_t * 6259251881Spetersvn_client_propget5(apr_hash_t **props, 6260251881Speter apr_array_header_t **inherited_props, 6261251881Speter const char *propname, 6262251881Speter const char *target, /* abspath or URL */ 6263251881Speter const svn_opt_revision_t *peg_revision, 6264251881Speter const svn_opt_revision_t *revision, 6265251881Speter svn_revnum_t *actual_revnum, 6266251881Speter svn_depth_t depth, 6267251881Speter const apr_array_header_t *changelists, 6268251881Speter svn_client_ctx_t *ctx, 6269251881Speter apr_pool_t *result_pool, 6270251881Speter apr_pool_t *scratch_pool); 6271251881Speter 6272251881Speter/** 6273251881Speter * Similar to svn_client_propget5 but with @a inherited_props always 6274251881Speter * passed as NULL. 6275251881Speter * 6276251881Speter * @since New in 1.7. 6277251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 6278251881Speter */ 6279251881SpeterSVN_DEPRECATED 6280251881Spetersvn_error_t * 6281251881Spetersvn_client_propget4(apr_hash_t **props, 6282251881Speter const char *propname, 6283251881Speter const char *target, /* abspath or URL */ 6284251881Speter const svn_opt_revision_t *peg_revision, 6285251881Speter const svn_opt_revision_t *revision, 6286251881Speter svn_revnum_t *actual_revnum, 6287251881Speter svn_depth_t depth, 6288251881Speter const apr_array_header_t *changelists, 6289251881Speter svn_client_ctx_t *ctx, 6290251881Speter apr_pool_t *result_pool, 6291251881Speter apr_pool_t *scratch_pool); 6292251881Speter 6293251881Speter/** 6294251881Speter * Similar to svn_client_propget4(), but with the following change to the 6295251881Speter * output hash keys: keys are `<tt>char *</tt>' paths, prefixed by 6296251881Speter * @a target, which is a working copy path or a URL. 6297251881Speter * 6298251881Speter * This function returns SVN_ERR_ENTRY_NOT_FOUND where svn_client_propget4 6299251881Speter * would return SVN_ERR_UNVERSIONED_RESOURCE. 6300251881Speter * 6301251881Speter * @since New in 1.5. 6302251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 6303251881Speter */ 6304251881SpeterSVN_DEPRECATED 6305251881Spetersvn_error_t * 6306251881Spetersvn_client_propget3(apr_hash_t **props, 6307251881Speter const char *propname, 6308251881Speter const char *target, 6309251881Speter const svn_opt_revision_t *peg_revision, 6310251881Speter const svn_opt_revision_t *revision, 6311251881Speter svn_revnum_t *actual_revnum, 6312251881Speter svn_depth_t depth, 6313251881Speter const apr_array_header_t *changelists, 6314251881Speter svn_client_ctx_t *ctx, 6315251881Speter apr_pool_t *pool); 6316251881Speter 6317251881Speter/** 6318251881Speter * Similar to svn_client_propget3(), except that @a actual_revnum and 6319251881Speter * @a changelists are always @c NULL, and @a depth is set according to 6320251881Speter * @a recurse: if @a recurse is TRUE, then @a depth is 6321251881Speter * #svn_depth_infinity, else #svn_depth_empty. 6322251881Speter * 6323251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 6324251881Speter */ 6325251881SpeterSVN_DEPRECATED 6326251881Spetersvn_error_t * 6327251881Spetersvn_client_propget2(apr_hash_t **props, 6328251881Speter const char *propname, 6329251881Speter const char *target, 6330251881Speter const svn_opt_revision_t *peg_revision, 6331251881Speter const svn_opt_revision_t *revision, 6332251881Speter svn_boolean_t recurse, 6333251881Speter svn_client_ctx_t *ctx, 6334251881Speter apr_pool_t *pool); 6335251881Speter 6336251881Speter/** 6337251881Speter * Similar to svn_client_propget2(), except that @a peg_revision is 6338251881Speter * always the same as @a revision. 6339251881Speter * 6340251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 6341251881Speter */ 6342251881SpeterSVN_DEPRECATED 6343251881Spetersvn_error_t * 6344251881Spetersvn_client_propget(apr_hash_t **props, 6345251881Speter const char *propname, 6346251881Speter const char *target, 6347251881Speter const svn_opt_revision_t *revision, 6348251881Speter svn_boolean_t recurse, 6349251881Speter svn_client_ctx_t *ctx, 6350251881Speter apr_pool_t *pool); 6351251881Speter 6352251881Speter/** Set @a *propval to the value of @a propname on revision @a revision 6353251881Speter * in the repository represented by @a URL. Use the authentication baton 6354251881Speter * in @a ctx for authentication, and @a pool for all memory allocation. 6355251881Speter * Return the actual rev queried in @a *set_rev. 6356251881Speter * 6357289180Speter * If @a propname does not exist on @a revision, set @a *propval to @c NULL. 6358289180Speter * 6359251881Speter * Note that unlike its cousin svn_client_propget(), this routine 6360251881Speter * doesn't affect the working copy at all; it's a pure network 6361251881Speter * operation that queries an *unversioned* property attached to a 6362251881Speter * revision. This can query log messages, dates, authors, and the 6363251881Speter * like. 6364251881Speter */ 6365251881Spetersvn_error_t * 6366251881Spetersvn_client_revprop_get(const char *propname, 6367251881Speter svn_string_t **propval, 6368251881Speter const char *URL, 6369251881Speter const svn_opt_revision_t *revision, 6370251881Speter svn_revnum_t *set_rev, 6371251881Speter svn_client_ctx_t *ctx, 6372251881Speter apr_pool_t *pool); 6373251881Speter 6374251881Speter/** 6375251881Speter * Invoke @a receiver with @a receiver_baton to return the regular explicit, and 6376251881Speter * possibly the inherited, properties of @a target, a URL or working copy path. 6377251881Speter * @a receiver will be called for each path encountered. 6378251881Speter * 6379251881Speter * @a target is a WC path or a URL. 6380251881Speter * 6381251881Speter * If @a revision->kind is #svn_opt_revision_unspecified, then get the 6382251881Speter * explicit (and possibly the inherited) properties from the working copy, 6383251881Speter * if @a target is a working copy path, or from the repository head if 6384251881Speter * @a target is a URL. Else get the properties as of @a revision. 6385251881Speter * The actual node revision selected is determined by the path as it exists 6386251881Speter * in @a peg_revision. If @a peg_revision->kind is 6387251881Speter * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head 6388251881Speter * for URLs or #svn_opt_revision_working for WC targets. Use the 6389251881Speter * authentication baton cached in @a ctx for authentication if contacting 6390251881Speter * the repository. 6391251881Speter * 6392251881Speter * If @a depth is #svn_depth_empty, list only the properties of 6393251881Speter * @a target itself. If @a depth is #svn_depth_files, and 6394251881Speter * @a target is a directory, list the properties of @a target 6395251881Speter * and its file entries. If #svn_depth_immediates, list the properties 6396251881Speter * of its immediate file and directory entries. If #svn_depth_infinity, 6397251881Speter * list the properties of its file entries and recurse (with 6398251881Speter * #svn_depth_infinity) on directory entries. #svn_depth_unknown is 6399251881Speter * equivalent to #svn_depth_empty. All other values produce undefined 6400251881Speter * results. 6401251881Speter * 6402251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 6403251881Speter * names, used as a restrictive filter on items whose properties are 6404251881Speter * listed; that is, don't list properties on any item unless it's a member 6405251881Speter * of one of those changelists. If @a changelists is empty (or 6406251881Speter * altogether @c NULL), no changelist filtering occurs. 6407251881Speter * 6408251881Speter * If @a get_target_inherited_props is true, then also return any inherited 6409251881Speter * properties when @a receiver is called for @a target. If @a target is a 6410251881Speter * working copy path, then properties inherited by @a target as far as the 6411251881Speter * root of the working copy are obtained from the working copy's actual 6412251881Speter * property values. Properties inherited from above the working copy 6413251881Speter * root come from the inherited properties cache. If @a target is a URL, 6414251881Speter * then the inherited properties come from the repository. 6415251881Speter * If @a get_target_inherited_props is false, then no inherited properties 6416251881Speter * are returned to @a receiver. 6417251881Speter * 6418251881Speter * If @a target is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND. 6419251881Speter * 6420251881Speter * @since New in 1.8. 6421251881Speter */ 6422251881Spetersvn_error_t * 6423251881Spetersvn_client_proplist4(const char *target, 6424251881Speter const svn_opt_revision_t *peg_revision, 6425251881Speter const svn_opt_revision_t *revision, 6426251881Speter svn_depth_t depth, 6427251881Speter const apr_array_header_t *changelists, 6428251881Speter svn_boolean_t get_target_inherited_props, 6429251881Speter svn_proplist_receiver2_t receiver, 6430251881Speter void *receiver_baton, 6431251881Speter svn_client_ctx_t *ctx, 6432251881Speter apr_pool_t *scratch_pool); 6433251881Speter 6434251881Speter/** 6435251881Speter * Similar to svn_client_proplist4(), except that the @a receiver type 6436251881Speter * is a #svn_proplist_receiver_t, @a get_target_inherited_props is 6437251881Speter * always passed NULL, and there is no separate scratch pool. 6438251881Speter * 6439251881Speter * @since New in 1.5. 6440251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 6441251881Speter */ 6442251881SpeterSVN_DEPRECATED 6443251881Spetersvn_error_t * 6444251881Spetersvn_client_proplist3(const char *target, 6445251881Speter const svn_opt_revision_t *peg_revision, 6446251881Speter const svn_opt_revision_t *revision, 6447251881Speter svn_depth_t depth, 6448251881Speter const apr_array_header_t *changelists, 6449251881Speter svn_proplist_receiver_t receiver, 6450251881Speter void *receiver_baton, 6451251881Speter svn_client_ctx_t *ctx, 6452251881Speter apr_pool_t *pool); 6453251881Speter 6454251881Speter/** 6455251881Speter * Similar to svn_client_proplist3(), except the properties are 6456251881Speter * returned as an array of #svn_client_proplist_item_t * structures 6457251881Speter * instead of by invoking the receiver function, there's no support 6458251881Speter * for @a changelists filtering, and @a recurse is used instead of a 6459251881Speter * #svn_depth_t parameter (FALSE corresponds to #svn_depth_empty, 6460251881Speter * and TRUE to #svn_depth_infinity). 6461251881Speter * 6462251881Speter * @since New in 1.2. 6463251881Speter * 6464251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 6465251881Speter */ 6466251881SpeterSVN_DEPRECATED 6467251881Spetersvn_error_t * 6468251881Spetersvn_client_proplist2(apr_array_header_t **props, 6469251881Speter const char *target, 6470251881Speter const svn_opt_revision_t *peg_revision, 6471251881Speter const svn_opt_revision_t *revision, 6472251881Speter svn_boolean_t recurse, 6473251881Speter svn_client_ctx_t *ctx, 6474251881Speter apr_pool_t *pool); 6475251881Speter 6476251881Speter/** 6477251881Speter * Similar to svn_client_proplist2(), except that @a peg_revision is 6478251881Speter * always the same as @a revision. 6479251881Speter * 6480251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 6481251881Speter */ 6482251881SpeterSVN_DEPRECATED 6483251881Spetersvn_error_t * 6484251881Spetersvn_client_proplist(apr_array_header_t **props, 6485251881Speter const char *target, 6486251881Speter const svn_opt_revision_t *revision, 6487251881Speter svn_boolean_t recurse, 6488251881Speter svn_client_ctx_t *ctx, 6489251881Speter apr_pool_t *pool); 6490251881Speter 6491251881Speter/** Set @a *props to a hash of the revision props attached to @a revision in 6492251881Speter * the repository represented by @a URL. Use the authentication baton cached 6493251881Speter * in @a ctx for authentication, and @a pool for all memory allocation. 6494251881Speter * Return the actual rev queried in @a *set_rev. 6495251881Speter * 6496251881Speter * The allocated hash maps (<tt>const char *</tt>) property names to 6497251881Speter * (#svn_string_t *) property values. 6498251881Speter * 6499251881Speter * Note that unlike its cousin svn_client_proplist(), this routine 6500251881Speter * doesn't read a working copy at all; it's a pure network operation 6501251881Speter * that reads *unversioned* properties attached to a revision. 6502251881Speter */ 6503251881Spetersvn_error_t * 6504251881Spetersvn_client_revprop_list(apr_hash_t **props, 6505251881Speter const char *URL, 6506251881Speter const svn_opt_revision_t *revision, 6507251881Speter svn_revnum_t *set_rev, 6508251881Speter svn_client_ctx_t *ctx, 6509251881Speter apr_pool_t *pool); 6510251881Speter/** @} */ 6511251881Speter 6512251881Speter 6513251881Speter/** 6514251881Speter * @defgroup Export Export a tree from version control. 6515251881Speter * 6516251881Speter * @{ 6517251881Speter */ 6518251881Speter 6519251881Speter/** 6520251881Speter * Export the contents of either a subversion repository or a 6521251881Speter * subversion working copy into a 'clean' directory (meaning a 6522251881Speter * directory with no administrative directories). If @a result_rev 6523251881Speter * is not @c NULL and the path being exported is a repository URL, set 6524251881Speter * @a *result_rev to the value of the revision actually exported (set 6525251881Speter * it to #SVN_INVALID_REVNUM for local exports). 6526251881Speter * 6527251881Speter * @a from_path_or_url is either the path the working copy on disk, or 6528251881Speter * a URL to the repository you wish to export. 6529251881Speter * 6530251881Speter * When exporting a directory, @a to_path is the path to the directory 6531251881Speter * where you wish to create the exported tree; when exporting a file, it 6532251881Speter * is the path of the file that will be created. If @a to_path is the 6533251881Speter * empty path, then the basename of the export file/directory in the repository 6534251881Speter * will be used. If @a to_path represents an existing directory, and a 6535251881Speter * file is being exported, then a file with the that basename will be 6536251881Speter * created under that directory (as with 'copy' operations). 6537251881Speter * 6538251881Speter * @a peg_revision is the revision where the path is first looked up 6539251881Speter * when exporting from a repository. If @a peg_revision->kind is 6540251881Speter * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head 6541251881Speter * for URLs or #svn_opt_revision_working for WC targets. 6542251881Speter * 6543362181Sdim * @a revision is the revision that should be exported. 6544251881Speter * 6545251881Speter * @a peg_revision and @a revision must not be @c NULL. 6546251881Speter * 6547251881Speter * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification 6548251881Speter * functions and baton which are passed to svn_client_checkout() when 6549251881Speter * exporting from a repository. 6550251881Speter * 6551251881Speter * @a ctx is a context used for authentication in the repository case. 6552251881Speter * 6553251881Speter * @a overwrite if TRUE will cause the export to overwrite files or 6554251881Speter * directories. 6555251881Speter * 6556251881Speter * If @a ignore_externals is set, don't process externals definitions 6557251881Speter * as part of this operation. 6558251881Speter * 6559251881Speter * If @a ignore_keywords is set, don't expand keywords as part of this 6560251881Speter * operation. 6561251881Speter * 6562251881Speter * @a native_eol allows you to override the standard eol marker on the 6563251881Speter * platform you are running on. Can be either "LF", "CR" or "CRLF" or 6564251881Speter * NULL. If NULL will use the standard eol marker. Any other value 6565251881Speter * will cause the #SVN_ERR_IO_UNKNOWN_EOL error to be returned. 6566251881Speter * 6567251881Speter * If @a depth is #svn_depth_infinity, export fully recursively. Else 6568251881Speter * if it is #svn_depth_immediates, export @a from_path_or_url and its 6569251881Speter * immediate children (if any), but with subdirectories empty and at 6570251881Speter * #svn_depth_empty. Else if #svn_depth_files, export @a 6571251881Speter * from_path_or_url and its immediate file children (if any) only. If 6572251881Speter * @a depth is #svn_depth_empty, then export exactly @a 6573251881Speter * from_path_or_url and none of its children. 6574251881Speter * 6575251881Speter * All allocations are done in @a pool. 6576251881Speter * 6577251881Speter * @since New in 1.7. 6578251881Speter */ 6579251881Spetersvn_error_t * 6580251881Spetersvn_client_export5(svn_revnum_t *result_rev, 6581251881Speter const char *from_path_or_url, 6582251881Speter const char *to_path, 6583251881Speter const svn_opt_revision_t *peg_revision, 6584251881Speter const svn_opt_revision_t *revision, 6585251881Speter svn_boolean_t overwrite, 6586251881Speter svn_boolean_t ignore_externals, 6587251881Speter svn_boolean_t ignore_keywords, 6588251881Speter svn_depth_t depth, 6589251881Speter const char *native_eol, 6590251881Speter svn_client_ctx_t *ctx, 6591251881Speter apr_pool_t *pool); 6592251881Speter 6593251881Speter/** 6594251881Speter * Similar to svn_client_export5(), but with @a ignore_keywords set 6595251881Speter * to FALSE. 6596251881Speter * 6597251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 6598251881Speter * @since New in 1.5. 6599251881Speter */ 6600251881SpeterSVN_DEPRECATED 6601251881Spetersvn_error_t * 6602251881Spetersvn_client_export4(svn_revnum_t *result_rev, 6603251881Speter const char *from_path_or_url, 6604251881Speter const char *to_path, 6605251881Speter const svn_opt_revision_t *peg_revision, 6606251881Speter const svn_opt_revision_t *revision, 6607251881Speter svn_boolean_t overwrite, 6608251881Speter svn_boolean_t ignore_externals, 6609251881Speter svn_depth_t depth, 6610251881Speter const char *native_eol, 6611251881Speter svn_client_ctx_t *ctx, 6612251881Speter apr_pool_t *pool); 6613251881Speter 6614251881Speter 6615251881Speter/** 6616251881Speter * Similar to svn_client_export4(), but with @a depth set according to 6617251881Speter * @a recurse: if @a recurse is TRUE, set @a depth to 6618251881Speter * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to 6619251881Speter * #svn_depth_files. 6620251881Speter * 6621251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 6622251881Speter * 6623251881Speter * @since New in 1.2. 6624251881Speter */ 6625251881SpeterSVN_DEPRECATED 6626251881Spetersvn_error_t * 6627251881Spetersvn_client_export3(svn_revnum_t *result_rev, 6628251881Speter const char *from_path_or_url, 6629251881Speter const char *to_path, 6630251881Speter const svn_opt_revision_t *peg_revision, 6631251881Speter const svn_opt_revision_t *revision, 6632251881Speter svn_boolean_t overwrite, 6633251881Speter svn_boolean_t ignore_externals, 6634251881Speter svn_boolean_t recurse, 6635251881Speter const char *native_eol, 6636251881Speter svn_client_ctx_t *ctx, 6637251881Speter apr_pool_t *pool); 6638251881Speter 6639251881Speter 6640251881Speter/** 6641251881Speter * Similar to svn_client_export3(), but with @a peg_revision 6642251881Speter * always set to #svn_opt_revision_unspecified, @a overwrite set to 6643251881Speter * the value of @a force, @a ignore_externals always FALSE, and 6644251881Speter * @a recurse always TRUE. 6645251881Speter * 6646251881Speter * @since New in 1.1. 6647251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 6648251881Speter */ 6649251881SpeterSVN_DEPRECATED 6650251881Spetersvn_error_t * 6651251881Spetersvn_client_export2(svn_revnum_t *result_rev, 6652251881Speter const char *from_path_or_url, 6653251881Speter const char *to_path, 6654251881Speter svn_opt_revision_t *revision, 6655251881Speter svn_boolean_t force, 6656251881Speter const char *native_eol, 6657251881Speter svn_client_ctx_t *ctx, 6658251881Speter apr_pool_t *pool); 6659251881Speter 6660251881Speter 6661251881Speter/** 6662251881Speter * Similar to svn_client_export2(), but with @a native_eol always set 6663251881Speter * to NULL. 6664251881Speter * 6665251881Speter * @deprecated Provided for backward compatibility with the 1.0 API. 6666251881Speter */ 6667251881SpeterSVN_DEPRECATED 6668251881Spetersvn_error_t * 6669251881Spetersvn_client_export(svn_revnum_t *result_rev, 6670251881Speter const char *from_path_or_url, 6671251881Speter const char *to_path, 6672251881Speter svn_opt_revision_t *revision, 6673251881Speter svn_boolean_t force, 6674251881Speter svn_client_ctx_t *ctx, 6675251881Speter apr_pool_t *pool); 6676251881Speter 6677251881Speter/** @} */ 6678251881Speter 6679251881Speter/** 6680251881Speter * @defgroup List List / ls 6681251881Speter * 6682251881Speter * @{ 6683251881Speter */ 6684251881Speter 6685251881Speter/** The type of function invoked by svn_client_list3() to report the details 6686251881Speter * of each directory entry being listed. 6687251881Speter * 6688251881Speter * @a baton is the baton that was passed to the caller. @a path is the 6689251881Speter * entry's path relative to @a abs_path; it is the empty path when reporting 6690251881Speter * the top node of the list operation. @a dirent contains some or all of 6691251881Speter * the directory entry's details, as determined by the caller. @a lock is 6692251881Speter * the entry's lock, if it is locked and if lock information is being 6693251881Speter * reported by the caller; otherwise @a lock is NULL. @a abs_path is the 6694251881Speter * repository path of the top node of the list operation; it is relative to 6695251881Speter * the repository root and begins with "/". 6696251881Speter * 6697251881Speter * If svn_client_list3() was called with @a include_externals set to TRUE, 6698251881Speter * @a external_parent_url and @a external_target will be set. 6699251881Speter * @a external_parent_url is url of the directory which has the 6700251881Speter * externals definitions. @a external_target is the target subdirectory of 6701251881Speter * externals definitions which is relative to the parent directory that holds 6702251881Speter * the external item. 6703251881Speter * 6704251881Speter * If external_parent_url and external_target are defined, the item being 6705251881Speter * listed is part of the external described by external_parent_url and 6706251881Speter * external_target. Else, the item is not part of any external. 6707251881Speter * Moreover, we will never mix items which are part of separate 6708251881Speter * externals, and will always finish listing an external before listing 6709251881Speter * the next one. 6710251881Speter * 6711251881Speter * @a scratch_pool may be used for temporary allocations. 6712251881Speter * 6713251881Speter * @since New in 1.8. 6714251881Speter */ 6715251881Spetertypedef svn_error_t *(*svn_client_list_func2_t)( 6716251881Speter void *baton, 6717251881Speter const char *path, 6718251881Speter const svn_dirent_t *dirent, 6719251881Speter const svn_lock_t *lock, 6720251881Speter const char *abs_path, 6721251881Speter const char *external_parent_url, 6722251881Speter const char *external_target, 6723251881Speter apr_pool_t *scratch_pool); 6724251881Speter 6725251881Speter/** 6726251881Speter * Similar to #svn_client_list_func2_t, but without any information about 6727251881Speter * externals definitions. 6728251881Speter * 6729251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 6730251881Speter * 6731251881Speter * @since New in 1.4 6732251881Speter * 6733251881Speter * */ 6734251881Spetertypedef svn_error_t *(*svn_client_list_func_t)(void *baton, 6735251881Speter const char *path, 6736251881Speter const svn_dirent_t *dirent, 6737251881Speter const svn_lock_t *lock, 6738251881Speter const char *abs_path, 6739251881Speter apr_pool_t *pool); 6740251881Speter 6741251881Speter/** 6742251881Speter * Report the directory entry, and possibly children, for @a 6743251881Speter * path_or_url at @a revision. The actual node revision selected is 6744251881Speter * determined by the path as it exists in @a peg_revision. If @a 6745251881Speter * peg_revision->kind is #svn_opt_revision_unspecified, then it defaults 6746251881Speter * to #svn_opt_revision_head for URLs or #svn_opt_revision_working 6747251881Speter * for WC targets. 6748251881Speter * 6749251881Speter * Report directory entries by invoking @a list_func/@a baton with @a path 6750251881Speter * relative to @a path_or_url. The dirent for @a path_or_url is reported 6751251881Speter * using an empty @a path. If @a path_or_url is a directory, also report 6752251881Speter * its children. If @a path_or_url is non-existent, return 6753251881Speter * #SVN_ERR_FS_NOT_FOUND. 6754251881Speter * 6755362181Sdim * If the @a patterns array of <tt>const char *</tt> is not @c NULL, only 6756362181Sdim * report paths whose last segment matches one of the specified glob 6757362181Sdim * patterns. This does not affect the size of the tree nor the number of 6758362181Sdim * externals being covered. 6759362181Sdim * 6760251881Speter * If @a fetch_locks is TRUE, include locks when reporting directory entries. 6761251881Speter * 6762251881Speter * If @a include_externals is TRUE, also list all external items 6763251881Speter * reached by recursion. @a depth value passed to the original list target 6764251881Speter * applies for the externals also. 6765251881Speter * 6766362181Sdim * Use @a scratch_pool for temporary allocations. 6767251881Speter * 6768251881Speter * Use authentication baton cached in @a ctx to authenticate against the 6769251881Speter * repository. 6770251881Speter * 6771251881Speter * If @a depth is #svn_depth_empty, list just @a path_or_url itself. 6772251881Speter * If @a depth is #svn_depth_files, list @a path_or_url and its file 6773251881Speter * entries. If #svn_depth_immediates, list its immediate file and 6774251881Speter * directory entries. If #svn_depth_infinity, list file entries and 6775251881Speter * recurse (with #svn_depth_infinity) on directory entries. 6776251881Speter * 6777251881Speter * @a dirent_fields controls which fields in the #svn_dirent_t's are 6778251881Speter * filled in. To have them totally filled in use #SVN_DIRENT_ALL, 6779251881Speter * otherwise simply bitwise OR together the combination of @c SVN_DIRENT_ 6780251881Speter * fields you care about. 6781251881Speter * 6782362181Sdim * @since New in 1.10. 6783362181Sdim */ 6784362181Sdimsvn_error_t * 6785362181Sdimsvn_client_list4(const char *path_or_url, 6786362181Sdim const svn_opt_revision_t *peg_revision, 6787362181Sdim const svn_opt_revision_t *revision, 6788362181Sdim const apr_array_header_t *patterns, 6789362181Sdim svn_depth_t depth, 6790362181Sdim apr_uint32_t dirent_fields, 6791362181Sdim svn_boolean_t fetch_locks, 6792362181Sdim svn_boolean_t include_externals, 6793362181Sdim svn_client_list_func2_t list_func, 6794362181Sdim void *baton, 6795362181Sdim svn_client_ctx_t *ctx, 6796362181Sdim apr_pool_t *scratch_pool); 6797362181Sdim 6798362181Sdim/** Similar to svn_client_list4(), but with @a patterns set to @c NULL. 6799362181Sdim * 6800251881Speter * @since New in 1.8. 6801362181Sdim * 6802362181Sdim * @deprecated Provided for backwards compatibility with the 1.9 API. 6803251881Speter */ 6804362181SdimSVN_DEPRECATED 6805251881Spetersvn_error_t * 6806251881Spetersvn_client_list3(const char *path_or_url, 6807251881Speter const svn_opt_revision_t *peg_revision, 6808251881Speter const svn_opt_revision_t *revision, 6809251881Speter svn_depth_t depth, 6810251881Speter apr_uint32_t dirent_fields, 6811251881Speter svn_boolean_t fetch_locks, 6812251881Speter svn_boolean_t include_externals, 6813251881Speter svn_client_list_func2_t list_func, 6814251881Speter void *baton, 6815251881Speter svn_client_ctx_t *ctx, 6816251881Speter apr_pool_t *pool); 6817251881Speter 6818251881Speter 6819251881Speter/** Similar to svn_client_list3(), but with @a include_externals set 6820251881Speter * to FALSE, and using a #svn_client_list_func_t as callback. 6821251881Speter * 6822362181Sdim * @since New in 1.5. 6823362181Sdim * 6824251881Speter * @deprecated Provided for backwards compatibility with the 1.7 API. 6825251881Speter */ 6826251881SpeterSVN_DEPRECATED 6827251881Spetersvn_error_t * 6828251881Spetersvn_client_list2(const char *path_or_url, 6829251881Speter const svn_opt_revision_t *peg_revision, 6830251881Speter const svn_opt_revision_t *revision, 6831251881Speter svn_depth_t depth, 6832251881Speter apr_uint32_t dirent_fields, 6833251881Speter svn_boolean_t fetch_locks, 6834251881Speter svn_client_list_func_t list_func, 6835251881Speter void *baton, 6836251881Speter svn_client_ctx_t *ctx, 6837251881Speter apr_pool_t *pool); 6838251881Speter 6839251881Speter/** 6840251881Speter * Similar to svn_client_list2(), but with @a recurse instead of @a depth. 6841362181Sdim * If @a recurse is FALSE, pass #svn_depth_immediates for @a depth; else 6842251881Speter * pass #svn_depth_infinity. 6843251881Speter * 6844251881Speter * @since New in 1.4. 6845251881Speter * 6846251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 6847251881Speter */ 6848251881SpeterSVN_DEPRECATED 6849251881Spetersvn_error_t * 6850251881Spetersvn_client_list(const char *path_or_url, 6851251881Speter const svn_opt_revision_t *peg_revision, 6852251881Speter const svn_opt_revision_t *revision, 6853251881Speter svn_boolean_t recurse, 6854251881Speter apr_uint32_t dirent_fields, 6855251881Speter svn_boolean_t fetch_locks, 6856251881Speter svn_client_list_func_t list_func, 6857251881Speter void *baton, 6858251881Speter svn_client_ctx_t *ctx, 6859251881Speter apr_pool_t *pool); 6860251881Speter 6861251881Speter/** 6862251881Speter * Same as svn_client_list(), but always passes #SVN_DIRENT_ALL for 6863251881Speter * the @a dirent_fields argument and returns all information in two 6864251881Speter * hash tables instead of invoking a callback. 6865251881Speter * 6866251881Speter * Set @a *dirents to a newly allocated hash of directory entries. 6867251881Speter * The @a dirents hash maps entry names (<tt>const char *</tt>) to 6868251881Speter * #svn_dirent_t *'s. 6869251881Speter * 6870251881Speter * If @a locks is not @c NULL, set @a *locks to a hash table mapping 6871251881Speter * entry names (<tt>const char *</tt>) to #svn_lock_t *'s. 6872251881Speter * 6873251881Speter * @since New in 1.3. 6874251881Speter * 6875251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 6876251881Speter * Use svn_client_list2() instead. 6877251881Speter */ 6878251881SpeterSVN_DEPRECATED 6879251881Spetersvn_error_t * 6880251881Spetersvn_client_ls3(apr_hash_t **dirents, 6881251881Speter apr_hash_t **locks, 6882251881Speter const char *path_or_url, 6883251881Speter const svn_opt_revision_t *peg_revision, 6884251881Speter const svn_opt_revision_t *revision, 6885251881Speter svn_boolean_t recurse, 6886251881Speter svn_client_ctx_t *ctx, 6887251881Speter apr_pool_t *pool); 6888251881Speter 6889251881Speter/** 6890251881Speter * Same as svn_client_ls3(), but without the ability to get locks. 6891251881Speter * 6892251881Speter * @since New in 1.2. 6893251881Speter * 6894251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 6895251881Speter * Use svn_client_list2() instead. 6896251881Speter */ 6897251881SpeterSVN_DEPRECATED 6898251881Spetersvn_error_t * 6899251881Spetersvn_client_ls2(apr_hash_t **dirents, 6900251881Speter const char *path_or_url, 6901251881Speter const svn_opt_revision_t *peg_revision, 6902251881Speter const svn_opt_revision_t *revision, 6903251881Speter svn_boolean_t recurse, 6904251881Speter svn_client_ctx_t *ctx, 6905251881Speter apr_pool_t *pool); 6906251881Speter 6907251881Speter/** 6908251881Speter * Similar to svn_client_ls2() except that @a peg_revision is always 6909251881Speter * the same as @a revision. 6910251881Speter * 6911251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 6912251881Speter * Use svn_client_list2() instead. 6913251881Speter */ 6914251881SpeterSVN_DEPRECATED 6915251881Spetersvn_error_t * 6916251881Spetersvn_client_ls(apr_hash_t **dirents, 6917251881Speter const char *path_or_url, 6918251881Speter svn_opt_revision_t *revision, 6919251881Speter svn_boolean_t recurse, 6920251881Speter svn_client_ctx_t *ctx, 6921251881Speter apr_pool_t *pool); 6922251881Speter 6923251881Speter 6924251881Speter/** @} */ 6925251881Speter 6926251881Speter/** 6927251881Speter * @defgroup Cat View the contents of a file in the repository. 6928251881Speter * 6929251881Speter * @{ 6930251881Speter */ 6931251881Speter 6932251881Speter/** 6933251881Speter * Output the content of a file. 6934251881Speter * 6935289180Speter * @param[out] props Optional output argument to obtain properties. 6936289180Speter * @param[in] out The stream to which the content will be written. 6937289180Speter * @param[in] path_or_url The path or URL of the file. 6938289180Speter * @param[in] peg_revision The peg revision. 6939289180Speter * @param[in] revision The operative revision. 6940289180Speter * @param[in] expand_keywords When true, keywords (when set) are expanded. 6941251881Speter * @param[in] ctx The standard client context, used for possible 6942251881Speter * authentication. 6943251881Speter * 6944251881Speter * @return A pointer to an #svn_error_t of the type (this list is not 6945251881Speter * exhaustive): <br> 6946251881Speter * An unspecified error if @a revision is of kind 6947251881Speter * #svn_opt_revision_previous (or some other kind that requires 6948251881Speter * a local path), because the desired revision cannot be 6949251881Speter * determined. <br> 6950251881Speter * If no error occurred, return #SVN_NO_ERROR. 6951251881Speter * 6952289180Speter * If @a *props is not NULL it is set to a hash of all the file's 6953289180Speter * non-inherited properties. If it is NULL, the properties are only 6954289180Speter * used for determining how and if the file should be translated. 6955251881Speter * 6956251881Speter * @see #svn_client_ctx_t <br> @ref clnt_revisions for 6957251881Speter * a discussion of operative and peg revisions. 6958289180Speter * 6959289180Speter * @since New in 1.9. 6960251881Speter */ 6961251881Spetersvn_error_t * 6962289180Spetersvn_client_cat3(apr_hash_t **props, 6963289180Speter svn_stream_t *out, 6964289180Speter const char *path_or_url, 6965289180Speter const svn_opt_revision_t *peg_revision, 6966289180Speter const svn_opt_revision_t *revision, 6967289180Speter svn_boolean_t expand_keywords, 6968289180Speter svn_client_ctx_t *ctx, 6969289180Speter apr_pool_t *result_pool, 6970289180Speter apr_pool_t *scratch_pool); 6971289180Speter 6972289180Speter/** 6973289180Speter * Similar to svn_client_cat3() except without the option of directly 6974289180Speter * reading the properties, and with @a expand_keywords always TRUE. 6975289180Speter * 6976289180Speter * @since New in 1.2. 6977289180Speter * @deprecated Provided for backward compatibility with the 1.8 API. 6978289180Speter */ 6979289180SpeterSVN_DEPRECATED 6980289180Spetersvn_error_t * 6981251881Spetersvn_client_cat2(svn_stream_t *out, 6982251881Speter const char *path_or_url, 6983251881Speter const svn_opt_revision_t *peg_revision, 6984251881Speter const svn_opt_revision_t *revision, 6985251881Speter svn_client_ctx_t *ctx, 6986251881Speter apr_pool_t *pool); 6987251881Speter 6988251881Speter 6989251881Speter/** 6990251881Speter * Similar to svn_client_cat2() except that the peg revision is always 6991251881Speter * the same as @a revision. 6992251881Speter * 6993251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 6994251881Speter */ 6995251881SpeterSVN_DEPRECATED 6996251881Spetersvn_error_t * 6997251881Spetersvn_client_cat(svn_stream_t *out, 6998251881Speter const char *path_or_url, 6999251881Speter const svn_opt_revision_t *revision, 7000251881Speter svn_client_ctx_t *ctx, 7001251881Speter apr_pool_t *pool); 7002251881Speter 7003251881Speter/** @} end group: cat */ 7004251881Speter 7005251881Speter 7006251881Speter/** Changelist commands 7007251881Speter * 7008251881Speter * @defgroup svn_client_changelist_funcs Client Changelist Functions 7009251881Speter * @{ 7010251881Speter */ 7011251881Speter 7012251881Speter/** 7013251881Speter * Add each path in @a paths (recursing to @a depth as necessary) to 7014251881Speter * @a changelist. If a path is already a member of another 7015251881Speter * changelist, then remove it from the other changelist and add it to 7016251881Speter * @a changelist. (For now, a path cannot belong to two changelists 7017251881Speter * at once.) 7018251881Speter * 7019251881Speter * @a paths is an array of (const char *) local WC paths. 7020251881Speter * 7021251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 7022251881Speter * names, used as a restrictive filter on items whose changelist 7023251881Speter * assignments are adjusted; that is, don't tweak the changeset of any 7024251881Speter * item unless it's currently a member of one of those changelists. 7025251881Speter * If @a changelists is empty (or altogether @c NULL), no changelist 7026251881Speter * filtering occurs. 7027251881Speter * 7028251881Speter * @note This metadata is purely a client-side "bookkeeping" 7029251881Speter * convenience, and is entirely managed by the working copy. 7030251881Speter * 7031251881Speter * @since New in 1.5. 7032251881Speter */ 7033251881Spetersvn_error_t * 7034251881Spetersvn_client_add_to_changelist(const apr_array_header_t *paths, 7035251881Speter const char *changelist, 7036251881Speter svn_depth_t depth, 7037251881Speter const apr_array_header_t *changelists, 7038251881Speter svn_client_ctx_t *ctx, 7039251881Speter apr_pool_t *pool); 7040251881Speter 7041251881Speter/** 7042251881Speter * Remove each path in @a paths (recursing to @a depth as necessary) 7043251881Speter * from changelists to which they are currently assigned. 7044251881Speter * 7045251881Speter * @a paths is an array of (const char *) local WC paths. 7046251881Speter * 7047251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 7048251881Speter * names, used as a restrictive filter on items whose changelist 7049251881Speter * assignments are removed; that is, don't remove from a changeset any 7050251881Speter * item unless it's currently a member of one of those changelists. 7051251881Speter * If @a changelists is empty (or altogether @c NULL), all changelist 7052251881Speter * assignments in and under each path in @a paths (to @a depth) will 7053251881Speter * be removed. 7054251881Speter * 7055251881Speter * @note This metadata is purely a client-side "bookkeeping" 7056251881Speter * convenience, and is entirely managed by the working copy. 7057251881Speter * 7058251881Speter * @since New in 1.5. 7059251881Speter */ 7060251881Spetersvn_error_t * 7061251881Spetersvn_client_remove_from_changelists(const apr_array_header_t *paths, 7062251881Speter svn_depth_t depth, 7063251881Speter const apr_array_header_t *changelists, 7064251881Speter svn_client_ctx_t *ctx, 7065251881Speter apr_pool_t *pool); 7066251881Speter 7067251881Speter 7068251881Speter/** 7069251881Speter * Beginning at @a path, crawl to @a depth to discover every path in 7070251881Speter * or under @a path which belongs to one of the changelists in @a 7071251881Speter * changelists (an array of <tt>const char *</tt> changelist names). 7072251881Speter * If @a changelists is @c NULL, discover paths with any changelist. 7073251881Speter * Call @a callback_func (with @a callback_baton) each time a 7074251881Speter * changelist-having path is discovered. 7075251881Speter * 7076251881Speter * @a path is a local WC path. 7077251881Speter * 7078251881Speter * If @a ctx->cancel_func is not @c NULL, invoke it passing @a 7079251881Speter * ctx->cancel_baton during the recursive walk. 7080251881Speter * 7081251881Speter * @since New in 1.5. 7082251881Speter */ 7083251881Spetersvn_error_t * 7084251881Spetersvn_client_get_changelists(const char *path, 7085251881Speter const apr_array_header_t *changelists, 7086251881Speter svn_depth_t depth, 7087251881Speter svn_changelist_receiver_t callback_func, 7088251881Speter void *callback_baton, 7089251881Speter svn_client_ctx_t *ctx, 7090251881Speter apr_pool_t *pool); 7091251881Speter 7092251881Speter/** @} */ 7093251881Speter 7094251881Speter 7095251881Speter 7096251881Speter/** Locking commands 7097251881Speter * 7098251881Speter * @defgroup svn_client_locking_funcs Client Locking Functions 7099251881Speter * @{ 7100251881Speter */ 7101251881Speter 7102251881Speter/** 7103251881Speter * Lock @a targets in the repository. @a targets is an array of 7104251881Speter * <tt>const char *</tt> paths - either all working copy paths or all URLs. 7105251881Speter * All targets must be in the same repository. 7106251881Speter * 7107251881Speter * If a target is already locked in the repository, no lock will be 7108251881Speter * acquired unless @a steal_lock is TRUE, in which case the locks are 7109251881Speter * stolen. @a comment, if non-NULL, is an xml-escapable description 7110251881Speter * stored with each lock in the repository. Each acquired lock will 7111251881Speter * be stored in the working copy if the targets are WC paths. 7112251881Speter * 7113251881Speter * For each target @a ctx->notify_func2/notify_baton2 will be used to indicate 7114251881Speter * whether it was locked. An action of #svn_wc_notify_locked 7115251881Speter * means that the path was locked. If the path was not locked because 7116251881Speter * it was out of date or there was already a lock in the repository, 7117251881Speter * the notification function will be called with 7118251881Speter * #svn_wc_notify_failed_lock, and the error passed in the notification 7119251881Speter * structure. 7120251881Speter * 7121251881Speter * Use @a pool for temporary allocations. 7122251881Speter * 7123251881Speter * @since New in 1.2. 7124251881Speter */ 7125251881Spetersvn_error_t * 7126251881Spetersvn_client_lock(const apr_array_header_t *targets, 7127251881Speter const char *comment, 7128251881Speter svn_boolean_t steal_lock, 7129251881Speter svn_client_ctx_t *ctx, 7130251881Speter apr_pool_t *pool); 7131251881Speter 7132251881Speter/** 7133251881Speter * Unlock @a targets in the repository. @a targets is an array of 7134251881Speter * <tt>const char *</tt> paths - either all working copy paths or all URLs. 7135251881Speter * All targets must be in the same repository. 7136251881Speter * 7137251881Speter * If the targets are WC paths, and @a break_lock is FALSE, the working 7138251881Speter * copy must contain a lock for each target. 7139251881Speter * If this is not the case, or the working copy lock doesn't match the 7140251881Speter * lock token in the repository, an error will be signaled. 7141251881Speter * 7142251881Speter * If the targets are URLs, the locks may be broken even if @a break_lock 7143251881Speter * is FALSE, but only if the lock owner is the same as the 7144251881Speter * authenticated user. 7145251881Speter * 7146251881Speter * If @a break_lock is TRUE, the locks will be broken in the 7147251881Speter * repository. In both cases, the locks, if any, will be removed from 7148251881Speter * the working copy if the targets are WC paths. 7149251881Speter * 7150251881Speter * The notification functions in @a ctx will be called for each 7151251881Speter * target. If the target was successfully unlocked, 7152251881Speter * #svn_wc_notify_unlocked will be used. Else, if the error is 7153251881Speter * directly related to unlocking the path (see 7154251881Speter * #SVN_ERR_IS_UNLOCK_ERROR), #svn_wc_notify_failed_unlock will be 7155251881Speter * used and the error will be passed in the notification structure. 7156251881Speter 7157251881Speter * Use @a pool for temporary allocations. 7158251881Speter * 7159251881Speter * @since New in 1.2. 7160251881Speter */ 7161251881Spetersvn_error_t * 7162251881Spetersvn_client_unlock(const apr_array_header_t *targets, 7163251881Speter svn_boolean_t break_lock, 7164251881Speter svn_client_ctx_t *ctx, 7165251881Speter apr_pool_t *pool); 7166251881Speter 7167251881Speter/** @} */ 7168251881Speter 7169251881Speter/** 7170251881Speter * @defgroup Info Show repository information about a working copy. 7171251881Speter * 7172251881Speter * @{ 7173251881Speter */ 7174251881Speter 7175251881Speter/** The size of the file is unknown. 7176251881Speter * Used as value in fields of type @c apr_size_t in #svn_info_t. 7177251881Speter * 7178251881Speter * @since New in 1.5 7179251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 7180251881Speter */ 7181251881Speter#define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1) 7182251881Speter 7183251881Speter/** 7184251881Speter * A structure which describes various system-generated metadata about 7185251881Speter * a working-copy path or URL. 7186251881Speter * 7187251881Speter * @note Fields may be added to the end of this structure in future 7188251881Speter * versions. Therefore, users shouldn't allocate structures of this 7189251881Speter * type, to preserve binary compatibility. 7190251881Speter * 7191251881Speter * @since New in 1.2. 7192251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. The new 7193251881Speter * API is #svn_client_info2_t. 7194251881Speter */ 7195251881Spetertypedef struct svn_info_t 7196251881Speter{ 7197251881Speter /** Where the item lives in the repository. */ 7198251881Speter const char *URL; 7199251881Speter 7200251881Speter /** The revision of the object. If path_or_url is a working-copy 7201251881Speter * path, then this is its current working revnum. If path_or_url 7202251881Speter * is a URL, then this is the repos revision that path_or_url lives in. */ 7203251881Speter svn_revnum_t rev; 7204251881Speter 7205251881Speter /** The node's kind. */ 7206251881Speter svn_node_kind_t kind; 7207251881Speter 7208251881Speter /** The root URL of the repository. */ 7209251881Speter const char *repos_root_URL; 7210251881Speter 7211251881Speter /** The repository's UUID. */ 7212251881Speter const char *repos_UUID; 7213251881Speter 7214251881Speter /** The last revision in which this object changed. */ 7215251881Speter svn_revnum_t last_changed_rev; 7216251881Speter 7217251881Speter /** The date of the last_changed_rev. */ 7218251881Speter apr_time_t last_changed_date; 7219251881Speter 7220251881Speter /** The author of the last_changed_rev. */ 7221251881Speter const char *last_changed_author; 7222251881Speter 7223251881Speter /** An exclusive lock, if present. Could be either local or remote. */ 7224251881Speter svn_lock_t *lock; 7225251881Speter 7226251881Speter /** Whether or not to ignore the next 10 wc-specific fields. */ 7227251881Speter svn_boolean_t has_wc_info; 7228251881Speter 7229251881Speter /** 7230251881Speter * @name Working-copy path fields 7231251881Speter * These things only apply to a working-copy path. 7232251881Speter * See svn_wc_entry_t for explanations. 7233251881Speter * @{ 7234251881Speter */ 7235251881Speter svn_wc_schedule_t schedule; 7236251881Speter const char *copyfrom_url; 7237251881Speter svn_revnum_t copyfrom_rev; 7238251881Speter apr_time_t text_time; 7239251881Speter apr_time_t prop_time; /* will always be 0 for svn 1.4 and later */ 7240251881Speter const char *checksum; 7241251881Speter const char *conflict_old; 7242251881Speter const char *conflict_new; 7243251881Speter const char *conflict_wrk; 7244251881Speter const char *prejfile; 7245251881Speter /** @since New in 1.5. */ 7246251881Speter const char *changelist; 7247251881Speter /** @since New in 1.5. */ 7248251881Speter svn_depth_t depth; 7249251881Speter 7250251881Speter /** 7251251881Speter * Similar to working_size64, but will be #SVN_INFO_SIZE_UNKNOWN when 7252251881Speter * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte). 7253251881Speter * 7254251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 7255251881Speter */ 7256251881Speter apr_size_t working_size; 7257251881Speter 7258251881Speter /** @} */ 7259251881Speter 7260251881Speter /** 7261251881Speter * Similar to size64, but size will be #SVN_INFO_SIZE_UNKNOWN when 7262251881Speter * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte). 7263251881Speter * 7264251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 7265251881Speter */ 7266251881Speter apr_size_t size; 7267251881Speter 7268251881Speter /** 7269251881Speter * The size of the file in the repository (untranslated, 7270251881Speter * e.g. without adjustment of line endings and keyword 7271251881Speter * expansion). Only applicable for file -- not directory -- URLs. 7272251881Speter * For working copy paths, size64 will be #SVN_INVALID_FILESIZE. 7273251881Speter * @since New in 1.6. 7274251881Speter */ 7275251881Speter svn_filesize_t size64; 7276251881Speter 7277251881Speter /** 7278251881Speter * The size of the file after being translated into its local 7279251881Speter * representation, or #SVN_INVALID_FILESIZE if unknown. 7280251881Speter * Not applicable for directories. 7281251881Speter * @since New in 1.6. 7282251881Speter * @name Working-copy path fields 7283251881Speter * @{ 7284251881Speter */ 7285251881Speter svn_filesize_t working_size64; 7286251881Speter 7287251881Speter /** 7288251881Speter * Info on any tree conflict of which this node is a victim. Otherwise NULL. 7289251881Speter * @since New in 1.6. 7290251881Speter */ 7291251881Speter svn_wc_conflict_description_t *tree_conflict; 7292251881Speter 7293251881Speter /** @} */ 7294251881Speter 7295251881Speter} svn_info_t; 7296251881Speter 7297251881Speter 7298251881Speter/** 7299251881Speter * The callback invoked by svn_client_info2(). Each invocation 7300251881Speter * describes @a path with the information present in @a info. Note 7301251881Speter * that any fields within @a info may be NULL if information is 7302251881Speter * unavailable. Use @a pool for all temporary allocation. 7303251881Speter * 7304251881Speter * @since New in 1.2. 7305251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. The new 7306251881Speter * API is #svn_client_info_receiver2_t. 7307251881Speter */ 7308251881Spetertypedef svn_error_t *(*svn_info_receiver_t)( 7309251881Speter void *baton, 7310251881Speter const char *path, 7311251881Speter const svn_info_t *info, 7312251881Speter apr_pool_t *pool); 7313251881Speter 7314251881Speter/** 7315251881Speter * Return a duplicate of @a info, allocated in @a pool. No part of the new 7316251881Speter * structure will be shared with @a info. 7317251881Speter * 7318251881Speter * @since New in 1.3. 7319251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. The new 7320251881Speter * API is #svn_client_info2_dup(). 7321251881Speter */ 7322251881SpeterSVN_DEPRECATED 7323251881Spetersvn_info_t * 7324251881Spetersvn_info_dup(const svn_info_t *info, 7325251881Speter apr_pool_t *pool); 7326251881Speter 7327251881Speter/** 7328251881Speter * A structure which describes various system-generated metadata about 7329251881Speter * a working-copy path or URL. 7330251881Speter * 7331251881Speter * @note Fields may be added to the end of this structure in future 7332251881Speter * versions. Therefore, users shouldn't allocate structures of this 7333251881Speter * type, to preserve binary compatibility. 7334251881Speter * 7335251881Speter * @since New in 1.7. 7336251881Speter */ 7337251881Spetertypedef struct svn_client_info2_t 7338251881Speter{ 7339251881Speter /** Where the item lives in the repository. */ 7340251881Speter const char *URL; 7341251881Speter 7342251881Speter /** The revision of the object. If the target is a working-copy 7343251881Speter * path, then this is its current working revnum. If the target 7344251881Speter * is a URL, then this is the repos revision that it lives in. */ 7345251881Speter svn_revnum_t rev; 7346251881Speter 7347251881Speter /** The root URL of the repository. */ 7348251881Speter const char *repos_root_URL; 7349251881Speter 7350251881Speter /** The repository's UUID. */ 7351251881Speter const char *repos_UUID; 7352251881Speter 7353251881Speter /** The node's kind. */ 7354251881Speter svn_node_kind_t kind; 7355251881Speter 7356251881Speter /** The size of the file in the repository (untranslated, 7357251881Speter * e.g. without adjustment of line endings and keyword 7358251881Speter * expansion). Only applicable for file -- not directory -- URLs. 7359251881Speter * For working copy paths, @a size will be #SVN_INVALID_FILESIZE. */ 7360251881Speter svn_filesize_t size; 7361251881Speter 7362251881Speter /** The last revision in which this object changed. */ 7363251881Speter svn_revnum_t last_changed_rev; 7364251881Speter 7365251881Speter /** The date of the last_changed_rev. */ 7366251881Speter apr_time_t last_changed_date; 7367251881Speter 7368251881Speter /** The author of the last_changed_rev. */ 7369251881Speter const char *last_changed_author; 7370251881Speter 7371251881Speter /** An exclusive lock, if present. Could be either local or remote. */ 7372251881Speter const svn_lock_t *lock; 7373251881Speter 7374251881Speter /** Possible information about the working copy, NULL if not valid. */ 7375251881Speter const svn_wc_info_t *wc_info; 7376251881Speter 7377251881Speter} svn_client_info2_t; 7378251881Speter 7379251881Speter/** 7380251881Speter * Return a duplicate of @a info, allocated in @a pool. No part of the new 7381251881Speter * structure will be shared with @a info. 7382251881Speter * 7383251881Speter * @since New in 1.7. 7384251881Speter */ 7385251881Spetersvn_client_info2_t * 7386251881Spetersvn_client_info2_dup(const svn_client_info2_t *info, 7387251881Speter apr_pool_t *pool); 7388251881Speter 7389251881Speter/** 7390251881Speter * The callback invoked by info retrievers. Each invocation 7391251881Speter * describes @a abspath_or_url with the information present in @a info. 7392251881Speter * Use @a scratch_pool for all temporary allocation. 7393251881Speter * 7394251881Speter * @since New in 1.7. 7395251881Speter */ 7396251881Spetertypedef svn_error_t *(*svn_client_info_receiver2_t)( 7397251881Speter void *baton, 7398251881Speter const char *abspath_or_url, 7399251881Speter const svn_client_info2_t *info, 7400251881Speter apr_pool_t *scratch_pool); 7401251881Speter 7402251881Speter/** 7403251881Speter * Invoke @a receiver with @a receiver_baton to return information 7404251881Speter * about @a abspath_or_url in @a revision. The information returned is 7405251881Speter * system-generated metadata, not the sort of "property" metadata 7406251881Speter * created by users. See #svn_client_info2_t. 7407251881Speter * 7408251881Speter * If both revision arguments are either #svn_opt_revision_unspecified 7409251881Speter * or @c NULL, then information will be pulled solely from the working copy; 7410251881Speter * no network connections will be made. 7411251881Speter * 7412251881Speter * Otherwise, information will be pulled from a repository. The 7413251881Speter * actual node revision selected is determined by the @a abspath_or_url 7414251881Speter * as it exists in @a peg_revision. If @a peg_revision->kind is 7415251881Speter * #svn_opt_revision_unspecified, then it defaults to 7416251881Speter * #svn_opt_revision_head for URLs or #svn_opt_revision_working for 7417251881Speter * WC targets. 7418251881Speter * 7419251881Speter * If @a abspath_or_url is not a local path, then if @a revision is of 7420251881Speter * kind #svn_opt_revision_previous (or some other kind that requires 7421251881Speter * a local path), an error will be returned, because the desired 7422251881Speter * revision cannot be determined. 7423251881Speter * 7424251881Speter * Use the authentication baton cached in @a ctx to authenticate 7425251881Speter * against the repository. 7426251881Speter * 7427251881Speter * If @a abspath_or_url is a file, just invoke @a receiver on it. If it 7428251881Speter * is a directory, then descend according to @a depth. If @a depth is 7429251881Speter * #svn_depth_empty, invoke @a receiver on @a abspath_or_url and 7430251881Speter * nothing else; if #svn_depth_files, on @a abspath_or_url and its 7431251881Speter * immediate file children; if #svn_depth_immediates, the preceding 7432251881Speter * plus on each immediate subdirectory; if #svn_depth_infinity, then 7433251881Speter * recurse fully, invoking @a receiver on @a abspath_or_url and 7434251881Speter * everything beneath it. 7435251881Speter * 7436251881Speter * If @a fetch_excluded is TRUE, also also send excluded nodes in the working 7437251881Speter * copy to @a receiver, otherwise these are skipped. If @a fetch_actual_only 7438251881Speter * is TRUE also send nodes that don't exist as versioned but are still 7439251881Speter * tree conflicted. 7440251881Speter * 7441289180Speter * If @a include_externals is @c TRUE, recurse into externals and report about 7442289180Speter * them as well. 7443289180Speter * 7444251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 7445251881Speter * names, used as a restrictive filter on items whose info is 7446251881Speter * reported; that is, don't report info about any item unless 7447251881Speter * it's a member of one of those changelists. If @a changelists is 7448251881Speter * empty (or altogether @c NULL), no changelist filtering occurs. 7449251881Speter * 7450289180Speter * @since New in 1.9. 7451289180Speter */ 7452289180Spetersvn_error_t * 7453289180Spetersvn_client_info4(const char *abspath_or_url, 7454289180Speter const svn_opt_revision_t *peg_revision, 7455289180Speter const svn_opt_revision_t *revision, 7456289180Speter svn_depth_t depth, 7457289180Speter svn_boolean_t fetch_excluded, 7458289180Speter svn_boolean_t fetch_actual_only, 7459289180Speter svn_boolean_t include_externals, 7460289180Speter const apr_array_header_t *changelists, 7461289180Speter svn_client_info_receiver2_t receiver, 7462289180Speter void *receiver_baton, 7463289180Speter svn_client_ctx_t *ctx, 7464289180Speter apr_pool_t *scratch_pool); 7465289180Speter 7466289180Speter 7467289180Speter/** Similar to svn_client_info4, but doesn't support walking externals. 7468289180Speter * 7469251881Speter * @since New in 1.7. 7470289180Speter * @deprecated Provided for backward compatibility with the 1.8 API. 7471251881Speter */ 7472289180SpeterSVN_DEPRECATED 7473251881Spetersvn_error_t * 7474251881Spetersvn_client_info3(const char *abspath_or_url, 7475251881Speter const svn_opt_revision_t *peg_revision, 7476251881Speter const svn_opt_revision_t *revision, 7477251881Speter svn_depth_t depth, 7478251881Speter svn_boolean_t fetch_excluded, 7479251881Speter svn_boolean_t fetch_actual_only, 7480251881Speter const apr_array_header_t *changelists, 7481251881Speter svn_client_info_receiver2_t receiver, 7482251881Speter void *receiver_baton, 7483251881Speter svn_client_ctx_t *ctx, 7484251881Speter apr_pool_t *scratch_pool); 7485251881Speter 7486251881Speter/** Similar to svn_client_info3, but uses an svn_info_receiver_t instead of 7487251881Speter * a #svn_client_info_receiver2_t, and @a path_or_url may be a relative path. 7488251881Speter * 7489251881Speter * @since New in 1.5. 7490251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 7491251881Speter */ 7492251881SpeterSVN_DEPRECATED 7493251881Spetersvn_error_t * 7494251881Spetersvn_client_info2(const char *path_or_url, 7495251881Speter const svn_opt_revision_t *peg_revision, 7496251881Speter const svn_opt_revision_t *revision, 7497251881Speter svn_info_receiver_t receiver, 7498251881Speter void *receiver_baton, 7499251881Speter svn_depth_t depth, 7500251881Speter const apr_array_header_t *changelists, 7501251881Speter svn_client_ctx_t *ctx, 7502251881Speter apr_pool_t *pool); 7503251881Speter 7504251881Speter/** 7505251881Speter * Similar to svn_client_info2() but with @a changelists passed as @c 7506251881Speter * NULL, and @a depth set according to @a recurse: if @a recurse is 7507251881Speter * TRUE, @a depth is #svn_depth_infinity, else #svn_depth_empty. 7508251881Speter * 7509251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 7510251881Speter */ 7511251881SpeterSVN_DEPRECATED 7512251881Spetersvn_error_t * 7513251881Spetersvn_client_info(const char *path_or_url, 7514251881Speter const svn_opt_revision_t *peg_revision, 7515251881Speter const svn_opt_revision_t *revision, 7516251881Speter svn_info_receiver_t receiver, 7517251881Speter void *receiver_baton, 7518251881Speter svn_boolean_t recurse, 7519251881Speter svn_client_ctx_t *ctx, 7520251881Speter apr_pool_t *pool); 7521251881Speter 7522251881Speter/** 7523251881Speter * Set @a *wcroot_abspath to the local abspath of the root of the 7524251881Speter * working copy in which @a local_abspath resides. 7525251881Speter * 7526251881Speter * @since New in 1.7. 7527251881Speter */ 7528251881Spetersvn_error_t * 7529251881Spetersvn_client_get_wc_root(const char **wcroot_abspath, 7530251881Speter const char *local_abspath, 7531251881Speter svn_client_ctx_t *ctx, 7532251881Speter apr_pool_t *result_pool, 7533251881Speter apr_pool_t *scratch_pool); 7534251881Speter 7535251881Speter/** 7536251881Speter * Set @a *min_revision and @a *max_revision to the lowest and highest 7537251881Speter * revision numbers found within @a local_abspath. If @a committed is 7538251881Speter * TRUE, set @a *min_revision and @a *max_revision to the lowest and 7539251881Speter * highest comitted (i.e. "last changed") revision numbers, 7540251881Speter * respectively. NULL may be passed for either of @a min_revision and 7541251881Speter * @a max_revision to indicate the caller's lack of interest in the 7542251881Speter * value. Use @a scratch_pool for temporary allocations. 7543251881Speter * 7544251881Speter * @since New in 1.7. 7545251881Speter */ 7546251881Spetersvn_error_t * 7547251881Spetersvn_client_min_max_revisions(svn_revnum_t *min_revision, 7548251881Speter svn_revnum_t *max_revision, 7549251881Speter const char *local_abspath, 7550251881Speter svn_boolean_t committed, 7551251881Speter svn_client_ctx_t *ctx, 7552251881Speter apr_pool_t *scratch_pool); 7553251881Speter 7554251881Speter/** @} */ 7555251881Speter 7556251881Speter 7557251881Speter/** 7558251881Speter * @defgroup Patch Apply a patch to the working copy 7559251881Speter * 7560251881Speter * @{ 7561251881Speter */ 7562251881Speter 7563251881Speter/** 7564251881Speter * The callback invoked by svn_client_patch() before attempting to patch 7565251881Speter * the target file at @a canon_path_from_patchfile (the path as parsed from 7566251881Speter * the patch file, but in canonicalized form). The callback can set 7567251881Speter * @a *filtered to @c TRUE to prevent the file from being patched, or else 7568251881Speter * must set it to @c FALSE. 7569251881Speter * 7570251881Speter * The callback is also provided with @a patch_abspath, the path of a 7571251881Speter * temporary file containing the patched result, and with @a reject_abspath, 7572251881Speter * the path to a temporary file containing the diff text of any hunks 7573251881Speter * which were rejected during patching. 7574251881Speter * 7575251881Speter * Because the callback is invoked before the patching attempt is made, 7576251881Speter * there is no guarantee that the target file will actually be patched 7577251881Speter * successfully. Client implementations must pay attention to notification 7578251881Speter * feedback provided by svn_client_patch() to find out which paths were 7579251881Speter * patched successfully. 7580251881Speter * 7581251881Speter * Note also that the files at @a patch_abspath and @a reject_abspath are 7582251881Speter * guaranteed to remain on disk after patching only if the 7583251881Speter * @a remove_tempfiles parameter for svn_client_patch() is @c FALSE. 7584251881Speter * 7585251881Speter * The const char * parameters may be allocated in @a scratch_pool which 7586251881Speter * will be cleared after each invocation. 7587251881Speter * 7588251881Speter * @since New in 1.7. 7589251881Speter */ 7590251881Spetertypedef svn_error_t *(*svn_client_patch_func_t)( 7591251881Speter void *baton, 7592251881Speter svn_boolean_t *filtered, 7593251881Speter const char *canon_path_from_patchfile, 7594251881Speter const char *patch_abspath, 7595251881Speter const char *reject_abspath, 7596251881Speter apr_pool_t *scratch_pool); 7597251881Speter 7598251881Speter/** 7599251881Speter * Apply a unidiff patch that's located at absolute path 7600251881Speter * @a patch_abspath to the working copy directory at @a wc_dir_abspath. 7601251881Speter * 7602251881Speter * This function makes a best-effort attempt at applying the patch. 7603251881Speter * It might skip patch targets which cannot be patched (e.g. targets 7604251881Speter * that are outside of the working copy). It will also reject hunks 7605251881Speter * which cannot be applied to a target in case the hunk's context 7606251881Speter * does not match anywhere in the patch target. 7607251881Speter * 7608251881Speter * If @a dry_run is TRUE, the patching process is carried out, and full 7609251881Speter * notification feedback is provided, but the working copy is not modified. 7610251881Speter * 7611251881Speter * @a strip_count specifies how many leading path components should be 7612251881Speter * stripped from paths obtained from the patch. It is an error if a 7613251881Speter * negative strip count is passed. 7614251881Speter * 7615251881Speter * If @a reverse is @c TRUE, apply patches in reverse, deleting lines 7616251881Speter * the patch would add and adding lines the patch would delete. 7617251881Speter * 7618251881Speter * If @a ignore_whitespace is TRUE, allow patches to be applied if they 7619251881Speter * only differ from the target by whitespace. 7620251881Speter * 7621251881Speter * If @a remove_tempfiles is TRUE, lifetimes of temporary files created 7622251881Speter * during patching will be managed internally. Otherwise, the caller should 7623251881Speter * take ownership of these files, the names of which can be obtained by 7624251881Speter * passing a @a patch_func callback. 7625251881Speter * 7626251881Speter * If @a patch_func is non-NULL, invoke @a patch_func with @a patch_baton 7627251881Speter * for each patch target processed. 7628251881Speter * 7629251881Speter * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with 7630251881Speter * @a ctx->notify_baton2 as patching progresses. 7631251881Speter * 7632251881Speter * If @a ctx->cancel_func is non-NULL, invoke it passing @a 7633251881Speter * ctx->cancel_baton at various places during the operation. 7634251881Speter * 7635251881Speter * Use @a scratch_pool for temporary allocations. 7636251881Speter * 7637251881Speter * @since New in 1.7. 7638251881Speter */ 7639251881Spetersvn_error_t * 7640251881Spetersvn_client_patch(const char *patch_abspath, 7641251881Speter const char *wc_dir_abspath, 7642251881Speter svn_boolean_t dry_run, 7643251881Speter int strip_count, 7644251881Speter svn_boolean_t reverse, 7645251881Speter svn_boolean_t ignore_whitespace, 7646251881Speter svn_boolean_t remove_tempfiles, 7647251881Speter svn_client_patch_func_t patch_func, 7648251881Speter void *patch_baton, 7649251881Speter svn_client_ctx_t *ctx, 7650251881Speter apr_pool_t *scratch_pool); 7651251881Speter 7652251881Speter/** @} */ 7653251881Speter 7654251881Speter/** @} end group: Client working copy management */ 7655251881Speter 7656251881Speter/** 7657251881Speter * 7658251881Speter * @defgroup clnt_sessions Client session related functions 7659251881Speter * 7660251881Speter * @{ 7661251881Speter * 7662251881Speter */ 7663251881Speter 7664251881Speter 7665251881Speter/* Converting paths to URLs. */ 7666251881Speter 7667251881Speter/** Set @a *url to the URL for @a path_or_url allocated in result_pool. 7668251881Speter * 7669251881Speter * If @a path_or_url is already a URL, set @a *url to @a path_or_url. 7670251881Speter * 7671251881Speter * If @a path_or_url is a versioned item, set @a *url to @a 7672251881Speter * path_or_url's entry URL. If @a path_or_url is unversioned (has 7673251881Speter * no entry), set @a *url to NULL. 7674251881Speter * 7675251881Speter * Use @a ctx->wc_ctx to retrieve the information. Use 7676251881Speter ** @a scratch_pool for temporary allocations. 7677251881Speter * 7678251881Speter * @since New in 1.7. 7679251881Speter */ 7680251881Spetersvn_error_t * 7681251881Spetersvn_client_url_from_path2(const char **url, 7682251881Speter const char *path_or_url, 7683251881Speter svn_client_ctx_t *ctx, 7684251881Speter apr_pool_t *result_pool, 7685251881Speter apr_pool_t *scratch_pool); 7686251881Speter 7687251881Speter/** Similar to svn_client_url_from_path2(), but without a context argument. 7688251881Speter * 7689251881Speter * @since New in 1.5. 7690251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 7691251881Speter */ 7692251881SpeterSVN_DEPRECATED 7693251881Spetersvn_error_t * 7694251881Spetersvn_client_url_from_path(const char **url, 7695251881Speter const char *path_or_url, 7696251881Speter apr_pool_t *pool); 7697251881Speter 7698251881Speter 7699251881Speter 7700251881Speter/* Fetching a repository's root URL and UUID. */ 7701251881Speter 7702251881Speter/** Set @a *repos_root_url and @a *repos_uuid, to the root URL and UUID of 7703251881Speter * the repository in which @a abspath_or_url is versioned. Use the 7704251881Speter * authentication baton and working copy context cached in @a ctx as 7705251881Speter * necessary. @a repos_root_url and/or @a repos_uuid may be NULL if not 7706251881Speter * wanted. 7707251881Speter * 7708251881Speter * This function will open a temporary RA session to the repository if 7709251881Speter * necessary to get the information. 7710251881Speter * 7711251881Speter * Allocate @a *repos_root_url and @a *repos_uuid in @a result_pool. 7712251881Speter * Use @a scratch_pool for temporary allocations. 7713251881Speter * 7714251881Speter * @since New in 1.8. 7715251881Speter */ 7716251881Spetersvn_error_t * 7717251881Spetersvn_client_get_repos_root(const char **repos_root_url, 7718251881Speter const char **repos_uuid, 7719251881Speter const char *abspath_or_url, 7720251881Speter svn_client_ctx_t *ctx, 7721251881Speter apr_pool_t *result_pool, 7722251881Speter apr_pool_t *scratch_pool); 7723251881Speter 7724251881Speter/** Set @a *url to the repository root URL of the repository in which 7725251881Speter * @a path_or_url is versioned (or scheduled to be versioned), 7726251881Speter * allocated in @a pool. @a ctx is required for possible repository 7727251881Speter * authentication. 7728251881Speter * 7729251881Speter * @since New in 1.5. 7730251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. Use 7731251881Speter * svn_client_get_repos_root() instead, with an absolute path. 7732251881Speter */ 7733251881SpeterSVN_DEPRECATED 7734251881Spetersvn_error_t * 7735251881Spetersvn_client_root_url_from_path(const char **url, 7736251881Speter const char *path_or_url, 7737251881Speter svn_client_ctx_t *ctx, 7738251881Speter apr_pool_t *pool); 7739251881Speter 7740251881Speter/** Get repository @a uuid for @a url. 7741251881Speter * 7742251881Speter * Use a @a pool to open a temporary RA session to @a url, discover the 7743251881Speter * repository uuid, and free the session. Return the uuid in @a uuid, 7744251881Speter * allocated in @a pool. @a ctx is required for possible repository 7745251881Speter * authentication. 7746251881Speter * 7747251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. Use 7748251881Speter * svn_client_get_repos_root() instead. 7749251881Speter */ 7750251881SpeterSVN_DEPRECATED 7751251881Spetersvn_error_t * 7752251881Spetersvn_client_uuid_from_url(const char **uuid, 7753251881Speter const char *url, 7754251881Speter svn_client_ctx_t *ctx, 7755251881Speter apr_pool_t *pool); 7756251881Speter 7757251881Speter 7758251881Speter/** Return the repository @a uuid for working-copy @a local_abspath, 7759251881Speter * allocated in @a result_pool. Use @a ctx->wc_ctx to retrieve the 7760251881Speter * information. 7761251881Speter * 7762251881Speter * Use @a scratch_pool for temporary allocations. 7763251881Speter * 7764251881Speter * @since New in 1.7. 7765251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. Use 7766251881Speter * svn_client_get_repos_root() instead. 7767251881Speter */ 7768251881SpeterSVN_DEPRECATED 7769251881Spetersvn_error_t * 7770251881Spetersvn_client_uuid_from_path2(const char **uuid, 7771251881Speter const char *local_abspath, 7772251881Speter svn_client_ctx_t *ctx, 7773251881Speter apr_pool_t *result_pool, 7774251881Speter apr_pool_t *scratch_pool); 7775251881Speter 7776251881Speter/** Similar to svn_client_uuid_from_path2(), but with a relative path and 7777251881Speter * an access baton. 7778251881Speter * 7779251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 7780251881Speter */ 7781251881SpeterSVN_DEPRECATED 7782251881Spetersvn_error_t * 7783251881Spetersvn_client_uuid_from_path(const char **uuid, 7784251881Speter const char *path, 7785251881Speter svn_wc_adm_access_t *adm_access, 7786251881Speter svn_client_ctx_t *ctx, 7787251881Speter apr_pool_t *pool); 7788251881Speter 7789251881Speter 7790251881Speter/* Opening RA sessions. */ 7791251881Speter 7792251881Speter/** Open an RA session rooted at @a url, and return it in @a *session. 7793251881Speter * 7794251881Speter * Use the authentication baton stored in @a ctx for authentication. 7795251881Speter * @a *session is allocated in @a result_pool. 7796251881Speter * 7797251881Speter * If @a wri_abspath is not NULL, use the working copy identified by @a 7798251881Speter * wri_abspath to potentially avoid transferring unneeded data. 7799251881Speter * 7800251881Speter * @note This function is similar to svn_ra_open4(), but the caller avoids 7801251881Speter * having to providing its own callback functions. 7802251881Speter * @since New in 1.8. 7803251881Speter */ 7804251881Spetersvn_error_t * 7805251881Spetersvn_client_open_ra_session2(svn_ra_session_t **session, 7806251881Speter const char *url, 7807251881Speter const char *wri_abspath, 7808251881Speter svn_client_ctx_t *ctx, 7809251881Speter apr_pool_t *result_pool, 7810251881Speter apr_pool_t *scratch_pool); 7811251881Speter 7812262250Speter/** Similar to svn_client_open_ra_session2(), but with @ wri_abspath 7813251881Speter * always passed as NULL, and with the same pool used as both @a 7814251881Speter * result_pool and @a scratch_pool. 7815251881Speter * 7816251881Speter * @since New in 1.3. 7817251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 7818251881Speter */ 7819251881SpeterSVN_DEPRECATED 7820251881Spetersvn_error_t * 7821251881Spetersvn_client_open_ra_session(svn_ra_session_t **session, 7822251881Speter const char *url, 7823251881Speter svn_client_ctx_t *ctx, 7824251881Speter apr_pool_t *pool); 7825251881Speter 7826251881Speter 7827251881Speter/** @} end group: Client session related functions */ 7828251881Speter 7829251881Speter/** @} */ 7830251881Speter 7831251881Speter#ifdef __cplusplus 7832251881Speter} 7833251881Speter#endif /* __cplusplus */ 7834251881Speter 7835251881Speter#endif /* SVN_CLIENT_H */ 7836