svn_client.h revision 298845
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 * 503251881Speter * See http://subversion.tigris.org/issues/show_bug.cgi?id=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 523251881Speter * 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 739251881Speter/** Callback type used by svn_client_blame5() 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 * @a start_revnum and @a end_revnum contain the start and end revision 745251881Speter * number of the entire blame operation, as determined from the repository 746251881Speter * inside svn_client_blame5(). This can be useful for the blame receiver 747251881Speter * to format the blame output. 748251881Speter * 749251881Speter * If svn_client_blame5() was called with @a include_merged_revisions set to 750251881Speter * TRUE, @a merged_revision, @a merged_rev_props and @a merged_path will be 751251881Speter * set, otherwise they will be NULL. @a merged_path will be set to the 752251881Speter * absolute repository path. 753251881Speter * 754251881Speter * All allocations should be performed in @a pool. 755251881Speter * 756251881Speter * @note If there is no blame information for this line, @a revision will be 757251881Speter * invalid and @a rev_props will be NULL. In this case @a local_change 758251881Speter * will be true if the reason there is no blame information is that the line 759251881Speter * was modified locally. In all other cases @a local_change will be false. 760251881Speter * 761251881Speter * @since New in 1.7. 762251881Speter */ 763251881Spetertypedef svn_error_t *(*svn_client_blame_receiver3_t)( 764251881Speter void *baton, 765251881Speter svn_revnum_t start_revnum, 766251881Speter svn_revnum_t end_revnum, 767251881Speter apr_int64_t line_no, 768251881Speter svn_revnum_t revision, 769251881Speter apr_hash_t *rev_props, 770251881Speter svn_revnum_t merged_revision, 771251881Speter apr_hash_t *merged_rev_props, 772251881Speter const char *merged_path, 773251881Speter const char *line, 774251881Speter svn_boolean_t local_change, 775251881Speter apr_pool_t *pool); 776251881Speter 777251881Speter/** 778251881Speter * Similar to #svn_client_blame_receiver3_t, but with separate author and 779251881Speter * date revision properties instead of all revision properties, and without 780251881Speter * information about local changes. 781251881Speter * 782251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 783251881Speter * 784251881Speter * @since New in 1.5. 785251881Speter */ 786251881Spetertypedef svn_error_t *(*svn_client_blame_receiver2_t)( 787251881Speter void *baton, 788251881Speter apr_int64_t line_no, 789251881Speter svn_revnum_t revision, 790251881Speter const char *author, 791251881Speter const char *date, 792251881Speter svn_revnum_t merged_revision, 793251881Speter const char *merged_author, 794251881Speter const char *merged_date, 795251881Speter const char *merged_path, 796251881Speter const char *line, 797251881Speter apr_pool_t *pool); 798251881Speter 799251881Speter/** 800251881Speter * Similar to #svn_client_blame_receiver2_t, but without @a merged_revision, 801251881Speter * @a merged_author, @a merged_date, or @a merged_path members. 802251881Speter * 803251881Speter * @note New in 1.4 is that the line is defined to contain only the line 804251881Speter * content (and no [partial] EOLs; which was undefined in older versions). 805251881Speter * Using this callback with svn_client_blame() or svn_client_blame2() 806251881Speter * will still give you the old behaviour. 807251881Speter * 808251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 809251881Speter */ 810251881Spetertypedef svn_error_t *(*svn_client_blame_receiver_t)( 811251881Speter void *baton, 812251881Speter apr_int64_t line_no, 813251881Speter svn_revnum_t revision, 814251881Speter const char *author, 815251881Speter const char *date, 816251881Speter const char *line, 817251881Speter apr_pool_t *pool); 818251881Speter 819251881Speter 820251881Speter/** @} */ 821251881Speter 822251881Speter/** 823251881Speter * Client diff 824251881Speter * 825251881Speter * @defgroup clnt_diff Client diff functionality 826251881Speter * 827251881Speter * @{ 828251881Speter */ 829251881Speter/** The difference type in an svn_diff_summarize_t structure. 830251881Speter * 831251881Speter * @since New in 1.4. 832251881Speter */ 833251881Spetertypedef enum svn_client_diff_summarize_kind_t 834251881Speter{ 835251881Speter /** An item with no text modifications */ 836251881Speter svn_client_diff_summarize_kind_normal, 837251881Speter 838251881Speter /** An added item */ 839251881Speter svn_client_diff_summarize_kind_added, 840251881Speter 841251881Speter /** An item with text modifications */ 842251881Speter svn_client_diff_summarize_kind_modified, 843251881Speter 844251881Speter /** A deleted item */ 845251881Speter svn_client_diff_summarize_kind_deleted 846251881Speter} svn_client_diff_summarize_kind_t; 847251881Speter 848251881Speter 849251881Speter/** A struct that describes the diff of an item. Passed to 850251881Speter * #svn_client_diff_summarize_func_t. 851251881Speter * 852251881Speter * @note Fields may be added to the end of this structure in future 853251881Speter * versions. Therefore, users shouldn't allocate structures of this 854251881Speter * type, to preserve binary compatibility. 855251881Speter * 856251881Speter * @since New in 1.4. 857251881Speter */ 858251881Spetertypedef struct svn_client_diff_summarize_t 859251881Speter{ 860251881Speter /** Path relative to the target. If the target is a file, path is 861251881Speter * the empty string. */ 862251881Speter const char *path; 863251881Speter 864251881Speter /** Change kind */ 865251881Speter svn_client_diff_summarize_kind_t summarize_kind; 866251881Speter 867251881Speter /** Properties changed? For consistency with 'svn status' output, 868251881Speter * this should be false if summarize_kind is _added or _deleted. */ 869251881Speter svn_boolean_t prop_changed; 870251881Speter 871251881Speter /** File or dir */ 872251881Speter svn_node_kind_t node_kind; 873251881Speter} svn_client_diff_summarize_t; 874251881Speter 875251881Speter/** 876251881Speter * Return a duplicate of @a diff, allocated in @a pool. No part of the new 877251881Speter * structure will be shared with @a diff. 878251881Speter * 879251881Speter * @since New in 1.4. 880251881Speter */ 881251881Spetersvn_client_diff_summarize_t * 882251881Spetersvn_client_diff_summarize_dup(const svn_client_diff_summarize_t *diff, 883251881Speter apr_pool_t *pool); 884251881Speter 885251881Speter 886251881Speter/** A callback used in svn_client_diff_summarize2() and 887251881Speter * svn_client_diff_summarize_peg2() for reporting a @a diff summary. 888251881Speter * 889251881Speter * All allocations should be performed in @a pool. 890251881Speter * 891251881Speter * @a baton is a closure object; it should be provided by the implementation, 892251881Speter * and passed by the caller. 893251881Speter * 894251881Speter * @since New in 1.4. 895251881Speter */ 896251881Spetertypedef svn_error_t *(*svn_client_diff_summarize_func_t)( 897251881Speter const svn_client_diff_summarize_t *diff, 898251881Speter void *baton, 899251881Speter apr_pool_t *pool); 900251881Speter 901251881Speter 902251881Speter 903251881Speter/** @} */ 904251881Speter 905251881Speter 906251881Speter/** 907251881Speter * Client context 908251881Speter * 909251881Speter * @defgroup clnt_ctx Client context management 910251881Speter * 911251881Speter * @{ 912251881Speter */ 913251881Speter 914251881Speter/** A client context structure, which holds client specific callbacks, 915251881Speter * batons, serves as a cache for configuration options, and other various 916251881Speter * and sundry things. In order to avoid backwards compatibility problems 917251881Speter * clients should use svn_client_create_context() to allocate and 918251881Speter * initialize this structure instead of doing so themselves. 919251881Speter */ 920251881Spetertypedef struct svn_client_ctx_t 921251881Speter{ 922251881Speter /** main authentication baton. */ 923251881Speter svn_auth_baton_t *auth_baton; 924251881Speter 925251881Speter /** notification callback function. 926251881Speter * This will be called by notify_func2() by default. 927251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 928251881Speter * Use @c notify_func2 instead. */ 929251881Speter svn_wc_notify_func_t notify_func; 930251881Speter 931251881Speter /** notification callback baton for notify_func() 932251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 933251881Speter * Use @c notify_baton2 instead */ 934251881Speter void *notify_baton; 935251881Speter 936251881Speter /** Log message callback function. NULL means that Subversion 937251881Speter * should try not attempt to fetch a log message. 938251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 939251881Speter * Use @c log_msg_func2 instead. */ 940251881Speter svn_client_get_commit_log_t log_msg_func; 941251881Speter 942251881Speter /** log message callback baton 943251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 944251881Speter * Use @c log_msg_baton2 instead. */ 945251881Speter void *log_msg_baton; 946251881Speter 947251881Speter /** a hash mapping of <tt>const char *</tt> configuration file names to 948251881Speter * #svn_config_t *'s. For example, the '~/.subversion/config' file's 949251881Speter * contents should have the key "config". May be left unset (or set to 950251881Speter * NULL) to use the built-in default settings and not use any configuration. 951251881Speter */ 952251881Speter apr_hash_t *config; 953251881Speter 954251881Speter /** a callback to be used to see if the client wishes to cancel the running 955251881Speter * operation. */ 956251881Speter svn_cancel_func_t cancel_func; 957251881Speter 958251881Speter /** a baton to pass to the cancellation callback. */ 959251881Speter void *cancel_baton; 960251881Speter 961251881Speter /** notification function, defaulting to a function that forwards 962251881Speter * to notify_func(). If @c NULL, it will not be invoked. 963251881Speter * @since New in 1.2. */ 964251881Speter svn_wc_notify_func2_t notify_func2; 965251881Speter 966251881Speter /** notification baton for notify_func2(). 967251881Speter * @since New in 1.2. */ 968251881Speter void *notify_baton2; 969251881Speter 970251881Speter /** Log message callback function. NULL means that Subversion 971251881Speter * should try log_msg_func. 972251881Speter * @since New in 1.3. */ 973251881Speter svn_client_get_commit_log2_t log_msg_func2; 974251881Speter 975251881Speter /** callback baton for log_msg_func2 976251881Speter * @since New in 1.3. */ 977251881Speter void *log_msg_baton2; 978251881Speter 979251881Speter /** Notification callback for network progress information. 980251881Speter * May be NULL if not used. 981251881Speter * @since New in 1.3. */ 982251881Speter svn_ra_progress_notify_func_t progress_func; 983251881Speter 984251881Speter /** Callback baton for progress_func. 985251881Speter * @since New in 1.3. */ 986251881Speter void *progress_baton; 987251881Speter 988251881Speter /** Log message callback function. NULL means that Subversion 989251881Speter * should try @c log_msg_func2, then @c log_msg_func. 990251881Speter * @since New in 1.5. */ 991251881Speter svn_client_get_commit_log3_t log_msg_func3; 992251881Speter 993251881Speter /** The callback baton for @c log_msg_func3. 994251881Speter * @since New in 1.5. */ 995251881Speter void *log_msg_baton3; 996251881Speter 997251881Speter /** MIME types map. 998251881Speter * @since New in 1.5. */ 999251881Speter apr_hash_t *mimetypes_map; 1000251881Speter 1001251881Speter /** Conflict resolution callback and baton, if available. 1002251881Speter * @since New in 1.5. */ 1003251881Speter svn_wc_conflict_resolver_func_t conflict_func; 1004251881Speter void *conflict_baton; 1005251881Speter 1006251881Speter /** Custom client name string, or @c NULL. 1007251881Speter * @since New in 1.5. */ 1008251881Speter const char *client_name; 1009251881Speter 1010251881Speter /** Conflict resolution callback and baton, if available. NULL means that 1011251881Speter * subversion should try @c conflict_func. 1012251881Speter * @since New in 1.7. */ 1013251881Speter svn_wc_conflict_resolver_func2_t conflict_func2; 1014251881Speter void *conflict_baton2; 1015251881Speter 1016251881Speter /** A working copy context for the client operation to use. 1017251881Speter * This is initialized by svn_client_create_context() and should never 1018251881Speter * be @c NULL. 1019251881Speter * 1020251881Speter * @since New in 1.7. */ 1021251881Speter svn_wc_context_t *wc_ctx; 1022251881Speter 1023289180Speter /** Check-tunnel callback 1024289180Speter * 1025289180Speter * If not @c NULL, and open_tunnel_func is also not @c NULL, this 1026289180Speter * callback will be invoked to check if open_tunnel_func should be 1027289180Speter * used to create a specific tunnel, or if the default tunnel 1028289180Speter * implementation (either built-in or configured in the client 1029289180Speter * configuration file) should be used instead. 1030289180Speter * @since New in 1.9. 1031289180Speter */ 1032289180Speter svn_ra_check_tunnel_func_t check_tunnel_func; 1033289180Speter 1034289180Speter /** Open-tunnel callback 1035289180Speter * 1036289180Speter * If not @c NULL, this callback will be invoked to create a tunnel 1037289180Speter * for a ra_svn connection that needs one, overriding any tunnel 1038289180Speter * definitions in the client config file. This callback is used only 1039289180Speter * for ra_svn and ignored by the other RA modules. 1040289180Speter * @since New in 1.9. 1041289180Speter */ 1042289180Speter svn_ra_open_tunnel_func_t open_tunnel_func; 1043289180Speter 1044289180Speter /** The baton used with check_tunnel_func and open_tunnel_func. 1045289180Speter * @since New in 1.9. 1046289180Speter */ 1047289180Speter void *tunnel_baton; 1048251881Speter} svn_client_ctx_t; 1049251881Speter 1050251881Speter/** Initialize a client context. 1051251881Speter * Set @a *ctx to a client context object, allocated in @a pool, that 1052251881Speter * represents a particular instance of an svn client. @a cfg_hash is used 1053251881Speter * to initialise the config member of the returned context object and should 1054251881Speter * remain valid for the lifetime of the object. @a cfg_hash may be @c NULL, 1055251881Speter * in which case it is ignored. 1056251881Speter * 1057251881Speter * In order to avoid backwards compatibility problems, clients must 1058251881Speter * use this function to initialize and allocate the 1059251881Speter * #svn_client_ctx_t structure rather than doing so themselves, as 1060251881Speter * the size of this structure may change in the future. 1061251881Speter * 1062251881Speter * The current implementation never returns error, but callers should 1063251881Speter * still check for error, for compatibility with future versions. 1064251881Speter * 1065251881Speter * @since New in 1.8. 1066251881Speter */ 1067251881Spetersvn_error_t * 1068251881Spetersvn_client_create_context2(svn_client_ctx_t **ctx, 1069251881Speter apr_hash_t *cfg_hash, 1070251881Speter apr_pool_t *pool); 1071251881Speter 1072251881Speter 1073251881Speter/** Similar to svn_client_create_context2 but passes a NULL @a cfg_hash. 1074251881Speter * 1075251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 1076251881Speter */ 1077251881SpeterSVN_DEPRECATED 1078251881Spetersvn_error_t * 1079251881Spetersvn_client_create_context(svn_client_ctx_t **ctx, 1080251881Speter apr_pool_t *pool); 1081251881Speter 1082251881Speter/** @} end group: Client context management */ 1083251881Speter 1084251881Speter/** 1085289180Speter * @deprecated Provided for backward compatibility. This constant was never 1086289180Speter * used in released versions. 1087251881Speter */ 1088251881Speter#define SVN_CLIENT_AUTH_USERNAME "username" 1089289180Speter/** 1090289180Speter * @deprecated Provided for backward compatibility. This constant was never 1091289180Speter * used in released versions. 1092289180Speter */ 1093251881Speter#define SVN_CLIENT_AUTH_PASSWORD "password" 1094251881Speter 1095251881Speter/** Client argument processing 1096251881Speter * 1097251881Speter * @defgroup clnt_cmdline Client command-line processing 1098251881Speter * 1099251881Speter * @{ 1100251881Speter */ 1101251881Speter 1102251881Speter/** 1103251881Speter * Pull remaining target arguments from @a os into @a *targets_p, 1104251881Speter * converting them to UTF-8, followed by targets from @a known_targets 1105251881Speter * (which might come from, for example, the "--targets" command line option). 1106251881Speter * 1107251881Speter * Process each target in one of the following ways. For a repository- 1108251881Speter * relative URL: resolve to a full URL, contacting the repository if 1109251881Speter * necessary to do so, and then treat as a full URL. For a URL: do some 1110251881Speter * IRI-to-URI encoding and some auto-escaping, and canonicalize. For a 1111251881Speter * local path: canonicalize case and path separators. 1112251881Speter * 1113251881Speter * If @a keep_last_origpath_on_truepath_collision is TRUE, and there are 1114251881Speter * exactly two targets which both case-canonicalize to the same path, the last 1115251881Speter * target will be returned in the original non-case-canonicalized form. 1116251881Speter * 1117251881Speter * Allocate @a *targets_p and its elements in @a pool. 1118251881Speter * 1119251881Speter * @a ctx is required for possible repository authentication. 1120251881Speter * 1121251881Speter * If a path has the same name as a Subversion working copy 1122251881Speter * administrative directory, return #SVN_ERR_RESERVED_FILENAME_SPECIFIED; 1123251881Speter * if multiple reserved paths are encountered, return a chain of 1124251881Speter * errors, all of which are #SVN_ERR_RESERVED_FILENAME_SPECIFIED. Do 1125251881Speter * not return this type of error in a chain with any other type of 1126251881Speter * error, and if this is the only type of error encountered, complete 1127251881Speter * the operation before returning the error(s). 1128251881Speter * 1129289180Speter * Return an error if a target is just a peg specifier with no path, such as 1130289180Speter * "@abc". Before v1.6.5 (r878062) this form was interpreted as a literal path; 1131289180Speter * it is now ambiguous. The form "@abc@" should now be used to refer to the 1132289180Speter * literal path "@abc" with no peg revision, or the form ".@abc" to refer to 1133289180Speter * the empty path with peg revision "abc". 1134289180Speter * 1135251881Speter * @since New in 1.7 1136251881Speter */ 1137251881Spetersvn_error_t * 1138251881Spetersvn_client_args_to_target_array2(apr_array_header_t **targets_p, 1139251881Speter apr_getopt_t *os, 1140251881Speter const apr_array_header_t *known_targets, 1141251881Speter svn_client_ctx_t *ctx, 1142251881Speter svn_boolean_t keep_last_origpath_on_truepath_collision, 1143251881Speter apr_pool_t *pool); 1144251881Speter 1145251881Speter/** 1146251881Speter * Similar to svn_client_args_to_target_array2() but with 1147251881Speter * @a keep_last_origpath_on_truepath_collision always set to FALSE. 1148251881Speter * 1149289180Speter * @since Since 1.6.5, this returns an error if a path contains a peg 1150289180Speter * specifier with no path before it, such as "@abc". 1151289180Speter * 1152251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 1153251881Speter */ 1154251881SpeterSVN_DEPRECATED 1155251881Spetersvn_error_t * 1156251881Spetersvn_client_args_to_target_array(apr_array_header_t **targets_p, 1157251881Speter apr_getopt_t *os, 1158251881Speter const apr_array_header_t *known_targets, 1159251881Speter svn_client_ctx_t *ctx, 1160251881Speter apr_pool_t *pool); 1161251881Speter 1162251881Speter/** @} group end: Client command-line processing */ 1163251881Speter 1164251881Speter/** @} */ 1165251881Speter 1166251881Speter/** 1167251881Speter * Client working copy management functions 1168251881Speter * 1169251881Speter * @defgroup clnt_wc Client working copy management 1170251881Speter * 1171251881Speter * @{ 1172251881Speter */ 1173251881Speter 1174251881Speter/** 1175251881Speter * @defgroup clnt_wc_checkout Checkout 1176251881Speter * 1177251881Speter * @{ 1178251881Speter */ 1179251881Speter 1180251881Speter 1181251881Speter/** 1182251881Speter * Checkout a working copy from a repository. 1183251881Speter * 1184251881Speter * @param[out] result_rev If non-NULL, the value of the revision checked 1185251881Speter * out from the repository. 1186251881Speter * @param[in] URL The repository URL of the checkout source. 1187251881Speter * @param[in] path The root of the new working copy. 1188251881Speter * @param[in] peg_revision The peg revision. 1189251881Speter * @param[in] revision The operative revision. 1190251881Speter * @param[in] depth The depth of the operation. If #svn_depth_unknown, 1191251881Speter * then behave as if for #svn_depth_infinity, except in the case 1192251881Speter * of resuming a previous checkout of @a path (i.e., updating), 1193251881Speter * in which case use the depth of the existing working copy. 1194251881Speter * @param[in] ignore_externals If @c TRUE, don't process externals 1195251881Speter * definitions as part of this operation. 1196251881Speter * @param[in] allow_unver_obstructions If @c TRUE, then tolerate existing 1197251881Speter * unversioned items that obstruct incoming paths. Only 1198251881Speter * obstructions of the same type (file or dir) as the added 1199251881Speter * item are tolerated. The text of obstructing files is left 1200251881Speter * as-is, effectively treating it as a user modification after 1201251881Speter * the checkout. Working properties of obstructing items are 1202251881Speter * set equal to the base properties. <br> 1203251881Speter * If @c FALSE, then abort if there are any unversioned 1204251881Speter * obstructing items. 1205251881Speter * @param[in] ctx The standard client context, used for authentication and 1206251881Speter * notification. 1207251881Speter * @param[in] pool Used for any temporary allocation. 1208251881Speter * 1209251881Speter * @return A pointer to an #svn_error_t of the type (this list is not 1210251881Speter * exhaustive): <br> 1211251881Speter * #SVN_ERR_UNSUPPORTED_FEATURE if @a URL refers to a file rather 1212251881Speter * than a directory; <br> 1213251881Speter * #SVN_ERR_RA_ILLEGAL_URL if @a URL does not exist; <br> 1214251881Speter * #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of 1215251881Speter * #svn_opt_revision_number, #svn_opt_revision_head, or 1216251881Speter * #svn_opt_revision_date. <br> 1217251881Speter * If no error occurred, return #SVN_NO_ERROR. 1218251881Speter * 1219251881Speter * @since New in 1.5. 1220251881Speter * 1221251881Speter * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for 1222251881Speter * a discussion of operative and peg revisions. 1223251881Speter */ 1224251881Spetersvn_error_t * 1225251881Spetersvn_client_checkout3(svn_revnum_t *result_rev, 1226251881Speter const char *URL, 1227251881Speter const char *path, 1228251881Speter const svn_opt_revision_t *peg_revision, 1229251881Speter const svn_opt_revision_t *revision, 1230251881Speter svn_depth_t depth, 1231251881Speter svn_boolean_t ignore_externals, 1232251881Speter svn_boolean_t allow_unver_obstructions, 1233251881Speter svn_client_ctx_t *ctx, 1234251881Speter apr_pool_t *pool); 1235251881Speter 1236251881Speter 1237251881Speter/** 1238251881Speter * Similar to svn_client_checkout3() but with @a allow_unver_obstructions 1239251881Speter * always set to FALSE, and @a depth set according to @a recurse: if 1240251881Speter * @a recurse is TRUE, @a depth is #svn_depth_infinity, if @a recurse 1241251881Speter * is FALSE, @a depth is #svn_depth_files. 1242251881Speter * 1243251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1244251881Speter */ 1245251881SpeterSVN_DEPRECATED 1246251881Spetersvn_error_t * 1247251881Spetersvn_client_checkout2(svn_revnum_t *result_rev, 1248251881Speter const char *URL, 1249251881Speter const char *path, 1250251881Speter const svn_opt_revision_t *peg_revision, 1251251881Speter const svn_opt_revision_t *revision, 1252251881Speter svn_boolean_t recurse, 1253251881Speter svn_boolean_t ignore_externals, 1254251881Speter svn_client_ctx_t *ctx, 1255251881Speter apr_pool_t *pool); 1256251881Speter 1257251881Speter 1258251881Speter/** 1259251881Speter * Similar to svn_client_checkout2(), but with @a peg_revision 1260251881Speter * always set to #svn_opt_revision_unspecified and 1261251881Speter * @a ignore_externals always set to FALSE. 1262251881Speter * 1263251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 1264251881Speter */ 1265251881SpeterSVN_DEPRECATED 1266251881Spetersvn_error_t * 1267251881Spetersvn_client_checkout(svn_revnum_t *result_rev, 1268251881Speter const char *URL, 1269251881Speter const char *path, 1270251881Speter const svn_opt_revision_t *revision, 1271251881Speter svn_boolean_t recurse, 1272251881Speter svn_client_ctx_t *ctx, 1273251881Speter apr_pool_t *pool); 1274251881Speter/** @} */ 1275251881Speter 1276251881Speter/** 1277251881Speter * @defgroup Update Bring a working copy up-to-date with a repository 1278251881Speter * 1279251881Speter * @{ 1280251881Speter * 1281251881Speter */ 1282251881Speter 1283251881Speter/** 1284251881Speter * Update working trees @a paths to @a revision, authenticating with the 1285251881Speter * authentication baton cached in @a ctx. @a paths is an array of const 1286251881Speter * char * paths to be updated. Unversioned paths that are direct children 1287251881Speter * of a versioned path will cause an update that attempts to add that path; 1288251881Speter * other unversioned paths are skipped. If @a result_revs is not NULL, 1289251881Speter * @a *result_revs will be set to an array of svn_revnum_t with each 1290251881Speter * element set to the revision to which @a revision was resolved for the 1291251881Speter * corresponding element of @a paths. 1292251881Speter * 1293251881Speter * @a revision must be of kind #svn_opt_revision_number, 1294251881Speter * #svn_opt_revision_head, or #svn_opt_revision_date. If @a 1295251881Speter * revision does not meet these requirements, return the error 1296251881Speter * #SVN_ERR_CLIENT_BAD_REVISION. 1297251881Speter * 1298251881Speter * The paths in @a paths can be from multiple working copies from multiple 1299251881Speter * repositories, but even if they all come from the same repository there 1300251881Speter * is no guarantee that revision represented by #svn_opt_revision_head 1301251881Speter * will remain the same as each path is updated. 1302251881Speter * 1303251881Speter * If @a ignore_externals is set, don't process externals definitions 1304251881Speter * as part of this operation. 1305251881Speter * 1306251881Speter * If @a depth is #svn_depth_infinity, update fully recursively. 1307251881Speter * Else if it is #svn_depth_immediates or #svn_depth_files, update 1308251881Speter * each target and its file entries, but not its subdirectories. Else 1309251881Speter * if #svn_depth_empty, update exactly each target, nonrecursively 1310251881Speter * (essentially, update the target's properties). 1311251881Speter * 1312251881Speter * If @a depth is #svn_depth_unknown, take the working depth from 1313251881Speter * @a paths and then behave as described above. 1314251881Speter * 1315251881Speter * If @a depth_is_sticky is set and @a depth is not 1316251881Speter * #svn_depth_unknown, then in addition to updating PATHS, also set 1317251881Speter * their sticky ambient depth value to @a depth. 1318251881Speter * 1319251881Speter * If @a allow_unver_obstructions is TRUE then the update tolerates 1320251881Speter * existing unversioned items that obstruct added paths. Only 1321251881Speter * obstructions of the same type (file or dir) as the added item are 1322251881Speter * tolerated. The text of obstructing files is left as-is, effectively 1323251881Speter * treating it as a user modification after the update. Working 1324251881Speter * properties of obstructing items are set equal to the base properties. 1325251881Speter * If @a allow_unver_obstructions is FALSE then the update will abort 1326251881Speter * if there are any unversioned obstructing items. 1327251881Speter * 1328251881Speter * If @a adds_as_modification is TRUE, a local addition at the same path 1329251881Speter * as an incoming addition of the same node kind results in a normal node 1330251881Speter * with a possible local modification, instead of a tree conflict. 1331251881Speter * 1332251881Speter * If @a make_parents is TRUE, create any non-existent parent 1333251881Speter * directories also by checking them out at depth=empty. 1334251881Speter * 1335251881Speter * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with 1336251881Speter * @a ctx->notify_baton2 for each item handled by the update, and also for 1337251881Speter * files restored from text-base. If @a ctx->cancel_func is non-NULL, invoke 1338251881Speter * it passing @a ctx->cancel_baton at various places during the update. 1339251881Speter * 1340251881Speter * Use @a pool for any temporary allocation. 1341251881Speter * 1342251881Speter * @todo Multiple Targets 1343251881Speter * - Up for debate: an update on multiple targets is *not* atomic. 1344251881Speter * Right now, svn_client_update only takes one path. What's 1345251881Speter * debatable is whether this should ever change. On the one hand, 1346251881Speter * it's kind of losing to have the client application loop over 1347251881Speter * targets and call svn_client_update() on each one; each call to 1348251881Speter * update initializes a whole new repository session (network 1349251881Speter * overhead, etc.) On the other hand, it's a very simple 1350251881Speter * implementation, and allows for the possibility that different 1351251881Speter * targets may come from different repositories. 1352251881Speter * 1353251881Speter * @since New in 1.7. 1354251881Speter */ 1355251881Spetersvn_error_t * 1356251881Spetersvn_client_update4(apr_array_header_t **result_revs, 1357251881Speter const apr_array_header_t *paths, 1358251881Speter const svn_opt_revision_t *revision, 1359251881Speter svn_depth_t depth, 1360251881Speter svn_boolean_t depth_is_sticky, 1361251881Speter svn_boolean_t ignore_externals, 1362251881Speter svn_boolean_t allow_unver_obstructions, 1363251881Speter svn_boolean_t adds_as_modification, 1364251881Speter svn_boolean_t make_parents, 1365251881Speter svn_client_ctx_t *ctx, 1366251881Speter apr_pool_t *pool); 1367251881Speter 1368251881Speter/** 1369251881Speter * Similar to svn_client_update4() but with @a make_parents always set 1370251881Speter * to FALSE and @a adds_as_modification set to TRUE. 1371251881Speter * 1372251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 1373251881Speter * @since New in 1.5. 1374251881Speter */ 1375251881SpeterSVN_DEPRECATED 1376251881Spetersvn_error_t * 1377251881Spetersvn_client_update3(apr_array_header_t **result_revs, 1378251881Speter const apr_array_header_t *paths, 1379251881Speter const svn_opt_revision_t *revision, 1380251881Speter svn_depth_t depth, 1381251881Speter svn_boolean_t depth_is_sticky, 1382251881Speter svn_boolean_t ignore_externals, 1383251881Speter svn_boolean_t allow_unver_obstructions, 1384251881Speter svn_client_ctx_t *ctx, 1385251881Speter apr_pool_t *pool); 1386251881Speter 1387251881Speter/** 1388251881Speter * Similar to svn_client_update3() but with @a allow_unver_obstructions 1389251881Speter * always set to FALSE, @a depth_is_sticky to FALSE, and @a depth set 1390251881Speter * according to @a recurse: if @a recurse is TRUE, set @a depth to 1391251881Speter * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to 1392251881Speter * #svn_depth_files. 1393251881Speter * 1394251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1395251881Speter */ 1396251881SpeterSVN_DEPRECATED 1397251881Spetersvn_error_t * 1398251881Spetersvn_client_update2(apr_array_header_t **result_revs, 1399251881Speter const apr_array_header_t *paths, 1400251881Speter const svn_opt_revision_t *revision, 1401251881Speter svn_boolean_t recurse, 1402251881Speter svn_boolean_t ignore_externals, 1403251881Speter svn_client_ctx_t *ctx, 1404251881Speter apr_pool_t *pool); 1405251881Speter 1406251881Speter/** 1407251881Speter * Similar to svn_client_update2() except that it accepts only a single 1408251881Speter * target in @a path, returns a single revision if @a result_rev is 1409251881Speter * not NULL, and @a ignore_externals is always set to FALSE. 1410251881Speter * 1411251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 1412251881Speter */ 1413251881SpeterSVN_DEPRECATED 1414251881Spetersvn_error_t * 1415251881Spetersvn_client_update(svn_revnum_t *result_rev, 1416251881Speter const char *path, 1417251881Speter const svn_opt_revision_t *revision, 1418251881Speter svn_boolean_t recurse, 1419251881Speter svn_client_ctx_t *ctx, 1420251881Speter apr_pool_t *pool); 1421251881Speter/** @} */ 1422251881Speter 1423251881Speter/** 1424251881Speter * @defgroup Switch Switch a working copy to another location. 1425251881Speter * 1426251881Speter * @{ 1427251881Speter */ 1428251881Speter 1429251881Speter/** 1430251881Speter * Switch an existing working copy directory to a different repository 1431251881Speter * location. 1432251881Speter * 1433251881Speter * This is normally used to switch a working copy directory over to another 1434251881Speter * line of development, such as a branch or a tag. Switching an existing 1435251881Speter * working copy directory is more efficient than checking out @a url from 1436251881Speter * scratch. 1437251881Speter * 1438251881Speter * @param[out] result_rev If non-NULL, the value of the revision to which 1439251881Speter * the working copy was actually switched. 1440251881Speter * @param[in] path The directory to be switched. This need not be the 1441251881Speter * root of a working copy. 1442251881Speter * @param[in] url The repository URL to switch to. 1443251881Speter * @param[in] peg_revision The peg revision. 1444251881Speter * @param[in] revision The operative revision. 1445251881Speter * @param[in] depth The depth of the operation. If #svn_depth_infinity, 1446251881Speter * switch fully recursively. Else if #svn_depth_immediates, 1447251881Speter * switch @a path and its file children (if any), and 1448251881Speter * switch subdirectories but do not update them. Else if 1449251881Speter * #svn_depth_files, switch just file children, ignoring 1450251881Speter * subdirectories completely. Else if #svn_depth_empty, 1451251881Speter * switch just @a path and touch nothing underneath it. 1452251881Speter * @param[in] depth_is_sticky If @c TRUE, and @a depth is not 1453251881Speter * #svn_depth_unknown, then in addition to switching @a path, also 1454251881Speter * set its sticky ambient depth value to @a depth. 1455251881Speter * @param[in] ignore_externals If @c TRUE, don't process externals 1456251881Speter * definitions as part of this operation. 1457251881Speter * @param[in] allow_unver_obstructions If @c TRUE, then tolerate existing 1458251881Speter * unversioned items that obstruct incoming paths. Only 1459251881Speter * obstructions of the same type (file or dir) as the added 1460251881Speter * item are tolerated. The text of obstructing files is left 1461251881Speter * as-is, effectively treating it as a user modification after 1462251881Speter * the checkout. Working properties of obstructing items are 1463251881Speter * set equal to the base properties. <br> 1464251881Speter * If @c FALSE, then abort if there are any unversioned 1465251881Speter * obstructing items. 1466251881Speter * @param[in] ignore_ancestry If @c FALSE, then verify that the file 1467251881Speter * or directory at @a path shares some common version control 1468251881Speter * ancestry with the switch URL location (represented by the 1469251881Speter * combination of @a url, @a peg_revision, and @a revision), 1470251881Speter * and returning #SVN_ERR_CLIENT_UNRELATED_RESOURCES if they 1471251881Speter * do not. If @c TRUE, no such sanity checks are performed. 1472251881Speter * 1473251881Speter * @param[in] ctx The standard client context, used for authentication and 1474251881Speter * notification. The notifier is invoked for paths affected by 1475251881Speter * the switch, and also for files which may be restored from the 1476251881Speter * pristine store after being previously removed from the working 1477251881Speter * copy. 1478251881Speter * @param[in] pool Used for any temporary allocation. 1479251881Speter * 1480251881Speter * @return A pointer to an #svn_error_t of the type (this list is not 1481251881Speter * exhaustive): <br> 1482251881Speter * #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of 1483251881Speter * #svn_opt_revision_number, #svn_opt_revision_head, or 1484251881Speter * #svn_opt_revision_date. <br> 1485251881Speter * If no error occurred, return #SVN_NO_ERROR. 1486251881Speter * 1487251881Speter * @since New in 1.7. 1488251881Speter * 1489251881Speter * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for 1490251881Speter * a discussion of operative and peg revisions. 1491251881Speter */ 1492251881Spetersvn_error_t * 1493251881Spetersvn_client_switch3(svn_revnum_t *result_rev, 1494251881Speter const char *path, 1495251881Speter const char *url, 1496251881Speter const svn_opt_revision_t *peg_revision, 1497251881Speter const svn_opt_revision_t *revision, 1498251881Speter svn_depth_t depth, 1499251881Speter svn_boolean_t depth_is_sticky, 1500251881Speter svn_boolean_t ignore_externals, 1501251881Speter svn_boolean_t allow_unver_obstructions, 1502251881Speter svn_boolean_t ignore_ancestry, 1503251881Speter svn_client_ctx_t *ctx, 1504251881Speter apr_pool_t *pool); 1505251881Speter 1506251881Speter 1507251881Speter/** 1508251881Speter * Similar to svn_client_switch3() but with @a ignore_ancestry always 1509251881Speter * set to TRUE. 1510251881Speter * 1511251881Speter * @since New in 1.5. 1512251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1513251881Speter */ 1514251881SpeterSVN_DEPRECATED 1515251881Spetersvn_error_t * 1516251881Spetersvn_client_switch2(svn_revnum_t *result_rev, 1517251881Speter const char *path, 1518251881Speter const char *url, 1519251881Speter const svn_opt_revision_t *peg_revision, 1520251881Speter const svn_opt_revision_t *revision, 1521251881Speter svn_depth_t depth, 1522251881Speter svn_boolean_t depth_is_sticky, 1523251881Speter svn_boolean_t ignore_externals, 1524251881Speter svn_boolean_t allow_unver_obstructions, 1525251881Speter svn_client_ctx_t *ctx, 1526251881Speter apr_pool_t *pool); 1527251881Speter 1528251881Speter 1529251881Speter/** 1530251881Speter * Similar to svn_client_switch2() but with @a allow_unver_obstructions, 1531251881Speter * @a ignore_externals, and @a depth_is_sticky always set to FALSE, 1532251881Speter * and @a depth set according to @a recurse: if @a recurse is TRUE, 1533251881Speter * set @a depth to #svn_depth_infinity, if @a recurse is FALSE, set 1534251881Speter * @a depth to #svn_depth_files. 1535251881Speter * 1536251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1537251881Speter */ 1538251881SpeterSVN_DEPRECATED 1539251881Spetersvn_error_t * 1540251881Spetersvn_client_switch(svn_revnum_t *result_rev, 1541251881Speter const char *path, 1542251881Speter const char *url, 1543251881Speter const svn_opt_revision_t *revision, 1544251881Speter svn_boolean_t recurse, 1545251881Speter svn_client_ctx_t *ctx, 1546251881Speter apr_pool_t *pool); 1547251881Speter 1548251881Speter/** @} */ 1549251881Speter 1550251881Speter/** 1551251881Speter * @defgroup Add Begin versioning files/directories in a working copy. 1552251881Speter * 1553251881Speter * @{ 1554251881Speter */ 1555251881Speter 1556251881Speter/** 1557251881Speter * Schedule a working copy @a path for addition to the repository. 1558251881Speter * 1559251881Speter * If @a depth is #svn_depth_empty, add just @a path and nothing 1560251881Speter * below it. If #svn_depth_files, add @a path and any file 1561251881Speter * children of @a path. If #svn_depth_immediates, add @a path, any 1562251881Speter * file children, and any immediate subdirectories (but nothing 1563251881Speter * underneath those subdirectories). If #svn_depth_infinity, add 1564251881Speter * @a path and everything under it fully recursively. 1565251881Speter * 1566251881Speter * @a path's parent must be under revision control already (unless 1567251881Speter * @a add_parents is TRUE), but @a path is not. 1568251881Speter * 1569251881Speter * If @a force is not set and @a path is already under version 1570251881Speter * control, return the error #SVN_ERR_ENTRY_EXISTS. If @a force is 1571251881Speter * set, do not error on already-versioned items. When used on a 1572251881Speter * directory in conjunction with a @a depth value greater than 1573251881Speter * #svn_depth_empty, this has the effect of scheduling for addition 1574251881Speter * any unversioned files and directories scattered within even a 1575251881Speter * versioned tree (up to @a depth). 1576251881Speter * 1577251881Speter * If @a ctx->notify_func2 is non-NULL, then for each added item, call 1578251881Speter * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the 1579251881Speter * added item. 1580251881Speter * 1581251881Speter * If @a no_ignore is FALSE, don't add any file or directory (or recurse 1582251881Speter * into any directory) that is unversioned and found by recursion (as 1583251881Speter * opposed to being the explicit target @a path) and whose name matches the 1584251881Speter * svn:ignore property on its parent directory or the global-ignores list in 1585251881Speter * @a ctx->config. If @a no_ignore is TRUE, do include such files and 1586251881Speter * directories. (Note that an svn:ignore property can influence this 1587251881Speter * behaviour only when recursing into an already versioned directory with @a 1588251881Speter * force.) 1589251881Speter * 1590251881Speter * If @a no_autoprops is TRUE, don't set any autoprops on added files. If 1591251881Speter * @a no_autoprops is FALSE then all added files have autprops set as per 1592251881Speter * the auto-props list in @a ctx->config and the value of any 1593251881Speter * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by the nearest 1594251881Speter * parents of @a path which are already under version control. 1595251881Speter * 1596251881Speter * If @a add_parents is TRUE, recurse up @a path's directory and look for 1597251881Speter * a versioned directory. If found, add all intermediate paths between it 1598251881Speter * and @a path. If not found, return #SVN_ERR_CLIENT_NO_VERSIONED_PARENT. 1599251881Speter * 1600251881Speter * @a scratch_pool is used for temporary allocations only. 1601251881Speter * 1602251881Speter * @par Important: 1603251881Speter * This is a *scheduling* operation. No changes will 1604251881Speter * happen to the repository until a commit occurs. This scheduling 1605251881Speter * can be removed with svn_client_revert2(). 1606251881Speter * 1607251881Speter * @since New in 1.8. 1608251881Speter */ 1609251881Spetersvn_error_t * 1610251881Spetersvn_client_add5(const char *path, 1611251881Speter svn_depth_t depth, 1612251881Speter svn_boolean_t force, 1613251881Speter svn_boolean_t no_ignore, 1614251881Speter svn_boolean_t no_autoprops, 1615251881Speter svn_boolean_t add_parents, 1616251881Speter svn_client_ctx_t *ctx, 1617251881Speter apr_pool_t *scratch_pool); 1618251881Speter 1619251881Speter/** 1620251881Speter * Similar to svn_client_add5(), but with @a no_autoprops always set to 1621251881Speter * FALSE. 1622251881Speter * 1623251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 1624251881Speter */ 1625251881SpeterSVN_DEPRECATED 1626251881Spetersvn_error_t * 1627251881Spetersvn_client_add4(const char *path, 1628251881Speter svn_depth_t depth, 1629251881Speter svn_boolean_t force, 1630251881Speter svn_boolean_t no_ignore, 1631251881Speter svn_boolean_t add_parents, 1632251881Speter svn_client_ctx_t *ctx, 1633251881Speter apr_pool_t *pool); 1634251881Speter 1635251881Speter/** 1636251881Speter * Similar to svn_client_add4(), but with @a add_parents always set to 1637251881Speter * FALSE and @a depth set according to @a recursive: if TRUE, then 1638251881Speter * @a depth is #svn_depth_infinity, if FALSE, then #svn_depth_empty. 1639251881Speter * 1640251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1641251881Speter */ 1642251881SpeterSVN_DEPRECATED 1643251881Spetersvn_error_t * 1644251881Spetersvn_client_add3(const char *path, 1645251881Speter svn_boolean_t recursive, 1646251881Speter svn_boolean_t force, 1647251881Speter svn_boolean_t no_ignore, 1648251881Speter svn_client_ctx_t *ctx, 1649251881Speter apr_pool_t *pool); 1650251881Speter 1651251881Speter/** 1652251881Speter * Similar to svn_client_add3(), but with @a no_ignore always set to 1653251881Speter * FALSE. 1654251881Speter * 1655251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 1656251881Speter */ 1657251881SpeterSVN_DEPRECATED 1658251881Spetersvn_error_t * 1659251881Spetersvn_client_add2(const char *path, 1660251881Speter svn_boolean_t recursive, 1661251881Speter svn_boolean_t force, 1662251881Speter svn_client_ctx_t *ctx, 1663251881Speter apr_pool_t *pool); 1664251881Speter 1665251881Speter/** 1666251881Speter * Similar to svn_client_add2(), but with @a force always set to FALSE. 1667251881Speter * 1668251881Speter * @deprecated Provided for backward compatibility with the 1.0 API. 1669251881Speter */ 1670251881SpeterSVN_DEPRECATED 1671251881Spetersvn_error_t * 1672251881Spetersvn_client_add(const char *path, 1673251881Speter svn_boolean_t recursive, 1674251881Speter svn_client_ctx_t *ctx, 1675251881Speter apr_pool_t *pool); 1676251881Speter 1677251881Speter/** @} */ 1678251881Speter 1679251881Speter/** 1680251881Speter * @defgroup Mkdir Create directories in a working copy or repository. 1681251881Speter * 1682251881Speter * @{ 1683251881Speter */ 1684251881Speter 1685251881Speter/** Create a directory, either in a repository or a working copy. 1686251881Speter * 1687251881Speter * @a paths is an array of (const char *) paths, either all local WC paths 1688251881Speter * or all URLs. 1689251881Speter * 1690251881Speter * If @a paths contains URLs, use the authentication baton in @a ctx 1691251881Speter * and @a message to immediately attempt to commit the creation of the 1692251881Speter * directories in @a paths in the repository. 1693251881Speter * 1694251881Speter * Else, create the directories on disk, and attempt to schedule them 1695251881Speter * for addition (using svn_client_add(), whose docstring you should 1696251881Speter * read). 1697251881Speter * 1698251881Speter * If @a make_parents is TRUE, create any non-existent parent directories 1699251881Speter * also. 1700251881Speter * 1701251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 1702251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 1703251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision in 1704251881Speter * the event that this is a committing operation. This table cannot 1705251881Speter * contain any standard Subversion properties. 1706251881Speter * 1707251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 1708251881Speter * combo that this function can use to query for a commit log message 1709251881Speter * when one is needed. 1710251881Speter * 1711251881Speter * If @a ctx->notify_func2 is non-NULL, when the directory has been created 1712251881Speter * (successfully) in the working copy, call @a ctx->notify_func2 with 1713251881Speter * @a ctx->notify_baton2 and the path of the new directory. Note that this is 1714251881Speter * only called for items added to the working copy. 1715251881Speter * 1716251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 1717251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 1718251881Speter * the commit. 1719251881Speter * 1720251881Speter * @since New in 1.7. 1721251881Speter */ 1722251881Spetersvn_error_t * 1723251881Spetersvn_client_mkdir4(const apr_array_header_t *paths, 1724251881Speter svn_boolean_t make_parents, 1725251881Speter const apr_hash_t *revprop_table, 1726251881Speter svn_commit_callback2_t commit_callback, 1727251881Speter void *commit_baton, 1728251881Speter svn_client_ctx_t *ctx, 1729251881Speter apr_pool_t *pool); 1730251881Speter 1731251881Speter/** 1732251881Speter * Similar to svn_client_mkdir4(), but returns the commit info in 1733251881Speter * @a *commit_info_p rather than through a callback function. 1734251881Speter * 1735251881Speter * @since New in 1.5. 1736251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 1737251881Speter */ 1738251881SpeterSVN_DEPRECATED 1739251881Spetersvn_error_t * 1740251881Spetersvn_client_mkdir3(svn_commit_info_t **commit_info_p, 1741251881Speter const apr_array_header_t *paths, 1742251881Speter svn_boolean_t make_parents, 1743251881Speter const apr_hash_t *revprop_table, 1744251881Speter svn_client_ctx_t *ctx, 1745251881Speter apr_pool_t *pool); 1746251881Speter 1747251881Speter 1748251881Speter/** 1749251881Speter * Same as svn_client_mkdir3(), but with @a make_parents always FALSE, 1750251881Speter * and @a revprop_table always NULL. 1751251881Speter * 1752251881Speter * @since New in 1.3. 1753251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1754251881Speter */ 1755251881SpeterSVN_DEPRECATED 1756251881Spetersvn_error_t * 1757251881Spetersvn_client_mkdir2(svn_commit_info_t **commit_info_p, 1758251881Speter const apr_array_header_t *paths, 1759251881Speter svn_client_ctx_t *ctx, 1760251881Speter apr_pool_t *pool); 1761251881Speter 1762251881Speter/** 1763251881Speter * Same as svn_client_mkdir2(), but takes the #svn_client_commit_info_t 1764251881Speter * type for @a commit_info_p. 1765251881Speter * 1766251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 1767251881Speter */ 1768251881SpeterSVN_DEPRECATED 1769251881Spetersvn_error_t * 1770251881Spetersvn_client_mkdir(svn_client_commit_info_t **commit_info_p, 1771251881Speter const apr_array_header_t *paths, 1772251881Speter svn_client_ctx_t *ctx, 1773251881Speter apr_pool_t *pool); 1774251881Speter 1775251881Speter/** @} */ 1776251881Speter 1777251881Speter/** 1778251881Speter * @defgroup Delete Remove files/directories from a working copy or repository. 1779251881Speter * 1780251881Speter * @{ 1781251881Speter */ 1782251881Speter 1783251881Speter/** Delete items from a repository or working copy. 1784251881Speter * 1785251881Speter * @a paths is an array of (const char *) paths, either all local WC paths 1786251881Speter * or all URLs. 1787251881Speter * 1788251881Speter * If the paths in @a paths are URLs, use the authentication baton in 1789251881Speter * @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to 1790251881Speter * immediately attempt to commit a deletion of the URLs from the 1791251881Speter * repository. Every path must belong to the same repository. 1792251881Speter * 1793251881Speter * Else, schedule the working copy paths in @a paths for removal from 1794251881Speter * the repository. Each path's parent must be under revision control. 1795251881Speter * This is just a *scheduling* operation. No changes will happen to 1796251881Speter * the repository until a commit occurs. This scheduling can be 1797251881Speter * removed with svn_client_revert2(). If a path is a file it is 1798251881Speter * immediately removed from the working copy. If the path is a 1799251881Speter * directory it will remain in the working copy but all the files, and 1800251881Speter * all unversioned items, it contains will be removed. If @a force is 1801251881Speter * not set then this operation will fail if any path contains locally 1802251881Speter * modified and/or unversioned items. If @a force is set such items 1803251881Speter * will be deleted. 1804251881Speter * 1805251881Speter * If the paths are working copy paths and @a keep_local is TRUE then 1806251881Speter * the paths will not be removed from the working copy, only scheduled 1807251881Speter * for removal from the repository. Once the scheduled deletion is 1808251881Speter * committed, they will appear as unversioned paths in the working copy. 1809251881Speter * 1810251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 1811251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 1812251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision in 1813251881Speter * the event that this is a committing operation. This table cannot 1814251881Speter * contain any standard Subversion properties. 1815251881Speter * 1816251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 1817251881Speter * combo that this function can use to query for a commit log message 1818251881Speter * when one is needed. 1819251881Speter * 1820251881Speter * If @a ctx->notify_func2 is non-NULL, then for each item deleted, call 1821251881Speter * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted 1822251881Speter * item. 1823251881Speter * 1824251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 1825251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 1826251881Speter * the commit. 1827251881Speter * 1828251881Speter * @since New in 1.7. 1829251881Speter */ 1830251881Spetersvn_error_t * 1831251881Spetersvn_client_delete4(const apr_array_header_t *paths, 1832251881Speter svn_boolean_t force, 1833251881Speter svn_boolean_t keep_local, 1834251881Speter const apr_hash_t *revprop_table, 1835251881Speter svn_commit_callback2_t commit_callback, 1836251881Speter void *commit_baton, 1837251881Speter svn_client_ctx_t *ctx, 1838251881Speter apr_pool_t *pool); 1839251881Speter 1840251881Speter/** 1841251881Speter * Similar to svn_client_delete4(), but returns the commit info in 1842251881Speter * @a *commit_info_p rather than through a callback function. 1843251881Speter * 1844251881Speter * @since New in 1.5. 1845251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 1846251881Speter */ 1847251881SpeterSVN_DEPRECATED 1848251881Spetersvn_error_t * 1849251881Spetersvn_client_delete3(svn_commit_info_t **commit_info_p, 1850251881Speter const apr_array_header_t *paths, 1851251881Speter svn_boolean_t force, 1852251881Speter svn_boolean_t keep_local, 1853251881Speter const apr_hash_t *revprop_table, 1854251881Speter svn_client_ctx_t *ctx, 1855251881Speter apr_pool_t *pool); 1856251881Speter 1857251881Speter/** 1858251881Speter * Similar to svn_client_delete3(), but with @a keep_local always set 1859251881Speter * to FALSE, and @a revprop_table passed as NULL. 1860251881Speter * 1861251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 1862251881Speter */ 1863251881SpeterSVN_DEPRECATED 1864251881Spetersvn_error_t * 1865251881Spetersvn_client_delete2(svn_commit_info_t **commit_info_p, 1866251881Speter const apr_array_header_t *paths, 1867251881Speter svn_boolean_t force, 1868251881Speter svn_client_ctx_t *ctx, 1869251881Speter apr_pool_t *pool); 1870251881Speter 1871251881Speter/** 1872251881Speter * Similar to svn_client_delete2(), but takes the #svn_client_commit_info_t 1873251881Speter * type for @a commit_info_p. 1874251881Speter * 1875251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 1876251881Speter */ 1877251881SpeterSVN_DEPRECATED 1878251881Spetersvn_error_t * 1879251881Spetersvn_client_delete(svn_client_commit_info_t **commit_info_p, 1880251881Speter const apr_array_header_t *paths, 1881251881Speter svn_boolean_t force, 1882251881Speter svn_client_ctx_t *ctx, 1883251881Speter apr_pool_t *pool); 1884251881Speter 1885251881Speter 1886251881Speter/** @} */ 1887251881Speter 1888251881Speter/** 1889251881Speter * @defgroup Import Import files into the repository. 1890251881Speter * 1891251881Speter * @{ 1892251881Speter */ 1893251881Speter 1894251881Speter/** 1895251881Speter * The callback invoked by svn_client_import5() before adding a node to the 1896251881Speter * list of nodes to be imported. 1897251881Speter * 1898251881Speter * @a baton is the value passed to @a svn_client_import5 as filter_baton. 1899251881Speter * 1900251881Speter * The callback receives the @a local_abspath for each node and the @a dirent 1901251881Speter * for it when walking the directory tree. Only the kind of node, including 1902251881Speter * special status is available in @a dirent. 1903251881Speter * 1904251881Speter * Implementations can set @a *filtered to TRUE, to make the import 1905251881Speter * process omit the node and (if the node is a directory) all its 1906251881Speter * descendants. 1907251881Speter * 1908251881Speter * @a scratch_pool can be used for temporary allocations. 1909251881Speter * 1910251881Speter * @since New in 1.8. 1911251881Speter */ 1912251881Spetertypedef svn_error_t *(*svn_client_import_filter_func_t)( 1913251881Speter void *baton, 1914251881Speter svn_boolean_t *filtered, 1915251881Speter const char *local_abspath, 1916251881Speter const svn_io_dirent2_t *dirent, 1917251881Speter apr_pool_t *scratch_pool); 1918251881Speter 1919251881Speter/** Import file or directory @a path into repository directory @a url at 1920251881Speter * head, authenticating with the authentication baton cached in @a ctx, 1921251881Speter * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message 1922251881Speter * for the (implied) commit. If some components of @a url do not exist 1923251881Speter * then create parent directories as necessary. 1924251881Speter * 1925251881Speter * This function reads an unversioned tree from disk and skips any ".svn" 1926251881Speter * directories. Even if a file or directory being imported is part of an 1927251881Speter * existing WC, this function sees it as unversioned and does not notice any 1928251881Speter * existing Subversion properties in it. 1929251881Speter * 1930251881Speter * If @a path is a directory, the contents of that directory are 1931251881Speter * imported directly into the directory identified by @a url. Note that the 1932251881Speter * directory @a path itself is not imported -- that is, the basename of 1933251881Speter * @a path is not part of the import. 1934251881Speter * 1935251881Speter * If @a path is a file, then the dirname of @a url is the directory 1936251881Speter * receiving the import. The basename of @a url is the filename in the 1937251881Speter * repository. In this case if @a url already exists, return error. 1938251881Speter * 1939251881Speter * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with 1940251881Speter * @a ctx->notify_baton2 as the import progresses, with any of the following 1941251881Speter * actions: #svn_wc_notify_commit_added, 1942251881Speter * #svn_wc_notify_commit_postfix_txdelta. 1943251881Speter * 1944251881Speter * Use @a scratch_pool for any temporary allocation. 1945251881Speter * 1946251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 1947251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 1948251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision. 1949251881Speter * This table cannot contain any standard Subversion properties. 1950251881Speter * 1951251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton 1952251881Speter * combo that this function can use to query for a commit log message 1953251881Speter * when one is needed. 1954251881Speter * 1955251881Speter * If @a depth is #svn_depth_empty, import just @a path and nothing 1956251881Speter * below it. If #svn_depth_files, import @a path and any file 1957251881Speter * children of @a path. If #svn_depth_immediates, import @a path, any 1958251881Speter * file children, and any immediate subdirectories (but nothing 1959251881Speter * underneath those subdirectories). If #svn_depth_infinity, import 1960251881Speter * @a path and everything under it fully recursively. 1961251881Speter * 1962251881Speter * If @a no_ignore is @c FALSE, don't import any file or directory (or 1963251881Speter * recurse into any directory) that is found by recursion (as opposed to 1964251881Speter * being the explicit target @a path) and whose name matches the 1965251881Speter * global-ignores list in @a ctx->config. If @a no_ignore is @c TRUE, do 1966251881Speter * include such files and directories. (Note that svn:ignore properties are 1967251881Speter * not involved, as auto-props cannot set properties on directories and even 1968251881Speter * if the target is part of a WC the import ignores any existing 1969251881Speter * properties.) 1970251881Speter * 1971251881Speter * If @a no_autoprops is TRUE, don't set any autoprops on imported files. If 1972251881Speter * @a no_autoprops is FALSE then all imported files have autprops set as per 1973251881Speter * the auto-props list in @a ctx->config and the value of any 1974251881Speter * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by and explicitly set 1975251881Speter * on @a url if @a url is already under versioned control, or the nearest parents 1976251881Speter * of @a path which are already under version control if not. 1977251881Speter * 1978251881Speter * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the 1979251881Speter * node type is unknown, such as device files and pipes. 1980251881Speter * 1981251881Speter * If @a filter_callback is non-NULL, call it for each node that isn't ignored 1982251881Speter * for other reasons with @a filter_baton, to allow third party to ignore 1983251881Speter * specific nodes during importing. 1984251881Speter * 1985251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 1986251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 1987251881Speter * the commit. 1988251881Speter * 1989251881Speter * @since New in 1.8. 1990251881Speter */ 1991251881Spetersvn_error_t * 1992251881Spetersvn_client_import5(const char *path, 1993251881Speter const char *url, 1994251881Speter svn_depth_t depth, 1995251881Speter svn_boolean_t no_ignore, 1996251881Speter svn_boolean_t no_autoprops, 1997251881Speter svn_boolean_t ignore_unknown_node_types, 1998251881Speter const apr_hash_t *revprop_table, 1999251881Speter svn_client_import_filter_func_t filter_callback, 2000251881Speter void *filter_baton, 2001251881Speter svn_commit_callback2_t commit_callback, 2002251881Speter void *commit_baton, 2003251881Speter svn_client_ctx_t *ctx, 2004251881Speter apr_pool_t *scratch_pool); 2005251881Speter 2006251881Speter/** 2007251881Speter * Similar to svn_client_import5(), but without support for an optional 2008251881Speter * @a filter_callback and @a no_autoprops always set to FALSE. 2009251881Speter * 2010251881Speter * @since New in 1.7. 2011251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 2012251881Speter */ 2013251881SpeterSVN_DEPRECATED 2014251881Spetersvn_error_t * 2015251881Spetersvn_client_import4(const char *path, 2016251881Speter const char *url, 2017251881Speter svn_depth_t depth, 2018251881Speter svn_boolean_t no_ignore, 2019251881Speter svn_boolean_t ignore_unknown_node_types, 2020251881Speter const apr_hash_t *revprop_table, 2021251881Speter svn_commit_callback2_t commit_callback, 2022251881Speter void *commit_baton, 2023251881Speter svn_client_ctx_t *ctx, 2024251881Speter apr_pool_t *pool); 2025251881Speter 2026251881Speter/** 2027251881Speter * Similar to svn_client_import4(), but returns the commit info in 2028251881Speter * @a *commit_info_p rather than through a callback function. 2029251881Speter * 2030251881Speter * @since New in 1.5. 2031251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 2032251881Speter */ 2033251881SpeterSVN_DEPRECATED 2034251881Spetersvn_error_t * 2035251881Spetersvn_client_import3(svn_commit_info_t **commit_info_p, 2036251881Speter const char *path, 2037251881Speter const char *url, 2038251881Speter svn_depth_t depth, 2039251881Speter svn_boolean_t no_ignore, 2040251881Speter svn_boolean_t ignore_unknown_node_types, 2041251881Speter const apr_hash_t *revprop_table, 2042251881Speter svn_client_ctx_t *ctx, 2043251881Speter apr_pool_t *pool); 2044251881Speter 2045251881Speter/** 2046251881Speter * Similar to svn_client_import3(), but with @a ignore_unknown_node_types 2047251881Speter * always set to @c FALSE, @a revprop_table passed as NULL, and @a 2048251881Speter * depth set according to @a nonrecursive: if TRUE, then @a depth is 2049251881Speter * #svn_depth_files, else #svn_depth_infinity. 2050251881Speter * 2051251881Speter * @since New in 1.3. 2052251881Speter * 2053251881Speter * @deprecated Provided for backward compatibility with the 1.4 API 2054251881Speter */ 2055251881SpeterSVN_DEPRECATED 2056251881Spetersvn_error_t * 2057251881Spetersvn_client_import2(svn_commit_info_t **commit_info_p, 2058251881Speter const char *path, 2059251881Speter const char *url, 2060251881Speter svn_boolean_t nonrecursive, 2061251881Speter svn_boolean_t no_ignore, 2062251881Speter svn_client_ctx_t *ctx, 2063251881Speter apr_pool_t *pool); 2064251881Speter 2065251881Speter/** 2066251881Speter * Similar to svn_client_import2(), but with @a no_ignore always set 2067251881Speter * to FALSE and using the #svn_client_commit_info_t type for 2068251881Speter * @a commit_info_p. 2069251881Speter * 2070251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 2071251881Speter */ 2072251881SpeterSVN_DEPRECATED 2073251881Spetersvn_error_t * 2074251881Spetersvn_client_import(svn_client_commit_info_t **commit_info_p, 2075251881Speter const char *path, 2076251881Speter const char *url, 2077251881Speter svn_boolean_t nonrecursive, 2078251881Speter svn_client_ctx_t *ctx, 2079251881Speter apr_pool_t *pool); 2080251881Speter 2081251881Speter/** @} */ 2082251881Speter 2083251881Speter/** 2084251881Speter * @defgroup Commit Commit local modifications to the repository. 2085251881Speter * 2086251881Speter * @{ 2087251881Speter */ 2088251881Speter 2089251881Speter/** 2090251881Speter * Commit files or directories into repository, authenticating with 2091251881Speter * the authentication baton cached in @a ctx, and using 2092251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message. 2093251881Speter * Set @a *commit_info_p to the results of the commit, allocated in @a pool. 2094251881Speter * 2095251881Speter * @a targets is an array of <tt>const char *</tt> paths to commit. They 2096251881Speter * need not be canonicalized nor condensed; this function will take care of 2097251881Speter * that. If @a targets has zero elements, then do nothing and return 2098251881Speter * immediately without error. 2099251881Speter * 2100251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 2101251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 2102251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision. 2103251881Speter * This table cannot contain any standard Subversion properties. 2104251881Speter * 2105251881Speter * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with 2106251881Speter * @a ctx->notify_baton2 as the commit progresses, with any of the following 2107251881Speter * actions: #svn_wc_notify_commit_modified, #svn_wc_notify_commit_added, 2108251881Speter * #svn_wc_notify_commit_deleted, #svn_wc_notify_commit_replaced, 2109251881Speter * #svn_wc_notify_commit_copied, #svn_wc_notify_commit_copied_replaced, 2110251881Speter * #svn_wc_notify_commit_postfix_txdelta. 2111251881Speter * 2112251881Speter * If @a depth is #svn_depth_infinity, commit all changes to and 2113251881Speter * below named targets. If @a depth is #svn_depth_empty, commit 2114251881Speter * only named targets (that is, only property changes on named 2115251881Speter * directory targets, and property and content changes for named file 2116251881Speter * targets). If @a depth is #svn_depth_files, behave as above for 2117251881Speter * named file targets, and for named directory targets, commit 2118251881Speter * property changes on a named directory and all changes to files 2119251881Speter * directly inside that directory. If #svn_depth_immediates, behave 2120251881Speter * as for #svn_depth_files, and for subdirectories of any named 2121251881Speter * directory target commit as though for #svn_depth_empty. 2122251881Speter * 2123251881Speter * Unlock paths in the repository, unless @a keep_locks is TRUE. 2124251881Speter * 2125251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 2126251881Speter * names, used as a restrictive filter on items that are committed; 2127251881Speter * that is, don't commit anything unless it's a member of one of those 2128251881Speter * changelists. After the commit completes successfully, remove 2129251881Speter * changelist associations from the targets, unless @a 2130251881Speter * keep_changelists is set. If @a changelists is 2131251881Speter * empty (or altogether @c NULL), no changelist filtering occurs. 2132251881Speter * 2133251881Speter * If @a commit_as_operations is set to FALSE, when a copy is committed 2134251881Speter * all changes below the copy are always committed at the same time 2135251881Speter * (independent of the value of @a depth). If @a commit_as_operations is 2136251881Speter * #TRUE, changes to descendants are only committed if they are itself 2137251881Speter * included via @a depth and targets. 2138251881Speter * 2139251881Speter * If @a include_file_externals and/or @a include_dir_externals are #TRUE, 2140251881Speter * also commit all file and/or dir externals (respectively) that are reached 2141251881Speter * by recursion, except for those externals which: 2142251881Speter * - have a fixed revision, or 2143251881Speter * - come from a different repository root URL (dir externals). 2144251881Speter * These flags affect only recursion; externals that directly appear in @a 2145251881Speter * targets are always included in the commit. 2146251881Speter * 2147251881Speter * ### TODO: currently, file externals hidden inside an unversioned dir are 2148251881Speter * skipped deliberately, because we can't commit those yet. 2149251881Speter * See STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW. 2150251881Speter * 2151251881Speter * ### TODO: With @c depth_immediates, this function acts as if 2152251881Speter * @a include_dir_externals was passed #FALSE, but caller expects 2153251881Speter * immediate child dir externals to be included @c depth_empty. 2154251881Speter * 2155251881Speter * When @a commit_as_operations is #TRUE it is possible to delete a node and 2156251881Speter * all its descendants by selecting just the root of the deletion. If it is 2157251881Speter * set to #FALSE this will raise an error. 2158251881Speter * 2159251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 2160251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 2161251881Speter * the commit. 2162251881Speter * 2163251881Speter * @note #svn_depth_unknown and #svn_depth_exclude must not be passed 2164251881Speter * for @a depth. 2165251881Speter * 2166251881Speter * Use @a pool for any temporary allocations. 2167251881Speter * 2168251881Speter * @since New in 1.8. 2169251881Speter */ 2170251881Spetersvn_error_t * 2171251881Spetersvn_client_commit6(const apr_array_header_t *targets, 2172251881Speter svn_depth_t depth, 2173251881Speter svn_boolean_t keep_locks, 2174251881Speter svn_boolean_t keep_changelists, 2175251881Speter svn_boolean_t commit_as_operations, 2176251881Speter svn_boolean_t include_file_externals, 2177251881Speter svn_boolean_t include_dir_externals, 2178251881Speter const apr_array_header_t *changelists, 2179251881Speter const apr_hash_t *revprop_table, 2180251881Speter svn_commit_callback2_t commit_callback, 2181251881Speter void *commit_baton, 2182251881Speter svn_client_ctx_t *ctx, 2183251881Speter apr_pool_t *pool); 2184251881Speter 2185251881Speter/** 2186251881Speter * Similar to svn_client_commit6(), but passes @a include_file_externals as 2187251881Speter * FALSE and @a include_dir_externals as FALSE. 2188251881Speter * 2189251881Speter * @since New in 1.7. 2190251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 2191251881Speter */ 2192251881SpeterSVN_DEPRECATED 2193251881Spetersvn_error_t * 2194251881Spetersvn_client_commit5(const apr_array_header_t *targets, 2195251881Speter svn_depth_t depth, 2196251881Speter svn_boolean_t keep_locks, 2197251881Speter svn_boolean_t keep_changelists, 2198251881Speter svn_boolean_t commit_as_operations, 2199251881Speter const apr_array_header_t *changelists, 2200251881Speter const apr_hash_t *revprop_table, 2201251881Speter svn_commit_callback2_t commit_callback, 2202251881Speter void *commit_baton, 2203251881Speter svn_client_ctx_t *ctx, 2204251881Speter apr_pool_t *pool); 2205251881Speter 2206251881Speter/** 2207251881Speter * Similar to svn_client_commit5(), but returns the commit info in 2208251881Speter * @a *commit_info_p rather than through a callback function. Does not use 2209251881Speter * #svn_wc_notify_commit_copied or #svn_wc_notify_commit_copied_replaced 2210251881Speter * (preferring #svn_wc_notify_commit_added and 2211251881Speter * #svn_wc_notify_commit_replaced, respectively, instead). 2212251881Speter * 2213251881Speter * Also, if no error is returned and @a (*commit_info_p)->revision is set to 2214251881Speter * #SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to 2215251881Speter * be committed. 2216251881Speter * 2217251881Speter * Sets @a commit_as_operations to FALSE to match Subversion 1.6's behavior. 2218251881Speter * 2219251881Speter * @since New in 1.5. 2220251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 2221251881Speter */ 2222251881SpeterSVN_DEPRECATED 2223251881Spetersvn_error_t * 2224251881Spetersvn_client_commit4(svn_commit_info_t **commit_info_p, 2225251881Speter const apr_array_header_t *targets, 2226251881Speter svn_depth_t depth, 2227251881Speter svn_boolean_t keep_locks, 2228251881Speter svn_boolean_t keep_changelists, 2229251881Speter const apr_array_header_t *changelists, 2230251881Speter const apr_hash_t *revprop_table, 2231251881Speter svn_client_ctx_t *ctx, 2232251881Speter apr_pool_t *pool); 2233251881Speter 2234251881Speter/** 2235251881Speter * Similar to svn_client_commit4(), but always with NULL for 2236251881Speter * @a changelist_name, FALSE for @a keep_changelist, NULL for @a 2237251881Speter * revprop_table, and @a depth set according to @a recurse: if @a 2238251881Speter * recurse is TRUE, use #svn_depth_infinity, else #svn_depth_empty. 2239251881Speter * 2240251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 2241251881Speter * 2242251881Speter * @since New in 1.3. 2243251881Speter */ 2244251881SpeterSVN_DEPRECATED 2245251881Spetersvn_error_t * 2246251881Spetersvn_client_commit3(svn_commit_info_t **commit_info_p, 2247251881Speter const apr_array_header_t *targets, 2248251881Speter svn_boolean_t recurse, 2249251881Speter svn_boolean_t keep_locks, 2250251881Speter svn_client_ctx_t *ctx, 2251251881Speter apr_pool_t *pool); 2252251881Speter 2253251881Speter/** 2254251881Speter * Similar to svn_client_commit3(), but uses #svn_client_commit_info_t 2255251881Speter * for @a commit_info_p. 2256251881Speter * 2257251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 2258251881Speter * 2259251881Speter * @since New in 1.2. 2260251881Speter */ 2261251881SpeterSVN_DEPRECATED 2262251881Spetersvn_error_t * 2263251881Spetersvn_client_commit2(svn_client_commit_info_t **commit_info_p, 2264251881Speter const apr_array_header_t *targets, 2265251881Speter svn_boolean_t recurse, 2266251881Speter svn_boolean_t keep_locks, 2267251881Speter svn_client_ctx_t *ctx, 2268251881Speter apr_pool_t *pool); 2269251881Speter 2270251881Speter/** 2271251881Speter * Similar to svn_client_commit2(), but with @a keep_locks set to 2272251881Speter * TRUE and @a nonrecursive instead of @a recurse. 2273251881Speter * 2274251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 2275251881Speter */ 2276251881SpeterSVN_DEPRECATED 2277251881Spetersvn_error_t * 2278251881Spetersvn_client_commit(svn_client_commit_info_t **commit_info_p, 2279251881Speter const apr_array_header_t *targets, 2280251881Speter svn_boolean_t nonrecursive, 2281251881Speter svn_client_ctx_t *ctx, 2282251881Speter apr_pool_t *pool); 2283251881Speter 2284251881Speter/** @} */ 2285251881Speter 2286251881Speter/** 2287251881Speter * @defgroup Status Report interesting information about paths in the \ 2288251881Speter * working copy. 2289251881Speter * 2290251881Speter * @{ 2291251881Speter */ 2292251881Speter 2293251881Speter/** 2294251881Speter * Structure for holding the "status" of a working copy item. 2295251881Speter * 2296251881Speter * @note Fields may be added to the end of this structure in future 2297251881Speter * versions. Therefore, to preserve binary compatibility, users 2298251881Speter * should not directly allocate structures of this type. 2299251881Speter * 2300251881Speter * @since New in 1.7. 2301251881Speter */ 2302251881Spetertypedef struct svn_client_status_t 2303251881Speter{ 2304251881Speter /** The kind of node as recorded in the working copy */ 2305251881Speter svn_node_kind_t kind; 2306251881Speter 2307251881Speter /** The absolute path to the node */ 2308251881Speter const char *local_abspath; 2309251881Speter 2310251881Speter /** The actual size of the working file on disk, or SVN_INVALID_FILESIZE 2311251881Speter * if unknown (or if the item isn't a file at all). */ 2312251881Speter svn_filesize_t filesize; 2313251881Speter 2314251881Speter /** If the path is under version control, versioned is TRUE, otherwise 2315251881Speter * FALSE. */ 2316251881Speter svn_boolean_t versioned; 2317251881Speter 2318251881Speter /** Set to TRUE if the node is the victim of some kind of conflict. */ 2319251881Speter svn_boolean_t conflicted; 2320251881Speter 2321251881Speter /** The status of the node, based on the restructuring changes and if the 2322251881Speter * node has no restructuring changes the text and prop status. */ 2323251881Speter enum svn_wc_status_kind node_status; 2324251881Speter 2325251881Speter /** The status of the text of the node, not including restructuring changes. 2326251881Speter * Valid values are: svn_wc_status_none, svn_wc_status_normal, 2327251881Speter * svn_wc_status_modified and svn_wc_status_conflicted. */ 2328251881Speter enum svn_wc_status_kind text_status; 2329251881Speter 2330251881Speter /** The status of the node's properties. 2331251881Speter * Valid values are: svn_wc_status_none, svn_wc_status_normal, 2332251881Speter * svn_wc_status_modified and svn_wc_status_conflicted. */ 2333251881Speter enum svn_wc_status_kind prop_status; 2334251881Speter 2335251881Speter /** A node can be 'locked' if a working copy update is in progress or 2336251881Speter * was interrupted. */ 2337251881Speter svn_boolean_t wc_is_locked; 2338251881Speter 2339251881Speter /** A file or directory can be 'copied' if it's scheduled for 2340251881Speter * addition-with-history (or part of a subtree that is scheduled as such.). 2341251881Speter */ 2342251881Speter svn_boolean_t copied; 2343251881Speter 2344251881Speter /** The URL of the repository root. */ 2345251881Speter const char *repos_root_url; 2346251881Speter 2347251881Speter /** The UUID of the repository */ 2348251881Speter const char *repos_uuid; 2349251881Speter 2350251881Speter /** The in-repository path relative to the repository root. */ 2351251881Speter const char *repos_relpath; 2352251881Speter 2353251881Speter /** Base revision. */ 2354251881Speter svn_revnum_t revision; 2355251881Speter 2356251881Speter /** Last revision this was changed */ 2357251881Speter svn_revnum_t changed_rev; 2358251881Speter 2359251881Speter /** Date of last commit. */ 2360251881Speter apr_time_t changed_date; 2361251881Speter 2362251881Speter /** Last commit author of this item */ 2363251881Speter const char *changed_author; 2364251881Speter 2365251881Speter /** A file or directory can be 'switched' if the switch command has been 2366251881Speter * used. If this is TRUE, then file_external will be FALSE. 2367251881Speter */ 2368251881Speter svn_boolean_t switched; 2369251881Speter 2370251881Speter /** If the item is a file that was added to the working copy with an 2371251881Speter * svn:externals; if file_external is TRUE, then switched is always 2372251881Speter * FALSE. 2373251881Speter */ 2374251881Speter svn_boolean_t file_external; 2375251881Speter 2376251881Speter /** The locally present lock. (Values of path, token, owner, comment and 2377251881Speter * are available if a lock is present) */ 2378251881Speter const svn_lock_t *lock; 2379251881Speter 2380251881Speter /** Which changelist this item is part of, or NULL if not part of any. */ 2381251881Speter const char *changelist; 2382251881Speter 2383251881Speter /** The depth of the node as recorded in the working copy 2384251881Speter * (#svn_depth_unknown for files or when no depth is recorded) */ 2385251881Speter svn_depth_t depth; 2386251881Speter 2387251881Speter /** 2388251881Speter * @defgroup svn_wc_status_ood WC out-of-date info from the repository 2389251881Speter * @{ 2390251881Speter * 2391251881Speter * When the working copy item is out-of-date compared to the 2392251881Speter * repository, the following fields represent the state of the 2393251881Speter * youngest revision of the item in the repository. If the working 2394251881Speter * copy is not out of date, the fields are initialized as described 2395251881Speter * below. 2396251881Speter */ 2397251881Speter 2398251881Speter /** Set to the node kind of the youngest commit, or #svn_node_none 2399251881Speter * if not out of date. */ 2400251881Speter svn_node_kind_t ood_kind; 2401251881Speter 2402251881Speter /** The status of the node, based on the text status if the node has no 2403251881Speter * restructuring changes */ 2404251881Speter enum svn_wc_status_kind repos_node_status; 2405251881Speter 2406251881Speter /** The node's text status in the repository. */ 2407251881Speter enum svn_wc_status_kind repos_text_status; 2408251881Speter 2409251881Speter /** The node's property status in the repository. */ 2410251881Speter enum svn_wc_status_kind repos_prop_status; 2411251881Speter 2412251881Speter /** The node's lock in the repository, if any. */ 2413251881Speter const svn_lock_t *repos_lock; 2414251881Speter 2415251881Speter /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM 2416251881Speter * if not out of date. */ 2417251881Speter svn_revnum_t ood_changed_rev; 2418251881Speter 2419251881Speter /** Set to the most recent commit date, or @c 0 if not out of date. */ 2420251881Speter apr_time_t ood_changed_date; 2421251881Speter 2422251881Speter /** Set to the user name of the youngest commit, or @c NULL if not 2423251881Speter * out of date or non-existent. Because a non-existent @c 2424251881Speter * svn:author property has the same behavior as an out-of-date 2425251881Speter * working copy, examine @c ood_changed_rev to determine whether 2426251881Speter * the working copy is out of date. */ 2427251881Speter const char *ood_changed_author; 2428251881Speter 2429251881Speter /** @} */ 2430251881Speter 2431251881Speter /** Reserved for libsvn_client's internal use; this value is only to be used 2432251881Speter * for libsvn_client backwards compatibility wrappers. This value may be NULL 2433251881Speter * or to other data in future versions. */ 2434251881Speter const void *backwards_compatibility_baton; 2435251881Speter 2436251881Speter /** Set to the local absolute path that this node was moved from, if this 2437251881Speter * file or directory has been moved here locally and is the root of that 2438251881Speter * move. Otherwise set to NULL. 2439251881Speter * 2440251881Speter * This will be NULL for moved-here nodes that are just part of a subtree 2441251881Speter * that was moved along (and are not themselves a root of a different move 2442251881Speter * operation). 2443251881Speter * 2444251881Speter * @since New in 1.8. */ 2445251881Speter const char *moved_from_abspath; 2446251881Speter 2447251881Speter /** Set to the local absolute path that this node was moved to, if this file 2448251881Speter * or directory has been moved away locally and corresponds to the root 2449251881Speter * of the destination side of the move. Otherwise set to NULL. 2450251881Speter * 2451251881Speter * Note: Saying just "root" here could be misleading. For example: 2452251881Speter * svn mv A AA; 2453251881Speter * svn mv AA/B BB; 2454251881Speter * creates a situation where A/B is moved-to BB, but one could argue that 2455251881Speter * the move source's root actually was AA/B. Note that, as far as the 2456251881Speter * working copy is concerned, above case is exactly identical to: 2457251881Speter * svn mv A/B BB; 2458251881Speter * svn mv A AA; 2459251881Speter * In both situations, @a moved_to_abspath would be set for nodes A (moved 2460251881Speter * to AA) and A/B (moved to BB), only. 2461251881Speter * 2462251881Speter * This will be NULL for moved-away nodes that were just part of a subtree 2463251881Speter * that was moved along (and are not themselves a root of a different move 2464251881Speter * operation). 2465251881Speter * 2466251881Speter * @since New in 1.8. */ 2467251881Speter const char *moved_to_abspath; 2468251881Speter 2469251881Speter /* NOTE! Please update svn_client_status_dup() when adding new fields here. */ 2470251881Speter} svn_client_status_t; 2471251881Speter 2472251881Speter/** 2473251881Speter * Return a duplicate of @a status, allocated in @a result_pool. No part of the new 2474251881Speter * structure will be shared with @a status. 2475251881Speter * 2476251881Speter * @since New in 1.7. 2477251881Speter */ 2478251881Spetersvn_client_status_t * 2479251881Spetersvn_client_status_dup(const svn_client_status_t *status, 2480251881Speter apr_pool_t *result_pool); 2481251881Speter 2482251881Speter/** 2483251881Speter * A callback for reporting a @a status about @a path (which may be an 2484251881Speter * absolute or relative path). 2485251881Speter * 2486251881Speter * @a baton is a closure object; it should be provided by the 2487251881Speter * implementation, and passed by the caller. 2488251881Speter * 2489251881Speter * @a scratch_pool will be cleared between invocations to the callback. 2490251881Speter * 2491251881Speter * @since New in 1.7. 2492251881Speter */ 2493251881Spetertypedef svn_error_t *(*svn_client_status_func_t)( 2494251881Speter void *baton, 2495251881Speter const char *path, 2496251881Speter const svn_client_status_t *status, 2497251881Speter apr_pool_t *scratch_pool); 2498251881Speter 2499251881Speter/** 2500251881Speter * Given @a path to a working copy directory (or single file), call 2501251881Speter * @a status_func/status_baton with a set of #svn_wc_status_t * 2502251881Speter * structures which describe the status of @a path, and its children 2503251881Speter * (recursing according to @a depth). 2504251881Speter * 2505251881Speter * - If @a get_all is set, retrieve all entries; otherwise, 2506251881Speter * retrieve only "interesting" entries (local mods and/or 2507251881Speter * out of date). 2508251881Speter * 2509289180Speter * - If @a check_out_of_date is set, contact the repository and 2510289180Speter * augment the status structures with information about 2511289180Speter * out-of-dateness (with respect to @a revision). Also, if @a 2512289180Speter * result_rev is not @c NULL, set @a *result_rev to the actual 2513289180Speter * revision against which the working copy was compared (@a 2514289180Speter * *result_rev is not meaningful unless @a check_out_of_date is 2515289180Speter * set). 2516251881Speter * 2517289180Speter * - If @a check_working_copy is not set, do not scan the working 2518289180Speter * copy for local modifications. This parameter will be ignored 2519289180Speter * unless @a check_out_of_date is set. When set, the status 2520289180Speter * report will not contain any information about local changes in 2521289180Speter * the working copy; this includes local deletions and 2522289180Speter * replacements. 2523289180Speter * 2524251881Speter * If @a no_ignore is @c FALSE, don't report any file or directory (or 2525251881Speter * recurse into any directory) that is found by recursion (as opposed to 2526251881Speter * being the explicit target @a path) and whose name matches the 2527251881Speter * svn:ignore property on its parent directory or the global-ignores 2528251881Speter * list in @a ctx->config. If @a no_ignore is @c TRUE, report each such 2529251881Speter * file or directory with the status code #svn_wc_status_ignored. 2530251881Speter * 2531251881Speter * If @a ignore_externals is not set, then recurse into externals 2532251881Speter * definitions (if any exist) after handling the main target. This 2533251881Speter * calls the client notification function (in @a ctx) with the 2534251881Speter * #svn_wc_notify_status_external action before handling each externals 2535251881Speter * definition, and with #svn_wc_notify_status_completed 2536251881Speter * after each. 2537251881Speter * 2538251881Speter * If @a depth_as_sticky is set and @a depth is not 2539251881Speter * #svn_depth_unknown, then the status is calculated as if depth_is_sticky 2540251881Speter * was passed to an equivalent update command. 2541251881Speter * 2542251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 2543251881Speter * names, used as a restrictive filter on items whose statuses are 2544251881Speter * reported; that is, don't report status about any item unless 2545251881Speter * it's a member of one of those changelists. If @a changelists is 2546251881Speter * empty (or altogether @c NULL), no changelist filtering occurs. 2547251881Speter * 2548251881Speter * If @a path is an absolute path then the @c path parameter passed in each 2549251881Speter * call to @a status_func will be an absolute path. 2550251881Speter * 2551251881Speter * All temporary allocations are performed in @a scratch_pool. 2552251881Speter * 2553289180Speter * @since New in 1.9. 2554289180Speter */ 2555289180Spetersvn_error_t * 2556289180Spetersvn_client_status6(svn_revnum_t *result_rev, 2557289180Speter svn_client_ctx_t *ctx, 2558289180Speter const char *path, 2559289180Speter const svn_opt_revision_t *revision, 2560289180Speter svn_depth_t depth, 2561289180Speter svn_boolean_t get_all, 2562289180Speter svn_boolean_t check_out_of_date, 2563289180Speter svn_boolean_t check_working_copy, 2564289180Speter svn_boolean_t no_ignore, 2565289180Speter svn_boolean_t ignore_externals, 2566289180Speter svn_boolean_t depth_as_sticky, 2567289180Speter const apr_array_header_t *changelists, 2568289180Speter svn_client_status_func_t status_func, 2569289180Speter void *status_baton, 2570289180Speter apr_pool_t *scratch_pool); 2571289180Speter 2572289180Speter 2573289180Speter/** 2574289180Speter * Same as svn_client_status6(), but with @a check_out_of_date set to 2575289180Speter * @a update and @a check_working_copy set to @c TRUE. 2576289180Speter * 2577251881Speter * @since New in 1.7. 2578289180Speter * @deprecated Provided for backward compatibility with the 1.8 API. 2579251881Speter */ 2580289180SpeterSVN_DEPRECATED 2581251881Spetersvn_error_t * 2582251881Spetersvn_client_status5(svn_revnum_t *result_rev, 2583251881Speter svn_client_ctx_t *ctx, 2584251881Speter const char *path, 2585251881Speter const svn_opt_revision_t *revision, 2586251881Speter svn_depth_t depth, 2587251881Speter svn_boolean_t get_all, 2588251881Speter svn_boolean_t update, 2589251881Speter svn_boolean_t no_ignore, 2590251881Speter svn_boolean_t ignore_externals, 2591251881Speter svn_boolean_t depth_as_sticky, 2592251881Speter const apr_array_header_t *changelists, 2593251881Speter svn_client_status_func_t status_func, 2594251881Speter void *status_baton, 2595251881Speter apr_pool_t *scratch_pool); 2596251881Speter 2597251881Speter/** 2598251881Speter * Same as svn_client_status5(), but using #svn_wc_status_func3_t 2599251881Speter * instead of #svn_client_status_func_t and depth_as_sticky set to TRUE. 2600251881Speter * 2601251881Speter * @since New in 1.6. 2602251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 2603251881Speter */ 2604251881SpeterSVN_DEPRECATED 2605251881Spetersvn_error_t * 2606251881Spetersvn_client_status4(svn_revnum_t *result_rev, 2607251881Speter const char *path, 2608251881Speter const svn_opt_revision_t *revision, 2609251881Speter svn_wc_status_func3_t status_func, 2610251881Speter void *status_baton, 2611251881Speter svn_depth_t depth, 2612251881Speter svn_boolean_t get_all, 2613251881Speter svn_boolean_t update, 2614251881Speter svn_boolean_t no_ignore, 2615251881Speter svn_boolean_t ignore_externals, 2616251881Speter const apr_array_header_t *changelists, 2617251881Speter svn_client_ctx_t *ctx, 2618251881Speter apr_pool_t *pool); 2619251881Speter 2620251881Speter/** 2621251881Speter * Same as svn_client_status4(), but using an #svn_wc_status_func2_t 2622251881Speter * instead of an #svn_wc_status_func3_t. 2623251881Speter * 2624251881Speter * @since New in 1.5. 2625251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 2626251881Speter */ 2627251881SpeterSVN_DEPRECATED 2628251881Spetersvn_error_t * 2629251881Spetersvn_client_status3(svn_revnum_t *result_rev, 2630251881Speter const char *path, 2631251881Speter const svn_opt_revision_t *revision, 2632251881Speter svn_wc_status_func2_t status_func, 2633251881Speter void *status_baton, 2634251881Speter svn_depth_t depth, 2635251881Speter svn_boolean_t get_all, 2636251881Speter svn_boolean_t update, 2637251881Speter svn_boolean_t no_ignore, 2638251881Speter svn_boolean_t ignore_externals, 2639251881Speter const apr_array_header_t *changelists, 2640251881Speter svn_client_ctx_t *ctx, 2641251881Speter apr_pool_t *pool); 2642251881Speter 2643251881Speter/** 2644251881Speter * Like svn_client_status3(), except with @a changelists passed as @c 2645251881Speter * NULL, and with @a recurse instead of @a depth. If @a recurse is 2646251881Speter * TRUE, behave as if for #svn_depth_infinity; else if @a recurse is 2647251881Speter * FALSE, behave as if for #svn_depth_immediates. 2648251881Speter * 2649251881Speter * @since New in 1.2. 2650251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 2651251881Speter */ 2652251881SpeterSVN_DEPRECATED 2653251881Spetersvn_error_t * 2654251881Spetersvn_client_status2(svn_revnum_t *result_rev, 2655251881Speter const char *path, 2656251881Speter const svn_opt_revision_t *revision, 2657251881Speter svn_wc_status_func2_t status_func, 2658251881Speter void *status_baton, 2659251881Speter svn_boolean_t recurse, 2660251881Speter svn_boolean_t get_all, 2661251881Speter svn_boolean_t update, 2662251881Speter svn_boolean_t no_ignore, 2663251881Speter svn_boolean_t ignore_externals, 2664251881Speter svn_client_ctx_t *ctx, 2665251881Speter apr_pool_t *pool); 2666251881Speter 2667251881Speter 2668251881Speter/** 2669251881Speter * Similar to svn_client_status2(), but with @a ignore_externals 2670251881Speter * always set to FALSE, taking the #svn_wc_status_func_t type 2671251881Speter * instead of the #svn_wc_status_func2_t type for @a status_func, 2672251881Speter * and requiring @a *revision to be non-const even though it is 2673251881Speter * treated as constant. 2674251881Speter * 2675251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 2676251881Speter */ 2677251881SpeterSVN_DEPRECATED 2678251881Spetersvn_error_t * 2679251881Spetersvn_client_status(svn_revnum_t *result_rev, 2680251881Speter const char *path, 2681251881Speter svn_opt_revision_t *revision, 2682251881Speter svn_wc_status_func_t status_func, 2683251881Speter void *status_baton, 2684251881Speter svn_boolean_t recurse, 2685251881Speter svn_boolean_t get_all, 2686251881Speter svn_boolean_t update, 2687251881Speter svn_boolean_t no_ignore, 2688251881Speter svn_client_ctx_t *ctx, 2689251881Speter apr_pool_t *pool); 2690251881Speter 2691251881Speter/** @} */ 2692251881Speter 2693251881Speter/** 2694251881Speter * @defgroup Log View information about previous revisions of an object. 2695251881Speter * 2696251881Speter * @{ 2697251881Speter */ 2698251881Speter 2699251881Speter/** 2700251881Speter * Invoke @a receiver with @a receiver_baton on each log message from 2701251881Speter * each (#svn_opt_revision_range_t *) range in @a revision_ranges in turn, 2702251881Speter * inclusive (but never invoke @a receiver on a given log message more 2703251881Speter * than once). 2704251881Speter * 2705251881Speter * @a targets contains either a URL followed by zero or more relative 2706251881Speter * paths, or 1 working copy path, as <tt>const char *</tt>, for which log 2707251881Speter * messages are desired. @a receiver is invoked only on messages whose 2708251881Speter * revisions involved a change to some path in @a targets. @a peg_revision 2709251881Speter * indicates in which revision @a targets are valid. If @a peg_revision is 2710251881Speter * #svn_opt_revision_unspecified, it defaults to #svn_opt_revision_head 2711251881Speter * for URLs or #svn_opt_revision_working for WC paths. 2712251881Speter * 2713289180Speter * If @a limit is greater than zero only invoke @a receiver on the first 2714289180Speter * @a limit logs. 2715251881Speter * 2716251881Speter * If @a discover_changed_paths is set, then the @c changed_paths and @c 2717251881Speter * changed_paths2 fields in the @c log_entry argument to @a receiver will be 2718251881Speter * populated on each invocation. @note The @c text_modified and @c 2719251881Speter * props_modified fields of the changed paths structure may have the value 2720251881Speter * #svn_tristate_unknown if the repository does not report that information. 2721251881Speter * 2722251881Speter * If @a strict_node_history is set, copy history (if any exists) will 2723251881Speter * not be traversed while harvesting revision logs for each target. 2724251881Speter * 2725251881Speter * If @a include_merged_revisions is set, log information for revisions 2726251881Speter * which have been merged to @a targets will also be returned. 2727251881Speter * 2728251881Speter * If @a revprops is NULL, retrieve all revision properties; else, retrieve 2729251881Speter * only the revision properties named by the (const char *) array elements 2730251881Speter * (i.e. retrieve none if the array is empty). 2731251881Speter * 2732251881Speter * Use @a pool for any temporary allocation. 2733251881Speter * 2734251881Speter * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2 2735251881Speter * with a 'skip' signal on any unversioned targets. 2736251881Speter * 2737251881Speter * @since New in 1.6. 2738251881Speter */ 2739251881Spetersvn_error_t * 2740251881Spetersvn_client_log5(const apr_array_header_t *targets, 2741251881Speter const svn_opt_revision_t *peg_revision, 2742251881Speter const apr_array_header_t *revision_ranges, 2743251881Speter int limit, 2744251881Speter svn_boolean_t discover_changed_paths, 2745251881Speter svn_boolean_t strict_node_history, 2746251881Speter svn_boolean_t include_merged_revisions, 2747251881Speter const apr_array_header_t *revprops, 2748251881Speter svn_log_entry_receiver_t receiver, 2749251881Speter void *receiver_baton, 2750251881Speter svn_client_ctx_t *ctx, 2751251881Speter apr_pool_t *pool); 2752251881Speter 2753251881Speter/** 2754251881Speter * Similar to svn_client_log5(), but takes explicit start and end parameters 2755251881Speter * instead of an array of revision ranges. 2756251881Speter * 2757251881Speter * @deprecated Provided for compatibility with the 1.5 API. 2758251881Speter * @since New in 1.5. 2759251881Speter */ 2760251881SpeterSVN_DEPRECATED 2761251881Spetersvn_error_t * 2762251881Spetersvn_client_log4(const apr_array_header_t *targets, 2763251881Speter const svn_opt_revision_t *peg_revision, 2764251881Speter const svn_opt_revision_t *start, 2765251881Speter const svn_opt_revision_t *end, 2766251881Speter int limit, 2767251881Speter svn_boolean_t discover_changed_paths, 2768251881Speter svn_boolean_t strict_node_history, 2769251881Speter svn_boolean_t include_merged_revisions, 2770251881Speter const apr_array_header_t *revprops, 2771251881Speter svn_log_entry_receiver_t receiver, 2772251881Speter void *receiver_baton, 2773251881Speter svn_client_ctx_t *ctx, 2774251881Speter apr_pool_t *pool); 2775251881Speter 2776251881Speter/** 2777251881Speter * Similar to svn_client_log4(), but using #svn_log_message_receiver_t 2778251881Speter * instead of #svn_log_entry_receiver_t. Also, @a 2779251881Speter * include_merged_revisions is set to @c FALSE and @a revprops is 2780251881Speter * svn:author, svn:date, and svn:log. 2781251881Speter * 2782251881Speter * @deprecated Provided for compatibility with the 1.4 API. 2783251881Speter * @since New in 1.4. 2784251881Speter */ 2785251881SpeterSVN_DEPRECATED 2786251881Spetersvn_error_t * 2787251881Spetersvn_client_log3(const apr_array_header_t *targets, 2788251881Speter const svn_opt_revision_t *peg_revision, 2789251881Speter const svn_opt_revision_t *start, 2790251881Speter const svn_opt_revision_t *end, 2791251881Speter int limit, 2792251881Speter svn_boolean_t discover_changed_paths, 2793251881Speter svn_boolean_t strict_node_history, 2794251881Speter svn_log_message_receiver_t receiver, 2795251881Speter void *receiver_baton, 2796251881Speter svn_client_ctx_t *ctx, 2797251881Speter apr_pool_t *pool); 2798251881Speter 2799251881Speter 2800251881Speter/** 2801251881Speter * Similar to svn_client_log3(), but with the @c kind field of 2802251881Speter * @a peg_revision set to #svn_opt_revision_unspecified. 2803251881Speter * 2804251881Speter * @par Important: 2805251881Speter * A special case for the revision range HEAD:1, which was present 2806251881Speter * in svn_client_log(), has been removed from svn_client_log2(). Instead, it 2807251881Speter * is expected that callers will specify the range HEAD:0, to avoid a 2808251881Speter * #SVN_ERR_FS_NO_SUCH_REVISION error when invoked against an empty repository 2809251881Speter * (i.e. one not containing a revision 1). 2810251881Speter * 2811251881Speter * @deprecated Provided for compatibility with the 1.3 API. 2812251881Speter * @since New in 1.2. 2813251881Speter */ 2814251881SpeterSVN_DEPRECATED 2815251881Spetersvn_error_t * 2816251881Spetersvn_client_log2(const apr_array_header_t *targets, 2817251881Speter const svn_opt_revision_t *start, 2818251881Speter const svn_opt_revision_t *end, 2819251881Speter int limit, 2820251881Speter svn_boolean_t discover_changed_paths, 2821251881Speter svn_boolean_t strict_node_history, 2822251881Speter svn_log_message_receiver_t receiver, 2823251881Speter void *receiver_baton, 2824251881Speter svn_client_ctx_t *ctx, 2825251881Speter apr_pool_t *pool); 2826251881Speter 2827251881Speter 2828251881Speter/** 2829251881Speter * Similar to svn_client_log2(), but with @a limit set to 0, and the 2830251881Speter * following special case: 2831251881Speter * 2832251881Speter * Special case for repositories at revision 0: 2833251881Speter * 2834251881Speter * If @a start->kind is #svn_opt_revision_head, and @a end->kind is 2835251881Speter * #svn_opt_revision_number && @a end->number is @c 1, then handle an 2836251881Speter * empty (no revisions) repository specially: instead of erroring 2837251881Speter * because requested revision 1 when the highest revision is 0, just 2838251881Speter * invoke @a receiver on revision 0, passing @c NULL for changed paths and 2839251881Speter * empty strings for the author and date. This is because that 2840251881Speter * particular combination of @a start and @a end usually indicates the 2841251881Speter * common case of log invocation -- the user wants to see all log 2842251881Speter * messages from youngest to oldest, where the oldest commit is 2843251881Speter * revision 1. That works fine, except when there are no commits in 2844251881Speter * the repository, hence this special case. 2845251881Speter * 2846251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 2847251881Speter */ 2848251881SpeterSVN_DEPRECATED 2849251881Spetersvn_error_t * 2850251881Spetersvn_client_log(const apr_array_header_t *targets, 2851251881Speter const svn_opt_revision_t *start, 2852251881Speter const svn_opt_revision_t *end, 2853251881Speter svn_boolean_t discover_changed_paths, 2854251881Speter svn_boolean_t strict_node_history, 2855251881Speter svn_log_message_receiver_t receiver, 2856251881Speter void *receiver_baton, 2857251881Speter svn_client_ctx_t *ctx, 2858251881Speter apr_pool_t *pool); 2859251881Speter 2860251881Speter/** @} */ 2861251881Speter 2862251881Speter/** 2863251881Speter * @defgroup Blame Show modification information about lines in a file. 2864251881Speter * 2865251881Speter * @{ 2866251881Speter */ 2867251881Speter 2868251881Speter/** 2869251881Speter * Invoke @a receiver with @a receiver_baton on each line-blame item 2870251881Speter * associated with revision @a end of @a path_or_url, using @a start 2871251881Speter * as the default source of all blame. @a peg_revision indicates in 2872251881Speter * which revision @a path_or_url is valid. If @a peg_revision->kind 2873251881Speter * is #svn_opt_revision_unspecified, then it defaults to 2874251881Speter * #svn_opt_revision_head for URLs or #svn_opt_revision_working for 2875251881Speter * WC targets. 2876251881Speter * 2877251881Speter * If @a start->kind or @a end->kind is #svn_opt_revision_unspecified, 2878251881Speter * return the error #SVN_ERR_CLIENT_BAD_REVISION. If either are 2879251881Speter * #svn_opt_revision_working, return the error 2880251881Speter * #SVN_ERR_UNSUPPORTED_FEATURE. If any of the revisions of @a 2881251881Speter * path_or_url have a binary mime-type, return the error 2882251881Speter * #SVN_ERR_CLIENT_IS_BINARY_FILE, unless @a ignore_mime_type is TRUE, 2883251881Speter * in which case blame information will be generated regardless of the 2884251881Speter * MIME types of the revisions. 2885251881Speter * 2886289180Speter * @a start may resolve to a revision number greater (younger) than @a end 2887289180Speter * only if the server is 1.8.0 or greater (supports 2888289180Speter * #SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE) and the client is 1.9.0 or 2889289180Speter * newer. 2890289180Speter * 2891251881Speter * Use @a diff_options to determine how to compare different revisions of the 2892251881Speter * target. 2893251881Speter * 2894251881Speter * If @a include_merged_revisions is TRUE, also return data based upon 2895251881Speter * revisions which have been merged to @a path_or_url. 2896251881Speter * 2897251881Speter * Use @a pool for any temporary allocation. 2898251881Speter * 2899251881Speter * @since New in 1.7. 2900251881Speter */ 2901251881Spetersvn_error_t * 2902251881Spetersvn_client_blame5(const char *path_or_url, 2903251881Speter const svn_opt_revision_t *peg_revision, 2904251881Speter const svn_opt_revision_t *start, 2905251881Speter const svn_opt_revision_t *end, 2906251881Speter const svn_diff_file_options_t *diff_options, 2907251881Speter svn_boolean_t ignore_mime_type, 2908251881Speter svn_boolean_t include_merged_revisions, 2909251881Speter svn_client_blame_receiver3_t receiver, 2910251881Speter void *receiver_baton, 2911251881Speter svn_client_ctx_t *ctx, 2912251881Speter apr_pool_t *pool); 2913251881Speter 2914251881Speter 2915251881Speter/** 2916251881Speter * Similar to svn_client_blame5(), but with #svn_client_blame_receiver3_t 2917251881Speter * as the receiver. 2918251881Speter * 2919251881Speter * @deprecated Provided for backwards compatibility with the 1.6 API. 2920251881Speter * 2921251881Speter * @since New in 1.5. 2922251881Speter */ 2923251881SpeterSVN_DEPRECATED 2924251881Spetersvn_error_t * 2925251881Spetersvn_client_blame4(const char *path_or_url, 2926251881Speter const svn_opt_revision_t *peg_revision, 2927251881Speter const svn_opt_revision_t *start, 2928251881Speter const svn_opt_revision_t *end, 2929251881Speter const svn_diff_file_options_t *diff_options, 2930251881Speter svn_boolean_t ignore_mime_type, 2931251881Speter svn_boolean_t include_merged_revisions, 2932251881Speter svn_client_blame_receiver2_t receiver, 2933251881Speter void *receiver_baton, 2934251881Speter svn_client_ctx_t *ctx, 2935251881Speter apr_pool_t *pool); 2936251881Speter 2937251881Speter/** 2938251881Speter * Similar to svn_client_blame4(), but with @a include_merged_revisions set 2939251881Speter * to FALSE, and using a #svn_client_blame_receiver2_t as the receiver. 2940251881Speter * 2941251881Speter * @deprecated Provided for backwards compatibility with the 1.4 API. 2942251881Speter * 2943251881Speter * @since New in 1.4. 2944251881Speter */ 2945251881SpeterSVN_DEPRECATED 2946251881Spetersvn_error_t * 2947251881Spetersvn_client_blame3(const char *path_or_url, 2948251881Speter const svn_opt_revision_t *peg_revision, 2949251881Speter const svn_opt_revision_t *start, 2950251881Speter const svn_opt_revision_t *end, 2951251881Speter const svn_diff_file_options_t *diff_options, 2952251881Speter svn_boolean_t ignore_mime_type, 2953251881Speter svn_client_blame_receiver_t receiver, 2954251881Speter void *receiver_baton, 2955251881Speter svn_client_ctx_t *ctx, 2956251881Speter apr_pool_t *pool); 2957251881Speter 2958251881Speter/** 2959251881Speter * Similar to svn_client_blame3(), but with @a diff_options set to 2960251881Speter * default options as returned by svn_diff_file_options_parse() and 2961251881Speter * @a ignore_mime_type set to FALSE. 2962251881Speter * 2963251881Speter * @deprecated Provided for backwards compatibility with the 1.3 API. 2964251881Speter * 2965251881Speter * @since New in 1.2. 2966251881Speter */ 2967251881SpeterSVN_DEPRECATED 2968251881Spetersvn_error_t * 2969251881Spetersvn_client_blame2(const char *path_or_url, 2970251881Speter const svn_opt_revision_t *peg_revision, 2971251881Speter const svn_opt_revision_t *start, 2972251881Speter const svn_opt_revision_t *end, 2973251881Speter svn_client_blame_receiver_t receiver, 2974251881Speter void *receiver_baton, 2975251881Speter svn_client_ctx_t *ctx, 2976251881Speter apr_pool_t *pool); 2977251881Speter 2978251881Speter/** 2979251881Speter * Similar to svn_client_blame2() except that @a peg_revision is always 2980251881Speter * the same as @a end. 2981251881Speter * 2982251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 2983251881Speter */ 2984251881SpeterSVN_DEPRECATED 2985251881Spetersvn_error_t * 2986251881Spetersvn_client_blame(const char *path_or_url, 2987251881Speter const svn_opt_revision_t *start, 2988251881Speter const svn_opt_revision_t *end, 2989251881Speter svn_client_blame_receiver_t receiver, 2990251881Speter void *receiver_baton, 2991251881Speter svn_client_ctx_t *ctx, 2992251881Speter apr_pool_t *pool); 2993251881Speter 2994251881Speter/** @} */ 2995251881Speter 2996251881Speter/** 2997251881Speter * @defgroup Diff Generate differences between paths. 2998251881Speter * 2999251881Speter * @{ 3000251881Speter */ 3001251881Speter 3002251881Speter/** 3003251881Speter * Produce diff output which describes the delta between 3004251881Speter * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2. Print 3005251881Speter * the output of the diff to @a outstream, and any errors to @a 3006251881Speter * errstream. @a path_or_url1 and @a path_or_url2 can be either 3007251881Speter * working-copy paths or URLs. 3008251881Speter * 3009251881Speter * If @a relative_to_dir is not @c NULL, the original path and 3010251881Speter * modified path will have the @a relative_to_dir stripped from the 3011251881Speter * front of the respective paths. If @a relative_to_dir is @c NULL, 3012251881Speter * paths will not be modified. If @a relative_to_dir is not 3013251881Speter * @c NULL but @a relative_to_dir is not a parent path of the target, 3014251881Speter * an error is returned. Finally, if @a relative_to_dir is a URL, an 3015251881Speter * error will be returned. 3016251881Speter * 3017251881Speter * If either @a revision1 or @a revision2 has an `unspecified' or 3018251881Speter * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 3019251881Speter * 3020251881Speter * @a path_or_url1 and @a path_or_url2 must both represent the same node 3021251881Speter * kind -- that is, if @a path_or_url1 is a directory, @a path_or_url2 3022251881Speter * must also be, and if @a path_or_url1 is a file, @a path_or_url2 must 3023251881Speter * also be. 3024251881Speter * 3025251881Speter * If @a depth is #svn_depth_infinity, diff fully recursively. 3026251881Speter * Else if it is #svn_depth_immediates, diff the named paths and 3027251881Speter * their file children (if any), and diff properties of 3028251881Speter * subdirectories, but do not descend further into the subdirectories. 3029251881Speter * Else if #svn_depth_files, behave as if for #svn_depth_immediates 3030251881Speter * except don't diff properties of subdirectories. If 3031251881Speter * #svn_depth_empty, diff exactly the named paths but nothing 3032251881Speter * underneath them. 3033251881Speter * 3034251881Speter * Use @a ignore_ancestry to control whether or not items being 3035251881Speter * diffed will be checked for relatedness first. Unrelated items 3036251881Speter * are typically transmitted to the editor as a deletion of one thing 3037251881Speter * and the addition of another, but if this flag is TRUE, unrelated 3038251881Speter * items will be diffed as if they were related. 3039251881Speter * 3040251881Speter * If @a no_diff_added is TRUE, then no diff output will be generated 3041251881Speter * on added files. 3042251881Speter * 3043251881Speter * If @a no_diff_deleted is TRUE, then no diff output will be 3044251881Speter * generated on deleted files. 3045251881Speter * 3046251881Speter * If @a show_copies_as_adds is TRUE, then copied files will not be diffed 3047251881Speter * against their copyfrom source, and will appear in the diff output 3048251881Speter * in their entirety, as if they were newly added. 3049251881Speter * ### BUGS: For a repos-repos diff, this is ignored. Instead, a file is 3050251881Speter * diffed against its copyfrom source iff the file is the diff target 3051251881Speter * and not if some parent directory is the diff target. For a repos-WC 3052251881Speter * diff, this is ignored if the file is the diff target. 3053251881Speter * 3054251881Speter * If @a use_git_diff_format is TRUE, then the git's extended diff format 3055251881Speter * will be used. 3056251881Speter * ### Do we need to say more about the format? A reference perhaps? 3057251881Speter * 3058251881Speter * If @a ignore_properties is TRUE, do not show property differences. 3059251881Speter * If @a properties_only is TRUE, show only property changes. 3060251881Speter * The above two options are mutually exclusive. It is an error to set 3061251881Speter * both to TRUE. 3062251881Speter * 3063251881Speter * Generated headers are encoded using @a header_encoding. 3064251881Speter * 3065251881Speter * Diff output will not be generated for binary files, unless @a 3066251881Speter * ignore_content_type is TRUE, in which case diffs will be shown 3067251881Speter * regardless of the content types. 3068251881Speter * 3069251881Speter * @a diff_options (an array of <tt>const char *</tt>) is used to pass 3070251881Speter * additional command line options to the diff processes invoked to compare 3071251881Speter * files. @a diff_options is allowed to be @c NULL, in which case a value 3072251881Speter * for this option might still be obtained from the Subversion configuration 3073251881Speter * file via client context @a ctx. 3074251881Speter * 3075251881Speter * The authentication baton cached in @a ctx is used to communicate with 3076251881Speter * the repository. 3077251881Speter * 3078251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 3079251881Speter * names, used as a restrictive filter on items whose differences are 3080251881Speter * reported; that is, don't generate diffs about any item unless 3081251881Speter * it's a member of one of those changelists. If @a changelists is 3082251881Speter * empty (or altogether @c NULL), no changelist filtering occurs. 3083251881Speter * 3084251881Speter * @note Changelist filtering only applies to diffs in which at least 3085251881Speter * one side of the diff represents working copy data. 3086251881Speter * 3087251881Speter * @note @a header_encoding doesn't affect headers generated by external 3088251881Speter * diff programs. 3089251881Speter * 3090251881Speter * @note @a relative_to_dir doesn't affect the path index generated by 3091251881Speter * external diff programs. 3092251881Speter * 3093251881Speter * @since New in 1.8. 3094251881Speter */ 3095251881Spetersvn_error_t * 3096251881Spetersvn_client_diff6(const apr_array_header_t *diff_options, 3097251881Speter const char *path_or_url1, 3098251881Speter const svn_opt_revision_t *revision1, 3099251881Speter const char *path_or_url2, 3100251881Speter const svn_opt_revision_t *revision2, 3101251881Speter const char *relative_to_dir, 3102251881Speter svn_depth_t depth, 3103251881Speter svn_boolean_t ignore_ancestry, 3104251881Speter svn_boolean_t no_diff_added, 3105251881Speter svn_boolean_t no_diff_deleted, 3106251881Speter svn_boolean_t show_copies_as_adds, 3107251881Speter svn_boolean_t ignore_content_type, 3108251881Speter svn_boolean_t ignore_properties, 3109251881Speter svn_boolean_t properties_only, 3110251881Speter svn_boolean_t use_git_diff_format, 3111251881Speter const char *header_encoding, 3112251881Speter svn_stream_t *outstream, 3113251881Speter svn_stream_t *errstream, 3114251881Speter const apr_array_header_t *changelists, 3115251881Speter svn_client_ctx_t *ctx, 3116251881Speter apr_pool_t *pool); 3117251881Speter 3118251881Speter/** Similar to svn_client_diff6(), but with @a outfile and @a errfile, 3119251881Speter * instead of @a outstream and @a errstream, and with @a 3120251881Speter * no_diff_added, @a ignore_properties, and @a properties_only always 3121251881Speter * passed as @c FALSE (which means that additions and property changes 3122251881Speter * are always transmitted). 3123251881Speter * 3124251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 3125251881Speter * @since New in 1.7. 3126251881Speter */ 3127251881SpeterSVN_DEPRECATED 3128251881Spetersvn_error_t * 3129251881Spetersvn_client_diff5(const apr_array_header_t *diff_options, 3130251881Speter const char *path1, 3131251881Speter const svn_opt_revision_t *revision1, 3132251881Speter const char *path2, 3133251881Speter const svn_opt_revision_t *revision2, 3134251881Speter const char *relative_to_dir, 3135251881Speter svn_depth_t depth, 3136251881Speter svn_boolean_t ignore_ancestry, 3137251881Speter svn_boolean_t no_diff_deleted, 3138251881Speter svn_boolean_t show_copies_as_adds, 3139251881Speter svn_boolean_t ignore_content_type, 3140251881Speter svn_boolean_t use_git_diff_format, 3141251881Speter const char *header_encoding, 3142251881Speter apr_file_t *outfile, 3143251881Speter apr_file_t *errfile, 3144251881Speter const apr_array_header_t *changelists, 3145251881Speter svn_client_ctx_t *ctx, 3146251881Speter apr_pool_t *pool); 3147251881Speter 3148251881Speter/** 3149251881Speter * Similar to svn_client_diff5(), but with @a show_copies_as_adds set to 3150251881Speter * @c FALSE and @a use_git_diff_format set to @c FALSE. 3151251881Speter * 3152251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 3153251881Speter * @since New in 1.5. 3154251881Speter */ 3155251881SpeterSVN_DEPRECATED 3156251881Spetersvn_error_t * 3157251881Spetersvn_client_diff4(const apr_array_header_t *diff_options, 3158251881Speter const char *path1, 3159251881Speter const svn_opt_revision_t *revision1, 3160251881Speter const char *path2, 3161251881Speter const svn_opt_revision_t *revision2, 3162251881Speter const char *relative_to_dir, 3163251881Speter svn_depth_t depth, 3164251881Speter svn_boolean_t ignore_ancestry, 3165251881Speter svn_boolean_t no_diff_deleted, 3166251881Speter svn_boolean_t ignore_content_type, 3167251881Speter const char *header_encoding, 3168251881Speter apr_file_t *outfile, 3169251881Speter apr_file_t *errfile, 3170251881Speter const apr_array_header_t *changelists, 3171251881Speter svn_client_ctx_t *ctx, 3172251881Speter apr_pool_t *pool); 3173251881Speter 3174251881Speter/** 3175251881Speter * Similar to svn_client_diff4(), but with @a changelists passed as @c 3176251881Speter * NULL, and @a depth set according to @a recurse: if @a recurse is 3177251881Speter * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 3178251881Speter * FALSE, set @a depth to #svn_depth_empty. 3179251881Speter * 3180251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3181251881Speter * @since New in 1.3. 3182251881Speter */ 3183251881SpeterSVN_DEPRECATED 3184251881Spetersvn_error_t * 3185251881Spetersvn_client_diff3(const apr_array_header_t *diff_options, 3186251881Speter const char *path1, 3187251881Speter const svn_opt_revision_t *revision1, 3188251881Speter const char *path2, 3189251881Speter const svn_opt_revision_t *revision2, 3190251881Speter svn_boolean_t recurse, 3191251881Speter svn_boolean_t ignore_ancestry, 3192251881Speter svn_boolean_t no_diff_deleted, 3193251881Speter svn_boolean_t ignore_content_type, 3194251881Speter const char *header_encoding, 3195251881Speter apr_file_t *outfile, 3196251881Speter apr_file_t *errfile, 3197251881Speter svn_client_ctx_t *ctx, 3198251881Speter apr_pool_t *pool); 3199251881Speter 3200251881Speter 3201251881Speter/** 3202251881Speter * Similar to svn_client_diff3(), but with @a header_encoding set to 3203251881Speter * @c APR_LOCALE_CHARSET. 3204251881Speter * 3205251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 3206251881Speter * @since New in 1.2. 3207251881Speter */ 3208251881SpeterSVN_DEPRECATED 3209251881Spetersvn_error_t * 3210251881Spetersvn_client_diff2(const apr_array_header_t *diff_options, 3211251881Speter const char *path1, 3212251881Speter const svn_opt_revision_t *revision1, 3213251881Speter const char *path2, 3214251881Speter const svn_opt_revision_t *revision2, 3215251881Speter svn_boolean_t recurse, 3216251881Speter svn_boolean_t ignore_ancestry, 3217251881Speter svn_boolean_t no_diff_deleted, 3218251881Speter svn_boolean_t ignore_content_type, 3219251881Speter apr_file_t *outfile, 3220251881Speter apr_file_t *errfile, 3221251881Speter svn_client_ctx_t *ctx, 3222251881Speter apr_pool_t *pool); 3223251881Speter 3224251881Speter/** 3225251881Speter * Similar to svn_client_diff2(), but with @a ignore_content_type 3226251881Speter * always set to FALSE. 3227251881Speter * 3228251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 3229251881Speter */ 3230251881SpeterSVN_DEPRECATED 3231251881Spetersvn_error_t * 3232251881Spetersvn_client_diff(const apr_array_header_t *diff_options, 3233251881Speter const char *path1, 3234251881Speter const svn_opt_revision_t *revision1, 3235251881Speter const char *path2, 3236251881Speter const svn_opt_revision_t *revision2, 3237251881Speter svn_boolean_t recurse, 3238251881Speter svn_boolean_t ignore_ancestry, 3239251881Speter svn_boolean_t no_diff_deleted, 3240251881Speter apr_file_t *outfile, 3241251881Speter apr_file_t *errfile, 3242251881Speter svn_client_ctx_t *ctx, 3243251881Speter apr_pool_t *pool); 3244251881Speter 3245251881Speter/** 3246251881Speter * Produce diff output which describes the delta between the filesystem 3247251881Speter * object @a path_or_url in peg revision @a peg_revision, as it changed 3248251881Speter * between @a start_revision and @a end_revision. @a path_or_url can 3249251881Speter * be either a working-copy path or URL. 3250251881Speter * 3251251881Speter * If @a peg_revision is #svn_opt_revision_unspecified, behave 3252251881Speter * identically to svn_client_diff6(), using @a path_or_url for both of that 3253251881Speter * function's @a path_or_url1 and @a path_or_url2 arguments. 3254251881Speter * 3255251881Speter * All other options are handled identically to svn_client_diff6(). 3256251881Speter * 3257251881Speter * @since New in 1.8. 3258251881Speter */ 3259251881Spetersvn_error_t * 3260251881Spetersvn_client_diff_peg6(const apr_array_header_t *diff_options, 3261251881Speter const char *path_or_url, 3262251881Speter const svn_opt_revision_t *peg_revision, 3263251881Speter const svn_opt_revision_t *start_revision, 3264251881Speter const svn_opt_revision_t *end_revision, 3265251881Speter const char *relative_to_dir, 3266251881Speter svn_depth_t depth, 3267251881Speter svn_boolean_t ignore_ancestry, 3268251881Speter svn_boolean_t no_diff_added, 3269251881Speter svn_boolean_t no_diff_deleted, 3270251881Speter svn_boolean_t show_copies_as_adds, 3271251881Speter svn_boolean_t ignore_content_type, 3272251881Speter svn_boolean_t ignore_properties, 3273251881Speter svn_boolean_t properties_only, 3274251881Speter svn_boolean_t use_git_diff_format, 3275251881Speter const char *header_encoding, 3276251881Speter svn_stream_t *outstream, 3277251881Speter svn_stream_t *errstream, 3278251881Speter const apr_array_header_t *changelists, 3279251881Speter svn_client_ctx_t *ctx, 3280251881Speter apr_pool_t *pool); 3281251881Speter 3282251881Speter/** Similar to svn_client_diff6_peg6(), but with @a outfile and @a errfile, 3283251881Speter * instead of @a outstream and @a errstream, and with @a 3284251881Speter * no_diff_added, @a ignore_properties, and @a properties_only always 3285251881Speter * passed as @c FALSE (which means that additions and property changes 3286251881Speter * are always transmitted). 3287251881Speter * 3288251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 3289251881Speter * @since New in 1.7. 3290251881Speter */ 3291251881SpeterSVN_DEPRECATED 3292251881Spetersvn_error_t * 3293251881Spetersvn_client_diff_peg5(const apr_array_header_t *diff_options, 3294251881Speter const char *path, 3295251881Speter const svn_opt_revision_t *peg_revision, 3296251881Speter const svn_opt_revision_t *start_revision, 3297251881Speter const svn_opt_revision_t *end_revision, 3298251881Speter const char *relative_to_dir, 3299251881Speter svn_depth_t depth, 3300251881Speter svn_boolean_t ignore_ancestry, 3301251881Speter svn_boolean_t no_diff_deleted, 3302251881Speter svn_boolean_t show_copies_as_adds, 3303251881Speter svn_boolean_t ignore_content_type, 3304251881Speter svn_boolean_t use_git_diff_format, 3305251881Speter const char *header_encoding, 3306251881Speter apr_file_t *outfile, 3307251881Speter apr_file_t *errfile, 3308251881Speter const apr_array_header_t *changelists, 3309251881Speter svn_client_ctx_t *ctx, 3310251881Speter apr_pool_t *pool); 3311251881Speter 3312251881Speter/** 3313251881Speter * Similar to svn_client_diff_peg5(), but with @a show_copies_as_adds set to 3314251881Speter * @c FALSE and @a use_git_diff_format set to @c FALSE. 3315251881Speter * 3316251881Speter * @since New in 1.5. 3317251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 3318251881Speter */ 3319251881SpeterSVN_DEPRECATED 3320251881Spetersvn_error_t * 3321251881Spetersvn_client_diff_peg4(const apr_array_header_t *diff_options, 3322251881Speter const char *path, 3323251881Speter const svn_opt_revision_t *peg_revision, 3324251881Speter const svn_opt_revision_t *start_revision, 3325251881Speter const svn_opt_revision_t *end_revision, 3326251881Speter const char *relative_to_dir, 3327251881Speter svn_depth_t depth, 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 const apr_array_header_t *changelists, 3335251881Speter svn_client_ctx_t *ctx, 3336251881Speter apr_pool_t *pool); 3337251881Speter 3338251881Speter/** 3339251881Speter * Similar to svn_client_diff_peg4(), but with @a changelists passed 3340251881Speter * as @c NULL, and @a depth set according to @a recurse: if @a recurse 3341251881Speter * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 3342251881Speter * FALSE, set @a depth to #svn_depth_files. 3343251881Speter * 3344251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3345251881Speter * @since New in 1.3. 3346251881Speter */ 3347251881SpeterSVN_DEPRECATED 3348251881Spetersvn_error_t * 3349251881Spetersvn_client_diff_peg3(const apr_array_header_t *diff_options, 3350251881Speter const char *path, 3351251881Speter const svn_opt_revision_t *peg_revision, 3352251881Speter const svn_opt_revision_t *start_revision, 3353251881Speter const svn_opt_revision_t *end_revision, 3354251881Speter svn_boolean_t recurse, 3355251881Speter svn_boolean_t ignore_ancestry, 3356251881Speter svn_boolean_t no_diff_deleted, 3357251881Speter svn_boolean_t ignore_content_type, 3358251881Speter const char *header_encoding, 3359251881Speter apr_file_t *outfile, 3360251881Speter apr_file_t *errfile, 3361251881Speter svn_client_ctx_t *ctx, 3362251881Speter apr_pool_t *pool); 3363251881Speter 3364251881Speter/** 3365251881Speter * Similar to svn_client_diff_peg3(), but with @a header_encoding set to 3366251881Speter * @c APR_LOCALE_CHARSET. 3367251881Speter * 3368251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 3369251881Speter * @since New in 1.2. 3370251881Speter */ 3371251881SpeterSVN_DEPRECATED 3372251881Spetersvn_error_t * 3373251881Spetersvn_client_diff_peg2(const apr_array_header_t *diff_options, 3374251881Speter const char *path, 3375251881Speter const svn_opt_revision_t *peg_revision, 3376251881Speter const svn_opt_revision_t *start_revision, 3377251881Speter const svn_opt_revision_t *end_revision, 3378251881Speter svn_boolean_t recurse, 3379251881Speter svn_boolean_t ignore_ancestry, 3380251881Speter svn_boolean_t no_diff_deleted, 3381251881Speter svn_boolean_t ignore_content_type, 3382251881Speter apr_file_t *outfile, 3383251881Speter apr_file_t *errfile, 3384251881Speter svn_client_ctx_t *ctx, 3385251881Speter apr_pool_t *pool); 3386251881Speter 3387251881Speter/** 3388251881Speter * Similar to svn_client_diff_peg2(), but with @a ignore_content_type 3389251881Speter * always set to FALSE. 3390251881Speter * 3391251881Speter * @since New in 1.1. 3392251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 3393251881Speter */ 3394251881SpeterSVN_DEPRECATED 3395251881Spetersvn_error_t * 3396251881Spetersvn_client_diff_peg(const apr_array_header_t *diff_options, 3397251881Speter const char *path, 3398251881Speter const svn_opt_revision_t *peg_revision, 3399251881Speter const svn_opt_revision_t *start_revision, 3400251881Speter const svn_opt_revision_t *end_revision, 3401251881Speter svn_boolean_t recurse, 3402251881Speter svn_boolean_t ignore_ancestry, 3403251881Speter svn_boolean_t no_diff_deleted, 3404251881Speter apr_file_t *outfile, 3405251881Speter apr_file_t *errfile, 3406251881Speter svn_client_ctx_t *ctx, 3407251881Speter apr_pool_t *pool); 3408251881Speter 3409251881Speter/** 3410251881Speter * Produce a diff summary which lists the changed items between 3411251881Speter * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2 without 3412251881Speter * creating text deltas. @a path_or_url1 and @a path_or_url2 can be 3413251881Speter * either working-copy paths or URLs. 3414251881Speter * 3415251881Speter * The function may report false positives if @a ignore_ancestry is false, 3416251881Speter * since a file might have been modified between two revisions, but still 3417251881Speter * have the same contents. 3418251881Speter * 3419251881Speter * Calls @a summarize_func with @a summarize_baton for each difference 3420251881Speter * with a #svn_client_diff_summarize_t structure describing the difference. 3421251881Speter * 3422251881Speter * See svn_client_diff6() for a description of the other parameters. 3423251881Speter * 3424251881Speter * @since New in 1.5. 3425251881Speter */ 3426251881Spetersvn_error_t * 3427251881Spetersvn_client_diff_summarize2(const char *path_or_url1, 3428251881Speter const svn_opt_revision_t *revision1, 3429251881Speter const char *path_or_url2, 3430251881Speter const svn_opt_revision_t *revision2, 3431251881Speter svn_depth_t depth, 3432251881Speter svn_boolean_t ignore_ancestry, 3433251881Speter const apr_array_header_t *changelists, 3434251881Speter svn_client_diff_summarize_func_t summarize_func, 3435251881Speter void *summarize_baton, 3436251881Speter svn_client_ctx_t *ctx, 3437251881Speter apr_pool_t *pool); 3438251881Speter 3439251881Speter/** 3440251881Speter * Similar to svn_client_diff_summarize2(), but with @a changelists 3441251881Speter * passed as @c NULL, and @a depth set according to @a recurse: if @a 3442251881Speter * recurse is TRUE, set @a depth to #svn_depth_infinity, if @a 3443251881Speter * recurse is FALSE, set @a depth to #svn_depth_files. 3444251881Speter * 3445251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3446251881Speter * 3447251881Speter * @since New in 1.4. 3448251881Speter */ 3449251881SpeterSVN_DEPRECATED 3450251881Spetersvn_error_t * 3451251881Spetersvn_client_diff_summarize(const char *path1, 3452251881Speter const svn_opt_revision_t *revision1, 3453251881Speter const char *path2, 3454251881Speter const svn_opt_revision_t *revision2, 3455251881Speter svn_boolean_t recurse, 3456251881Speter svn_boolean_t ignore_ancestry, 3457251881Speter svn_client_diff_summarize_func_t summarize_func, 3458251881Speter void *summarize_baton, 3459251881Speter svn_client_ctx_t *ctx, 3460251881Speter apr_pool_t *pool); 3461251881Speter 3462251881Speter/** 3463251881Speter * Produce a diff summary which lists the changed items between the 3464251881Speter * filesystem object @a path_or_url in peg revision @a peg_revision, as it 3465251881Speter * changed between @a start_revision and @a end_revision. @a path_or_url can 3466251881Speter * be either a working-copy path or URL. 3467251881Speter * 3468251881Speter * If @a peg_revision is #svn_opt_revision_unspecified, behave 3469251881Speter * identically to svn_client_diff_summarize2(), using @a path_or_url for 3470251881Speter * both of that function's @a path_or_url1 and @a path_or_url2 arguments. 3471251881Speter * 3472251881Speter * The function may report false positives if @a ignore_ancestry is false, 3473251881Speter * as described in the documentation for svn_client_diff_summarize2(). 3474251881Speter * 3475251881Speter * Call @a summarize_func with @a summarize_baton for each difference 3476251881Speter * with a #svn_client_diff_summarize_t structure describing the difference. 3477251881Speter * 3478251881Speter * See svn_client_diff_peg5() for a description of the other parameters. 3479251881Speter * 3480251881Speter * @since New in 1.5. 3481251881Speter */ 3482251881Spetersvn_error_t * 3483251881Spetersvn_client_diff_summarize_peg2(const char *path_or_url, 3484251881Speter const svn_opt_revision_t *peg_revision, 3485251881Speter const svn_opt_revision_t *start_revision, 3486251881Speter const svn_opt_revision_t *end_revision, 3487251881Speter svn_depth_t depth, 3488251881Speter svn_boolean_t ignore_ancestry, 3489251881Speter const apr_array_header_t *changelists, 3490251881Speter svn_client_diff_summarize_func_t summarize_func, 3491251881Speter void *summarize_baton, 3492251881Speter svn_client_ctx_t *ctx, 3493251881Speter apr_pool_t *pool); 3494251881Speter 3495251881Speter/** 3496251881Speter * Similar to svn_client_diff_summarize_peg2(), but with @a 3497251881Speter * changelists passed as @c NULL, and @a depth set according to @a 3498251881Speter * recurse: if @a recurse is TRUE, set @a depth to 3499251881Speter * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to 3500251881Speter * #svn_depth_files. 3501251881Speter * 3502251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3503251881Speter * 3504251881Speter * @since New in 1.4. 3505251881Speter */ 3506251881SpeterSVN_DEPRECATED 3507251881Spetersvn_error_t * 3508251881Spetersvn_client_diff_summarize_peg(const char *path, 3509251881Speter const svn_opt_revision_t *peg_revision, 3510251881Speter const svn_opt_revision_t *start_revision, 3511251881Speter const svn_opt_revision_t *end_revision, 3512251881Speter svn_boolean_t recurse, 3513251881Speter svn_boolean_t ignore_ancestry, 3514251881Speter svn_client_diff_summarize_func_t summarize_func, 3515251881Speter void *summarize_baton, 3516251881Speter svn_client_ctx_t *ctx, 3517251881Speter apr_pool_t *pool); 3518251881Speter 3519251881Speter/** @} */ 3520251881Speter 3521251881Speter/** 3522251881Speter * @defgroup Merge Merge changes between branches. 3523251881Speter * 3524251881Speter * @{ 3525251881Speter */ 3526251881Speter 3527251881Speter/** Get information about the state of merging between two branches. 3528251881Speter * 3529251881Speter * The source is specified by @a source_path_or_url at @a source_revision. 3530251881Speter * The target is specified by @a target_path_or_url at @a target_revision, 3531251881Speter * which refers to either a WC or a repository location. 3532251881Speter * 3533251881Speter * Set @a *needs_reintegration to true if an automatic merge from source 3534251881Speter * to target would be a reintegration merge: that is, if the last automatic 3535251881Speter * merge was in the opposite direction; or to false otherwise. 3536251881Speter * 3537251881Speter * Set @a *yca_url, @a *yca_rev, @a *base_url, @a *base_rev, @a *right_url, 3538251881Speter * @a *right_rev, @a *target_url, @a *target_rev to the repository locations 3539251881Speter * of, respectively: the youngest common ancestor of the branches, the base 3540251881Speter * chosen for 3-way merge, the right-hand side of the source diff, and the 3541251881Speter * target. 3542251881Speter * 3543251881Speter * Set @a repos_root_url to the URL of the repository root. This is a 3544251881Speter * common prefix of all four URL outputs. 3545251881Speter * 3546251881Speter * Allocate the results in @a result_pool. Any of the output pointers may 3547251881Speter * be NULL if not wanted. 3548251881Speter * 3549251881Speter * @since New in 1.8. 3550251881Speter */ 3551251881Spetersvn_error_t * 3552251881Spetersvn_client_get_merging_summary(svn_boolean_t *needs_reintegration, 3553251881Speter const char **yca_url, svn_revnum_t *yca_rev, 3554251881Speter const char **base_url, svn_revnum_t *base_rev, 3555251881Speter const char **right_url, svn_revnum_t *right_rev, 3556251881Speter const char **target_url, svn_revnum_t *target_rev, 3557251881Speter const char **repos_root_url, 3558251881Speter const char *source_path_or_url, 3559251881Speter const svn_opt_revision_t *source_revision, 3560251881Speter const char *target_path_or_url, 3561251881Speter const svn_opt_revision_t *target_revision, 3562251881Speter svn_client_ctx_t *ctx, 3563251881Speter apr_pool_t *result_pool, 3564251881Speter apr_pool_t *scratch_pool); 3565251881Speter 3566251881Speter 3567251881Speter/** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into 3568251881Speter * the working-copy path @a target_wcpath. 3569251881Speter * 3570251881Speter * @a source1 and @a source2 are either URLs that refer to entries in the 3571251881Speter * repository, or paths to entries in the working copy. 3572251881Speter * 3573251881Speter * By "merging", we mean: apply file differences using 3574251881Speter * svn_wc_merge(), and schedule additions & deletions when appropriate. 3575251881Speter * 3576251881Speter * @a source1 and @a source2 must both represent the same node kind -- that 3577251881Speter * is, if @a source1 is a directory, @a source2 must also be, and if @a source1 3578251881Speter * is a file, @a source2 must also be. 3579251881Speter * 3580251881Speter * If either @a revision1 or @a revision2 has an `unspecified' or 3581251881Speter * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 3582251881Speter * 3583251881Speter * If @a depth is #svn_depth_infinity, merge fully recursively. 3584251881Speter * Else if #svn_depth_immediates, merge changes at most to files 3585251881Speter * that are immediate children of @a target_wcpath and to directory 3586251881Speter * properties of @a target_wcpath and its immediate subdirectory children. 3587251881Speter * Else if #svn_depth_files, merge at most to immediate file 3588251881Speter * children of @a target_wcpath and to @a target_wcpath itself. 3589251881Speter * Else if #svn_depth_empty, apply changes only to @a target_wcpath 3590251881Speter * (i.e., directory property changes only) 3591251881Speter * 3592251881Speter * If @a depth is #svn_depth_unknown, use the depth of @a target_wcpath. 3593251881Speter * 3594251881Speter * If @a ignore_mergeinfo is true, disable merge tracking, by treating the 3595251881Speter * two sources as unrelated even if they actually have a common ancestor. 3596251881Speter * 3597251881Speter * If @a diff_ignore_ancestry is true, diff unrelated nodes as if related: 3598251881Speter * that is, diff the 'left' and 'right' versions of a node as if they were 3599251881Speter * related (if they are the same kind) even if they are not related. 3600251881Speter * Otherwise, diff unrelated items as a deletion of one thing and the 3601251881Speter * addition of another. 3602251881Speter * 3603251881Speter * If @a force_delete is false and the merge involves deleting a file whose 3604251881Speter * content differs from the source-left version, or a locally modified 3605251881Speter * directory, or an unversioned item, then the operation will fail. If 3606251881Speter * @a force_delete is true then all such items will be deleted. 3607251881Speter * 3608251881Speter * @a merge_options (an array of <tt>const char *</tt>), if non-NULL, 3609251881Speter * is used to pass additional command line arguments to the merge 3610251881Speter * processes (internal or external). @see 3611251881Speter * svn_diff_file_options_parse(). 3612251881Speter * 3613251881Speter * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with @a 3614251881Speter * ctx->notify_baton2 once for each merged target, passing the target's local 3615251881Speter * path. 3616251881Speter * 3617251881Speter * If @a record_only is TRUE, the merge is performed, but is limited only to 3618251881Speter * mergeinfo property changes on existing paths in @a target_wcpath. 3619251881Speter * 3620251881Speter * If @a dry_run is TRUE, the merge is carried out, and full notification 3621251881Speter * feedback is provided, but the working copy is not modified. 3622251881Speter * 3623251881Speter * If allow_mixed_rev is @c FALSE, and @a merge_target is a mixed-revision 3624251881Speter * working copy, raise @c SVN_ERR_CLIENT_MERGE_UPDATE_REQUIRED. 3625251881Speter * Because users rarely intend to merge into mixed-revision working copies, 3626251881Speter * it is recommended to set this parameter to FALSE by default unless the 3627251881Speter * user has explicitly requested a merge into a mixed-revision working copy. 3628251881Speter * 3629251881Speter * The authentication baton cached in @a ctx is used to communicate with the 3630251881Speter * repository. 3631251881Speter * 3632251881Speter * @since New in 1.8. 3633251881Speter */ 3634251881Spetersvn_error_t * 3635251881Spetersvn_client_merge5(const char *source1, 3636251881Speter const svn_opt_revision_t *revision1, 3637251881Speter const char *source2, 3638251881Speter const svn_opt_revision_t *revision2, 3639251881Speter const char *target_wcpath, 3640251881Speter svn_depth_t depth, 3641251881Speter svn_boolean_t ignore_mergeinfo, 3642251881Speter svn_boolean_t diff_ignore_ancestry, 3643251881Speter svn_boolean_t force_delete, 3644251881Speter svn_boolean_t record_only, 3645251881Speter svn_boolean_t dry_run, 3646251881Speter svn_boolean_t allow_mixed_rev, 3647251881Speter const apr_array_header_t *merge_options, 3648251881Speter svn_client_ctx_t *ctx, 3649251881Speter apr_pool_t *pool); 3650251881Speter 3651251881Speter/** 3652251881Speter * Similar to svn_client_merge5(), but the single @a ignore_ancestry 3653251881Speter * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry. 3654251881Speter * 3655251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 3656251881Speter * @since New in 1.7. 3657251881Speter */ 3658251881SpeterSVN_DEPRECATED 3659251881Spetersvn_error_t * 3660251881Spetersvn_client_merge4(const char *source1, 3661251881Speter const svn_opt_revision_t *revision1, 3662251881Speter const char *source2, 3663251881Speter const svn_opt_revision_t *revision2, 3664251881Speter const char *target_wcpath, 3665251881Speter svn_depth_t depth, 3666251881Speter svn_boolean_t ignore_ancestry, 3667251881Speter svn_boolean_t force_delete, 3668251881Speter svn_boolean_t record_only, 3669251881Speter svn_boolean_t dry_run, 3670251881Speter svn_boolean_t allow_mixed_rev, 3671251881Speter const apr_array_header_t *merge_options, 3672251881Speter svn_client_ctx_t *ctx, 3673251881Speter apr_pool_t *pool); 3674251881Speter 3675251881Speter/** 3676251881Speter * Similar to svn_client_merge4(), but with @a allow_mixed_rev set to 3677251881Speter * @c TRUE. The @a force parameter maps to the @c force_delete parameter 3678251881Speter * of svn_client_merge4(). 3679251881Speter * 3680251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 3681251881Speter * 3682251881Speter * @since New in 1.5. 3683251881Speter */ 3684251881SpeterSVN_DEPRECATED 3685251881Spetersvn_error_t * 3686251881Spetersvn_client_merge3(const char *source1, 3687251881Speter const svn_opt_revision_t *revision1, 3688251881Speter const char *source2, 3689251881Speter const svn_opt_revision_t *revision2, 3690251881Speter const char *target_wcpath, 3691251881Speter svn_depth_t depth, 3692251881Speter svn_boolean_t ignore_ancestry, 3693251881Speter svn_boolean_t force, 3694251881Speter svn_boolean_t record_only, 3695251881Speter svn_boolean_t dry_run, 3696251881Speter const apr_array_header_t *merge_options, 3697251881Speter svn_client_ctx_t *ctx, 3698251881Speter apr_pool_t *pool); 3699251881Speter 3700251881Speter/** 3701251881Speter * Similar to svn_client_merge3(), but with @a record_only set to @c 3702251881Speter * FALSE, and @a depth set according to @a recurse: if @a recurse is 3703251881Speter * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 3704251881Speter * FALSE, set @a depth to #svn_depth_files. 3705251881Speter * 3706251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 3707251881Speter * 3708251881Speter * @since New in 1.4. 3709251881Speter */ 3710251881SpeterSVN_DEPRECATED 3711251881Spetersvn_error_t * 3712251881Spetersvn_client_merge2(const char *source1, 3713251881Speter const svn_opt_revision_t *revision1, 3714251881Speter const char *source2, 3715251881Speter const svn_opt_revision_t *revision2, 3716251881Speter const char *target_wcpath, 3717251881Speter svn_boolean_t recurse, 3718251881Speter svn_boolean_t ignore_ancestry, 3719251881Speter svn_boolean_t force, 3720251881Speter svn_boolean_t dry_run, 3721251881Speter const apr_array_header_t *merge_options, 3722251881Speter svn_client_ctx_t *ctx, 3723251881Speter apr_pool_t *pool); 3724251881Speter 3725251881Speter 3726251881Speter/** 3727251881Speter * Similar to svn_client_merge2(), but with @a merge_options set to NULL. 3728251881Speter * 3729251881Speter * @deprecated Provided for backwards compatibility with the 1.3 API. 3730251881Speter */ 3731251881SpeterSVN_DEPRECATED 3732251881Spetersvn_error_t * 3733251881Spetersvn_client_merge(const char *source1, 3734251881Speter const svn_opt_revision_t *revision1, 3735251881Speter const char *source2, 3736251881Speter const svn_opt_revision_t *revision2, 3737251881Speter const char *target_wcpath, 3738251881Speter svn_boolean_t recurse, 3739251881Speter svn_boolean_t ignore_ancestry, 3740251881Speter svn_boolean_t force, 3741251881Speter svn_boolean_t dry_run, 3742251881Speter svn_client_ctx_t *ctx, 3743251881Speter apr_pool_t *pool); 3744251881Speter 3745251881Speter 3746251881Speter/** 3747251881Speter * Perform a reintegration merge of @a source_path_or_url at @a source_peg_revision 3748251881Speter * into @a target_wcpath. 3749251881Speter * @a target_wcpath must be a single-revision, #svn_depth_infinity, 3750251881Speter * pristine, unswitched working copy -- in other words, it must 3751251881Speter * reflect a single revision tree, the "target". The mergeinfo on @a 3752251881Speter * source_path_or_url must reflect that all of the target has been merged into it. 3753251881Speter * Then this behaves like a merge with svn_client_merge5() from the 3754251881Speter * target's URL to the source. 3755251881Speter * 3756251881Speter * All other options are handled identically to svn_client_merge5(). 3757251881Speter * The depth of the merge is always #svn_depth_infinity. 3758251881Speter * 3759251881Speter * @since New in 1.5. 3760251881Speter * @deprecated Provided for backwards compatibility with the 1.7 API. 3761251881Speter */ 3762251881SpeterSVN_DEPRECATED 3763251881Spetersvn_error_t * 3764251881Spetersvn_client_merge_reintegrate(const char *source_path_or_url, 3765251881Speter const svn_opt_revision_t *source_peg_revision, 3766251881Speter const char *target_wcpath, 3767251881Speter svn_boolean_t dry_run, 3768251881Speter const apr_array_header_t *merge_options, 3769251881Speter svn_client_ctx_t *ctx, 3770251881Speter apr_pool_t *pool); 3771251881Speter 3772251881Speter/** 3773251881Speter * Merge changes from the source branch identified by 3774251881Speter * @a source_path_or_url in peg revision @a source_peg_revision, 3775251881Speter * into the target branch working copy at @a target_wcpath. 3776251881Speter * 3777251881Speter * If @a ranges_to_merge is NULL then perform an automatic merge of 3778251881Speter * all the eligible changes up to @a source_peg_revision. If the merge 3779251881Speter * required is a reintegrate merge, then return an error if the WC has 3780251881Speter * mixed revisions, local modifications and/or switched subtrees; if 3781251881Speter * the merge is determined to be of the non-reintegrate kind, then 3782251881Speter * return an error if @a allow_mixed_rev is false and the WC contains 3783251881Speter * mixed revisions. 3784251881Speter * 3785251881Speter * If @a ranges_to_merge is not NULL then merge the changes specified 3786251881Speter * by the revision ranges in @a ranges_to_merge, or, when honouring 3787251881Speter * mergeinfo, only the eligible parts of those revision ranges. 3788251881Speter * @a ranges_to_merge is an array of <tt>svn_opt_revision_range_t 3789251881Speter * *</tt> ranges. These ranges may describe additive and/or 3790251881Speter * subtractive merge ranges, they may overlap fully or partially, 3791251881Speter * and/or they may partially or fully negate each other. This 3792251881Speter * rangelist is not required to be sorted. If any revision in the 3793251881Speter * list of provided ranges has an `unspecified' or unrecognized 3794251881Speter * `kind', return #SVN_ERR_CLIENT_BAD_REVISION. 3795251881Speter * 3796251881Speter * If @a ranges_to_merge is an empty array, then do nothing. 3797251881Speter * 3798251881Speter * All other options are handled identically to svn_client_merge5(). 3799251881Speter * 3800251881Speter * @since New in 1.8. 3801251881Speter */ 3802251881Spetersvn_error_t * 3803251881Spetersvn_client_merge_peg5(const char *source_path_or_url, 3804251881Speter const apr_array_header_t *ranges_to_merge, 3805251881Speter const svn_opt_revision_t *source_peg_revision, 3806251881Speter const char *target_wcpath, 3807251881Speter svn_depth_t depth, 3808251881Speter svn_boolean_t ignore_mergeinfo, 3809251881Speter svn_boolean_t diff_ignore_ancestry, 3810251881Speter svn_boolean_t force_delete, 3811251881Speter svn_boolean_t record_only, 3812251881Speter svn_boolean_t dry_run, 3813251881Speter svn_boolean_t allow_mixed_rev, 3814251881Speter const apr_array_header_t *merge_options, 3815251881Speter svn_client_ctx_t *ctx, 3816251881Speter apr_pool_t *pool); 3817251881Speter 3818251881Speter/** 3819251881Speter * Similar to svn_client_merge_peg5(), but automatic merge is not available 3820251881Speter * (@a ranges_to_merge must not be NULL), and 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_merge_peg4(const char *source_path_or_url, 3829251881Speter const apr_array_header_t *ranges_to_merge, 3830251881Speter const svn_opt_revision_t *source_peg_revision, 3831251881Speter const char *target_wcpath, 3832251881Speter svn_depth_t depth, 3833251881Speter svn_boolean_t ignore_ancestry, 3834251881Speter svn_boolean_t force_delete, 3835251881Speter svn_boolean_t record_only, 3836251881Speter svn_boolean_t dry_run, 3837251881Speter svn_boolean_t allow_mixed_rev, 3838251881Speter const apr_array_header_t *merge_options, 3839251881Speter svn_client_ctx_t *ctx, 3840251881Speter apr_pool_t *pool); 3841251881Speter 3842251881Speter/** 3843251881Speter * Similar to svn_client_merge_peg4(), but with @a allow_mixed_rev set to 3844251881Speter * @c TRUE. The @a force parameter maps to the @c force_delete parameter 3845251881Speter * of svn_client_merge_peg4(). 3846251881Speter * 3847251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 3848251881Speter * 3849251881Speter * @since New in 1.5. 3850251881Speter */ 3851251881SpeterSVN_DEPRECATED 3852251881Spetersvn_error_t * 3853251881Spetersvn_client_merge_peg3(const char *source, 3854251881Speter const apr_array_header_t *ranges_to_merge, 3855251881Speter const svn_opt_revision_t *peg_revision, 3856251881Speter const char *target_wcpath, 3857251881Speter svn_depth_t depth, 3858251881Speter svn_boolean_t ignore_ancestry, 3859251881Speter svn_boolean_t force, 3860251881Speter svn_boolean_t record_only, 3861251881Speter svn_boolean_t dry_run, 3862251881Speter const apr_array_header_t *merge_options, 3863251881Speter svn_client_ctx_t *ctx, 3864251881Speter apr_pool_t *pool); 3865251881Speter 3866251881Speter/** 3867251881Speter * Similar to svn_client_merge_peg3(), but with @a record_only set to 3868251881Speter * @c FALSE, and @a depth set according to @a recurse: if @a recurse 3869251881Speter * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is 3870251881Speter * FALSE, set @a depth to #svn_depth_files. 3871251881Speter * 3872251881Speter * @deprecated Provided for backwards compatibility with the 1.4 API. 3873251881Speter * 3874251881Speter * @since New in 1.4. 3875251881Speter */ 3876251881SpeterSVN_DEPRECATED 3877251881Spetersvn_error_t * 3878251881Spetersvn_client_merge_peg2(const char *source, 3879251881Speter const svn_opt_revision_t *revision1, 3880251881Speter const svn_opt_revision_t *revision2, 3881251881Speter const svn_opt_revision_t *peg_revision, 3882251881Speter const char *target_wcpath, 3883251881Speter svn_boolean_t recurse, 3884251881Speter svn_boolean_t ignore_ancestry, 3885251881Speter svn_boolean_t force, 3886251881Speter svn_boolean_t dry_run, 3887251881Speter const apr_array_header_t *merge_options, 3888251881Speter svn_client_ctx_t *ctx, 3889251881Speter apr_pool_t *pool); 3890251881Speter 3891251881Speter/** 3892251881Speter * Similar to svn_client_merge_peg2(), but with @a merge_options set to 3893251881Speter * NULL. 3894251881Speter * 3895251881Speter * @deprecated Provided for backwards compatibility with the 1.3 API. 3896251881Speter * 3897251881Speter * @since New in 1.1. 3898251881Speter */ 3899251881SpeterSVN_DEPRECATED 3900251881Spetersvn_error_t * 3901251881Spetersvn_client_merge_peg(const char *source, 3902251881Speter const svn_opt_revision_t *revision1, 3903251881Speter const svn_opt_revision_t *revision2, 3904251881Speter const svn_opt_revision_t *peg_revision, 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/** Set @a suggestions to an ordered array of @c const char * 3915251881Speter * potential merge sources (expressed as full repository URLs) for @a 3916251881Speter * path_or_url at @a peg_revision. @a path_or_url is a working copy 3917251881Speter * path or repository URL. @a ctx is a context used for 3918251881Speter * authentication in the repository case. Use @a pool for all 3919251881Speter * allocations. 3920251881Speter * 3921251881Speter * @since New in 1.5. 3922251881Speter */ 3923251881Spetersvn_error_t * 3924251881Spetersvn_client_suggest_merge_sources(apr_array_header_t **suggestions, 3925251881Speter const char *path_or_url, 3926251881Speter const svn_opt_revision_t *peg_revision, 3927251881Speter svn_client_ctx_t *ctx, 3928251881Speter apr_pool_t *pool); 3929251881Speter 3930251881Speter 3931251881Speter/** 3932251881Speter * Get the mergeinfo for a single target node (ignoring any subtrees). 3933251881Speter * 3934251881Speter * Set @a *mergeinfo to a hash mapping <tt>const char *</tt> merge source 3935251881Speter * URLs to <tt>svn_rangelist_t *</tt> rangelists describing the ranges which 3936251881Speter * have been merged into @a path_or_url as of @a peg_revision, per 3937251881Speter * @a path_or_url's explicit mergeinfo or inherited mergeinfo if no 3938251881Speter * explicit mergeinfo if found. If no explicit or inherited mergeinfo 3939251881Speter * is found, then set @a *mergeinfo to NULL. 3940251881Speter * 3941251881Speter * Use @a pool for all necessary allocations. 3942251881Speter * 3943251881Speter * If the server doesn't support retrieval of mergeinfo (which will 3944251881Speter * never happen for file:// URLs), return an 3945251881Speter * #SVN_ERR_UNSUPPORTED_FEATURE error. 3946251881Speter * 3947251881Speter * @note Unlike most APIs which deal with mergeinfo, this one returns 3948251881Speter * data where the keys of the hash are absolute repository URLs rather 3949251881Speter * than repository filesystem paths. 3950251881Speter * 3951251881Speter * @since New in 1.5. 3952251881Speter */ 3953251881Spetersvn_error_t * 3954251881Spetersvn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo, 3955251881Speter const char *path_or_url, 3956251881Speter const svn_opt_revision_t *peg_revision, 3957251881Speter svn_client_ctx_t *ctx, 3958251881Speter apr_pool_t *pool); 3959251881Speter 3960251881Speter 3961251881Speter/** 3962251881Speter * Describe the revisions that either have or have not been merged from 3963251881Speter * one source branch (or subtree) into another. 3964251881Speter * 3965251881Speter * If @a finding_merged is TRUE, then drive log entry callbacks 3966251881Speter * @a receiver / @a receiver_baton with the revisions merged from 3967251881Speter * @a source_path_or_url (as of @a source_peg_revision) into 3968251881Speter * @a target_path_or_url (as of @a target_peg_revision). If @a 3969251881Speter * finding_merged is FALSE then find the revisions eligible for merging. 3970251881Speter * 3971251881Speter * If both @a source_start_revision and @a source_end_revision are 3972251881Speter * unspecified (that is, of kind @c svn_opt_revision_unspecified), 3973251881Speter * @a receiver will be called the requested revisions from 0 to 3974251881Speter * @a source_peg_revision and in that order (that is, oldest to 3975251881Speter * youngest). Otherwise, both @a source_start_revision and 3976251881Speter * @a source_end_revision must be specified, which has two effects: 3977251881Speter * 3978251881Speter * - @a receiver will be called only with revisions which fall 3979251881Speter * within range of @a source_start_revision to 3980251881Speter * @a source_end_revision, inclusive, and 3981251881Speter * 3982251881Speter * - those revisions will be ordered in the same "direction" as the 3983251881Speter * walk from @a source_start_revision to @a source_end_revision. 3984251881Speter * (If @a source_start_revision is the younger of the two, @a 3985251881Speter * receiver will be called with revisions in youngest-to-oldest 3986251881Speter * order; otherwise, the reverse occurs.) 3987251881Speter * 3988251881Speter * If @a depth is #svn_depth_empty consider only the explicit or 3989251881Speter * inherited mergeinfo on @a target_path_or_url when calculating merged 3990251881Speter * revisions from @a source_path_or_url. If @a depth is #svn_depth_infinity 3991251881Speter * then also consider the explicit subtree mergeinfo under @a 3992251881Speter * target_path_or_url. 3993251881Speter * If a depth other than #svn_depth_empty or #svn_depth_infinity is 3994251881Speter * requested then return a #SVN_ERR_UNSUPPORTED_FEATURE error. 3995251881Speter * 3996289180Speter * In addition to the behavior of @a discover_changed_paths described in 3997289180Speter * svn_client_log5(), if set to TRUE it enables detection of sub-tree 3998289180Speter * merges that are complete but can't be detected as complete without 3999289180Speter * access to the changed paths. Sub-tree merges detected as complete will 4000289180Speter * be included if @a finding_merged is TRUE or filtered if @a finding_merged 4001289180Speter * is FALSE. 4002251881Speter * 4003289180Speter * @a revprops is the same as for svn_client_log5(). Use @a scratch_pool for 4004289180Speter * all temporary allocations. 4005289180Speter * 4006251881Speter * @a ctx is a context used for authentication. 4007251881Speter * 4008251881Speter * If the server doesn't support retrieval of mergeinfo, return an 4009251881Speter * #SVN_ERR_UNSUPPORTED_FEATURE error. 4010251881Speter * 4011251881Speter * @since New in 1.8. 4012251881Speter */ 4013251881Spetersvn_error_t * 4014251881Spetersvn_client_mergeinfo_log2(svn_boolean_t finding_merged, 4015251881Speter const char *target_path_or_url, 4016251881Speter const svn_opt_revision_t *target_peg_revision, 4017251881Speter const char *source_path_or_url, 4018251881Speter const svn_opt_revision_t *source_peg_revision, 4019251881Speter const svn_opt_revision_t *source_start_revision, 4020251881Speter const svn_opt_revision_t *source_end_revision, 4021251881Speter svn_log_entry_receiver_t receiver, 4022251881Speter void *receiver_baton, 4023251881Speter svn_boolean_t discover_changed_paths, 4024251881Speter svn_depth_t depth, 4025251881Speter const apr_array_header_t *revprops, 4026251881Speter svn_client_ctx_t *ctx, 4027251881Speter apr_pool_t *scratch_pool); 4028251881Speter 4029251881Speter/** 4030251881Speter * Similar to svn_client_mergeinfo_log2(), but with @a source_start_revision 4031251881Speter * and @a source_end_revision always of kind @c svn_opt_revision_unspecified; 4032251881Speter * 4033251881Speter * @deprecated Provided for backwards compatibility with the 1.7 API. 4034251881Speter * @since New in 1.7. 4035251881Speter */ 4036251881SpeterSVN_DEPRECATED 4037251881Spetersvn_error_t * 4038251881Spetersvn_client_mergeinfo_log(svn_boolean_t finding_merged, 4039251881Speter const char *target_path_or_url, 4040251881Speter const svn_opt_revision_t *target_peg_revision, 4041251881Speter const char *source_path_or_url, 4042251881Speter const svn_opt_revision_t *source_peg_revision, 4043251881Speter svn_log_entry_receiver_t receiver, 4044251881Speter void *receiver_baton, 4045251881Speter svn_boolean_t discover_changed_paths, 4046251881Speter svn_depth_t depth, 4047251881Speter const apr_array_header_t *revprops, 4048251881Speter svn_client_ctx_t *ctx, 4049251881Speter apr_pool_t *scratch_pool); 4050251881Speter 4051251881Speter/** 4052251881Speter * Similar to svn_client_mergeinfo_log(), but finds only merged revisions 4053251881Speter * and always operates at @a depth #svn_depth_empty. 4054251881Speter * 4055251881Speter * @deprecated Provided for backwards compatibility with the 1.6 API. Use 4056251881Speter * svn_client_mergeinfo_log() instead. 4057251881Speter * @since New in 1.5. 4058251881Speter */ 4059251881SpeterSVN_DEPRECATED 4060251881Spetersvn_error_t * 4061251881Spetersvn_client_mergeinfo_log_merged(const char *path_or_url, 4062251881Speter const svn_opt_revision_t *peg_revision, 4063251881Speter const char *merge_source_path_or_url, 4064251881Speter const svn_opt_revision_t *src_peg_revision, 4065251881Speter svn_log_entry_receiver_t receiver, 4066251881Speter void *receiver_baton, 4067251881Speter svn_boolean_t discover_changed_paths, 4068251881Speter const apr_array_header_t *revprops, 4069251881Speter svn_client_ctx_t *ctx, 4070251881Speter apr_pool_t *pool); 4071251881Speter 4072251881Speter/** 4073251881Speter * Similar to svn_client_mergeinfo_log(), but finds only eligible revisions 4074251881Speter * and always operates at @a depth #svn_depth_empty. 4075251881Speter * 4076251881Speter * @deprecated Provided for backwards compatibility with the 1.6 API. Use 4077251881Speter * svn_client_mergeinfo_log() instead. 4078251881Speter * @since New in 1.5. 4079251881Speter */ 4080251881SpeterSVN_DEPRECATED 4081251881Spetersvn_error_t * 4082251881Spetersvn_client_mergeinfo_log_eligible(const char *path_or_url, 4083251881Speter const svn_opt_revision_t *peg_revision, 4084251881Speter const char *merge_source_path_or_url, 4085251881Speter const svn_opt_revision_t *src_peg_revision, 4086251881Speter svn_log_entry_receiver_t receiver, 4087251881Speter void *receiver_baton, 4088251881Speter svn_boolean_t discover_changed_paths, 4089251881Speter const apr_array_header_t *revprops, 4090251881Speter svn_client_ctx_t *ctx, 4091251881Speter apr_pool_t *pool); 4092251881Speter 4093251881Speter/** @} */ 4094251881Speter 4095251881Speter/** 4096251881Speter * @defgroup Cleanup Cleanup an abnormally terminated working copy. 4097251881Speter * 4098251881Speter * @{ 4099251881Speter */ 4100251881Speter 4101298845Sdim/** Recursively vacuum a working copy directory @a dir_abspath, 4102298845Sdim * removing unnecessary data. 4103289180Speter * 4104289180Speter * If @a include_externals is @c TRUE, recurse into externals and vacuum them 4105289180Speter * as well. 4106289180Speter * 4107289180Speter * If @a remove_unversioned_items is @c TRUE, remove unversioned items 4108298845Sdim * in @a dir_abspath after successful working copy cleanup. 4109289180Speter * If @a remove_ignored_items is @c TRUE, remove ignored unversioned items 4110298845Sdim * in @a dir_abspath after successful working copy cleanup. 4111289180Speter * 4112289180Speter * If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded 4113289180Speter * timestamps for unmodified files in the working copy, reducing comparision 4114289180Speter * time on future checks. 4115289180Speter * 4116289180Speter * If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working 4117289180Speter * copy root unreferenced files in the pristine store are removed. 4118289180Speter * 4119289180Speter * When asked to remove unversioned or ignored items, and the working copy 4120289180Speter * is already locked, return #SVN_ERR_WC_LOCKED. This prevents accidental 4121289180Speter * working copy corruption in case users run the cleanup operation to 4122289180Speter * remove unversioned items while another client is performing some other 4123289180Speter * operation on the working copy. 4124289180Speter * 4125289180Speter * If @a ctx->cancel_func is non-NULL, invoke it with @a 4126289180Speter * ctx->cancel_baton at various points during the operation. If it 4127289180Speter * returns an error (typically #SVN_ERR_CANCELLED), return that error 4128289180Speter * immediately. 4129289180Speter * 4130289180Speter * Use @a scratch_pool for any temporary allocations. 4131289180Speter * 4132289180Speter * @since New in 1.9. 4133289180Speter */ 4134289180Spetersvn_error_t * 4135289180Spetersvn_client_vacuum(const char *dir_abspath, 4136289180Speter svn_boolean_t remove_unversioned_items, 4137289180Speter svn_boolean_t remove_ignored_items, 4138289180Speter svn_boolean_t fix_recorded_timestamps, 4139289180Speter svn_boolean_t vacuum_pristines, 4140289180Speter svn_boolean_t include_externals, 4141289180Speter svn_client_ctx_t *ctx, 4142289180Speter apr_pool_t *scratch_pool); 4143289180Speter 4144289180Speter 4145289180Speter/** Recursively cleanup a working copy directory @a dir_abspath, finishing any 4146251881Speter * incomplete operations, removing lockfiles, etc. 4147251881Speter * 4148289180Speter * If @a break_locks is @c TRUE, existing working copy locks at or below @a 4149289180Speter * dir_abspath are broken, otherwise a normal write lock is obtained. 4150289180Speter * 4151289180Speter * If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded 4152289180Speter * timestamps for unmodified files in the working copy, reducing comparision 4153289180Speter * time on future checks. 4154289180Speter * 4155289180Speter * If @a clear_dav_cache is @c TRUE, the caching of DAV information for older 4156289180Speter * mod_dav served repositories is cleared. This clearing invalidates some 4157289180Speter * cached information used for pre-HTTPv2 repositories. 4158289180Speter * 4159289180Speter * If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working 4160289180Speter * copy root unreferenced files in the pristine store are removed. 4161289180Speter * 4162289180Speter * If @a include_externals is @c TRUE, recurse into externals and clean 4163289180Speter * them up as well. 4164289180Speter * 4165251881Speter * If @a ctx->cancel_func is non-NULL, invoke it with @a 4166251881Speter * ctx->cancel_baton at various points during the operation. If it 4167251881Speter * returns an error (typically #SVN_ERR_CANCELLED), return that error 4168251881Speter * immediately. 4169251881Speter * 4170251881Speter * Use @a scratch_pool for any temporary allocations. 4171289180Speter * 4172289180Speter * @since New in 1.9. 4173251881Speter */ 4174251881Spetersvn_error_t * 4175289180Spetersvn_client_cleanup2(const char *dir_abspath, 4176289180Speter svn_boolean_t break_locks, 4177289180Speter svn_boolean_t fix_recorded_timestamps, 4178289180Speter svn_boolean_t clear_dav_cache, 4179289180Speter svn_boolean_t vacuum_pristines, 4180289180Speter svn_boolean_t include_externals, 4181289180Speter svn_client_ctx_t *ctx, 4182289180Speter apr_pool_t *scratch_pool); 4183289180Speter 4184289180Speter/** Like svn_client_cleanup2(), but no support for not breaking locks and 4185289180Speter * cleaning up externals and using a potentially non absolute path. 4186289180Speter * 4187289180Speter * @deprecated Provided for limited backwards compatibility with the 1.8 API. 4188289180Speter */ 4189289180SpeterSVN_DEPRECATED 4190289180Spetersvn_error_t * 4191251881Spetersvn_client_cleanup(const char *dir, 4192251881Speter svn_client_ctx_t *ctx, 4193251881Speter apr_pool_t *scratch_pool); 4194251881Speter 4195251881Speter 4196251881Speter/** @} */ 4197251881Speter 4198251881Speter/** 4199251881Speter * @defgroup Upgrade Upgrade a working copy. 4200251881Speter * 4201251881Speter * @{ 4202251881Speter */ 4203251881Speter 4204251881Speter/** Recursively upgrade a working copy from any older format to the current 4205251881Speter * WC metadata storage format. @a wcroot_dir is the path to the WC root. 4206251881Speter * 4207251881Speter * Use @a scratch_pool for any temporary allocations. 4208251881Speter * 4209251881Speter * @since New in 1.7. 4210251881Speter */ 4211251881Spetersvn_error_t * 4212251881Spetersvn_client_upgrade(const char *wcroot_dir, 4213251881Speter svn_client_ctx_t *ctx, 4214251881Speter apr_pool_t *scratch_pool); 4215251881Speter 4216251881Speter 4217251881Speter/** @} */ 4218251881Speter 4219251881Speter/** 4220251881Speter * @defgroup Relocate Switch a working copy to a different repository. 4221251881Speter * 4222251881Speter * @{ 4223251881Speter */ 4224251881Speter 4225251881Speter/** 4226251881Speter * Recursively modify a working copy rooted at @a wcroot_dir, changing 4227251881Speter * any repository URLs that begin with @a from_prefix to begin with @a 4228251881Speter * to_prefix instead. 4229251881Speter * 4230251881Speter * @param wcroot_dir Working copy root directory 4231251881Speter * @param from_prefix Original URL 4232251881Speter * @param to_prefix New URL 4233251881Speter * @param ignore_externals If not set, recurse into external working 4234251881Speter * copies after relocating the primary working copy 4235251881Speter * @param ctx svn_client_ctx_t 4236251881Speter * @param pool The pool from which to perform memory allocations 4237251881Speter * 4238251881Speter * @since New in 1.7 4239251881Speter */ 4240251881Spetersvn_error_t * 4241251881Spetersvn_client_relocate2(const char *wcroot_dir, 4242251881Speter const char *from_prefix, 4243251881Speter const char *to_prefix, 4244251881Speter svn_boolean_t ignore_externals, 4245251881Speter svn_client_ctx_t *ctx, 4246251881Speter apr_pool_t *pool); 4247251881Speter 4248251881Speter/** 4249251881Speter * Similar to svn_client_relocate2(), but with @a ignore_externals 4250251881Speter * always TRUE. 4251251881Speter * 4252251881Speter * @note As of the 1.7 API, @a dir is required to be a working copy 4253251881Speter * root directory, and @a recurse is required to be TRUE. 4254251881Speter * 4255251881Speter * @deprecated Provided for limited backwards compatibility with the 4256251881Speter * 1.6 API. 4257251881Speter */ 4258251881SpeterSVN_DEPRECATED 4259251881Spetersvn_error_t * 4260251881Spetersvn_client_relocate(const char *dir, 4261251881Speter const char *from_prefix, 4262251881Speter const char *to_prefix, 4263251881Speter svn_boolean_t recurse, 4264251881Speter svn_client_ctx_t *ctx, 4265251881Speter apr_pool_t *pool); 4266251881Speter 4267251881Speter/** @} */ 4268251881Speter 4269251881Speter/** 4270251881Speter * @defgroup Revert Remove local changes in a repository. 4271251881Speter * 4272251881Speter * @{ 4273251881Speter */ 4274251881Speter 4275251881Speter/** 4276251881Speter * Restore the pristine version of working copy @a paths, 4277251881Speter * effectively undoing any local mods. For each path in @a paths, 4278251881Speter * revert it if it is a file. Else if it is a directory, revert 4279251881Speter * according to @a depth: 4280251881Speter * 4281251881Speter * @a paths is an array of (const char *) local WC paths. 4282251881Speter * 4283251881Speter * If @a depth is #svn_depth_empty, revert just the properties on 4284251881Speter * the directory; else if #svn_depth_files, revert the properties 4285251881Speter * and any files immediately under the directory; else if 4286251881Speter * #svn_depth_immediates, revert all of the preceding plus 4287251881Speter * properties on immediate subdirectories; else if #svn_depth_infinity, 4288251881Speter * revert path and everything under it fully recursively. 4289251881Speter * 4290251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 4291251881Speter * names, used as a restrictive filter on items reverted; that is, 4292251881Speter * don't revert any item unless it's a member of one of those 4293251881Speter * changelists. If @a changelists is empty (or altogether @c NULL), 4294251881Speter * no changelist filtering occurs. 4295251881Speter * 4296289180Speter * If @a clear_changelists is TRUE, then changelist information for the 4297289180Speter * paths is cleared while reverting. 4298289180Speter * 4299289180Speter * If @a metadata_only is TRUE, the files and directories aren't changed 4300289180Speter * by the operation. If there are conflict marker files attached to the 4301289180Speter * targets these are removed. 4302289180Speter * 4303251881Speter * If @a ctx->notify_func2 is non-NULL, then for each item reverted, 4304251881Speter * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of 4305251881Speter * the reverted item. 4306251881Speter * 4307251881Speter * If an item specified for reversion is not under version control, 4308251881Speter * then do not error, just invoke @a ctx->notify_func2 with @a 4309251881Speter * ctx->notify_baton2, using notification code #svn_wc_notify_skip. 4310251881Speter * 4311289180Speter * @since New in 1.9. 4312289180Speter */ 4313289180Spetersvn_error_t * 4314289180Spetersvn_client_revert3(const apr_array_header_t *paths, 4315289180Speter svn_depth_t depth, 4316289180Speter const apr_array_header_t *changelists, 4317289180Speter svn_boolean_t clear_changelists, 4318289180Speter svn_boolean_t metadata_only, 4319289180Speter svn_client_ctx_t *ctx, 4320289180Speter apr_pool_t *pool); 4321289180Speter 4322289180Speter/** Similar to svn_client_revert2, but with @a clear_changelists set to 4323289180Speter * FALSE and @a metadata_only set to FALSE. 4324289180Speter * 4325251881Speter * @since New in 1.5. 4326289180Speter * @deprecated Provided for backwards compatibility with the 1.8 API. 4327251881Speter */ 4328289180SpeterSVN_DEPRECATED 4329251881Spetersvn_error_t * 4330251881Spetersvn_client_revert2(const apr_array_header_t *paths, 4331251881Speter svn_depth_t depth, 4332251881Speter const apr_array_header_t *changelists, 4333251881Speter svn_client_ctx_t *ctx, 4334251881Speter apr_pool_t *pool); 4335251881Speter 4336251881Speter 4337251881Speter/** 4338251881Speter * Similar to svn_client_revert2(), but with @a changelists passed as 4339251881Speter * @c NULL, and @a depth set according to @a recurse: if @a recurse is 4340251881Speter * TRUE, @a depth is #svn_depth_infinity, else if @a recurse is 4341251881Speter * FALSE, @a depth is #svn_depth_empty. 4342251881Speter * 4343251881Speter * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files; 4344251881Speter * revert is deliberately different. 4345251881Speter * 4346289180Speter * @deprecated Provided for backwards compatibility with the 1.4 API. 4347251881Speter */ 4348251881SpeterSVN_DEPRECATED 4349251881Spetersvn_error_t * 4350251881Spetersvn_client_revert(const apr_array_header_t *paths, 4351251881Speter svn_boolean_t recursive, 4352251881Speter svn_client_ctx_t *ctx, 4353251881Speter apr_pool_t *pool); 4354251881Speter 4355251881Speter 4356251881Speter/** @} */ 4357251881Speter 4358251881Speter/** 4359251881Speter * @defgroup Resolved Mark conflicted paths as resolved. 4360251881Speter * 4361251881Speter * @{ 4362251881Speter */ 4363251881Speter 4364251881Speter/** 4365251881Speter * Similar to svn_client_resolve(), but without automatic conflict 4366251881Speter * resolution support. 4367251881Speter * 4368251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 4369251881Speter * Use svn_client_resolve() with @a conflict_choice == @c 4370251881Speter * svn_wc_conflict_choose_merged instead. 4371251881Speter */ 4372251881SpeterSVN_DEPRECATED 4373251881Spetersvn_error_t * 4374251881Spetersvn_client_resolved(const char *path, 4375251881Speter svn_boolean_t recursive, 4376251881Speter svn_client_ctx_t *ctx, 4377251881Speter apr_pool_t *pool); 4378251881Speter 4379251881Speter/** Perform automatic conflict resolution on a working copy @a path. 4380251881Speter * 4381251881Speter * If @a conflict_choice is 4382251881Speter * 4383251881Speter * - #svn_wc_conflict_choose_base: 4384251881Speter * resolve the conflict with the old file contents 4385251881Speter * 4386251881Speter * - #svn_wc_conflict_choose_mine_full: 4387251881Speter * use the original working contents 4388251881Speter * 4389251881Speter * - #svn_wc_conflict_choose_theirs_full: 4390251881Speter * use the new contents 4391251881Speter * 4392251881Speter * - #svn_wc_conflict_choose_merged: 4393251881Speter * don't change the contents at all, just remove the conflict 4394251881Speter * status, which is the pre-1.5 behavior. 4395251881Speter * 4396251881Speter * - #svn_wc_conflict_choose_theirs_conflict 4397251881Speter * ###... 4398251881Speter * 4399251881Speter * - #svn_wc_conflict_choose_mine_conflict 4400251881Speter * ###... 4401251881Speter * 4402251881Speter * - svn_wc_conflict_choose_unspecified 4403251881Speter * invoke @a ctx->conflict_func2 with @a ctx->conflict_baton2 to obtain 4404251881Speter * a resolution decision for each conflict. This can be used to 4405251881Speter * implement interactive conflict resolution. 4406251881Speter * 4407251881Speter * #svn_wc_conflict_choose_theirs_conflict and 4408251881Speter * #svn_wc_conflict_choose_mine_conflict are not legal for binary 4409251881Speter * files or properties. 4410251881Speter * 4411251881Speter * If @a path is not in a state of conflict to begin with, do nothing. 4412251881Speter * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL, 4413251881Speter * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path. 4414251881Speter * ### with what notification parameters? 4415251881Speter * 4416251881Speter * If @a depth is #svn_depth_empty, act only on @a path; if 4417251881Speter * #svn_depth_files, resolve @a path and its conflicted file 4418251881Speter * children (if any); if #svn_depth_immediates, resolve @a path and 4419251881Speter * all its immediate conflicted children (both files and directories, 4420251881Speter * if any); if #svn_depth_infinity, resolve @a path and every 4421251881Speter * conflicted file or directory anywhere beneath it. 4422251881Speter * 4423251881Speter * Note that this operation will try to lock the parent directory of 4424251881Speter * @a path in order to be able to resolve tree-conflicts on @a path. 4425251881Speter * 4426251881Speter * @since New in 1.5. 4427251881Speter */ 4428251881Spetersvn_error_t * 4429251881Spetersvn_client_resolve(const char *path, 4430251881Speter svn_depth_t depth, 4431251881Speter svn_wc_conflict_choice_t conflict_choice, 4432251881Speter svn_client_ctx_t *ctx, 4433251881Speter apr_pool_t *pool); 4434251881Speter 4435251881Speter 4436251881Speter/** @} */ 4437251881Speter 4438251881Speter/** 4439251881Speter * @defgroup Copy Copy paths in the working copy and repository. 4440251881Speter * 4441251881Speter * @{ 4442251881Speter */ 4443251881Speter 4444251881Speter/** 4445251881Speter * A structure which describes the source of a copy operation--its path, 4446251881Speter * revision, and peg revision. 4447251881Speter * 4448251881Speter * @since New in 1.5. 4449251881Speter */ 4450251881Spetertypedef struct svn_client_copy_source_t 4451251881Speter{ 4452251881Speter /** The source path or URL. */ 4453251881Speter const char *path; 4454251881Speter 4455251881Speter /** The source operational revision. */ 4456251881Speter const svn_opt_revision_t *revision; 4457251881Speter 4458251881Speter /** The source peg revision. */ 4459251881Speter const svn_opt_revision_t *peg_revision; 4460251881Speter} svn_client_copy_source_t; 4461251881Speter 4462251881Speter/** Copy each source in @a sources to @a dst_path. 4463251881Speter * 4464251881Speter * If multiple @a sources are given, @a dst_path must be a directory, 4465251881Speter * and @a sources will be copied as children of @a dst_path. 4466251881Speter * 4467251881Speter * @a sources is an array of <tt>svn_client_copy_source_t *</tt> elements, 4468251881Speter * either all referring to local WC items or all referring to versioned 4469251881Speter * items in the repository. 4470251881Speter * 4471251881Speter * If @a sources has only one item, attempt to copy it to @a dst_path. If 4472251881Speter * @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the 4473251881Speter * item as a child of @a dst_path. If @a copy_as_child is FALSE and 4474251881Speter * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path 4475251881Speter * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a 4476251881Speter * URL. 4477251881Speter * 4478251881Speter * If @a sources has multiple items, and @a copy_as_child is TRUE, all 4479251881Speter * @a sources are copied as children of @a dst_path. If any child of 4480251881Speter * @a dst_path already exists with the same name any item in @a sources, 4481251881Speter * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and 4482251881Speter * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL. 4483251881Speter * 4484251881Speter * If @a sources has multiple items, and @a copy_as_child is FALSE, fail 4485251881Speter * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED. 4486251881Speter * 4487251881Speter * If @a dst_path is a URL, use the authentication baton 4488251881Speter * in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately 4489251881Speter * attempt to commit the copy action in the repository. 4490251881Speter * 4491251881Speter * If @a dst_path is not a URL, then this is just a variant of 4492251881Speter * svn_client_add(), where the @a sources are scheduled for addition 4493251881Speter * as copies. No changes will happen to the repository until a commit occurs. 4494251881Speter * This scheduling can be removed with svn_client_revert2(). 4495251881Speter * 4496251881Speter * If @a make_parents is TRUE, create any non-existent parent directories 4497251881Speter * also. Otherwise the parent of @a dst_path must already exist. 4498251881Speter * 4499251881Speter * If @a ignore_externals is set, don't process externals definitions 4500251881Speter * as part of this operation. 4501251881Speter * 4502289180Speter * If @a metadata_only is @c TRUE and copying a file in a working copy, 4503289180Speter * everything in the metadata is updated as if the node is moved, but the 4504289180Speter * actual disk copy operation is not performed. This feature is useful for 4505289180Speter * clients that want to keep the working copy in sync while the actual working 4506289180Speter * copy is updated by some other task. 4507289180Speter * 4508289180Speter * If @a pin_externals is set, pin URLs in copied externals definitions 4509289180Speter * to their current revision unless they were already pinned to a 4510289180Speter * particular revision. A pinned external uses a URL which points at a 4511289180Speter * fixed revision, rather than the HEAD revision. Externals in the copy 4512289180Speter * destination are pinned to either a working copy base revision or the 4513289180Speter * HEAD revision of a repository (as of the time the copy operation is 4514289180Speter * performed), depending on the type of the copy source: 4515289180Speter <pre> 4516289180Speter copy source: working copy (WC) REPOS 4517289180Speter ------------+------------------------+---------------------------+ 4518289180Speter copy WC | external's WC BASE rev | external's repos HEAD rev | 4519289180Speter dest: |------------------------+---------------------------+ 4520289180Speter REPOS | external's WC BASE rev | external's repos HEAD rev | 4521289180Speter ------------+------------------------+---------------------------+ 4522289180Speter </pre> 4523289180Speter * If the copy source is a working copy, then all externals must be checked 4524289180Speter * out, be at a single-revision, contain no local modifications, and contain 4525289180Speter * no switched subtrees. Else, #SVN_ERR_WC_PATH_UNEXPECTED_STATUS is returned. 4526289180Speter * 4527289180Speter * If non-NULL, @a externals_to_pin restricts pinning to a subset of externals. 4528289180Speter * It is a hash table keyed by either a local absolute path or a URL at which 4529289180Speter * an svn:externals property is set. The hash table contains apr_array_header_t* 4530289180Speter * elements as returned by svn_wc_parse_externals_description3(). These arrays 4531289180Speter * contain elements of type svn_wc_external_item2_t*, each of which corresponds 4532289180Speter * to a single line of an svn:externals definition. Externals corresponding to 4533289180Speter * these items will be pinned, other externals will not be pinned. 4534289180Speter * If @a externals_to_pin is @c NULL then all externals are pinned. 4535289180Speter * If @a pin_externals is @c FALSE then @a externals_to_pin is ignored. 4536289180Speter * 4537251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 4538251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 4539251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision in 4540251881Speter * the event that this is a committing operation. This table cannot 4541251881Speter * contain any standard Subversion properties. 4542251881Speter * 4543251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo 4544251881Speter * that this function can use to query for a commit log message when one is 4545251881Speter * needed. 4546251881Speter * 4547251881Speter * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2 4548251881Speter * for each item added at the new location, passing the new, relative path of 4549251881Speter * the added item. 4550251881Speter * 4551251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 4552251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 4553251881Speter * the commit. 4554251881Speter * 4555289180Speter * @since New in 1.9. 4556289180Speter */ 4557289180Spetersvn_error_t * 4558289180Spetersvn_client_copy7(const apr_array_header_t *sources, 4559289180Speter const char *dst_path, 4560289180Speter svn_boolean_t copy_as_child, 4561289180Speter svn_boolean_t make_parents, 4562289180Speter svn_boolean_t ignore_externals, 4563289180Speter svn_boolean_t metadata_only, 4564289180Speter svn_boolean_t pin_externals, 4565289180Speter const apr_hash_t *externals_to_pin, 4566289180Speter const apr_hash_t *revprop_table, 4567289180Speter svn_commit_callback2_t commit_callback, 4568289180Speter void *commit_baton, 4569289180Speter svn_client_ctx_t *ctx, 4570289180Speter apr_pool_t *pool); 4571289180Speter 4572289180Speter/** 4573289180Speter * Similar to svn_client_copy7(), but doesn't support meta_data_only 4574289180Speter * and cannot pin externals. 4575289180Speter * 4576289180Speter * 4577251881Speter * @since New in 1.7. 4578289180Speter * @deprecated Provided for backward compatibility with the 1.8 API. 4579251881Speter */ 4580289180SpeterSVN_DEPRECATED 4581251881Spetersvn_error_t * 4582251881Spetersvn_client_copy6(const apr_array_header_t *sources, 4583251881Speter const char *dst_path, 4584251881Speter svn_boolean_t copy_as_child, 4585251881Speter svn_boolean_t make_parents, 4586251881Speter svn_boolean_t ignore_externals, 4587251881Speter const apr_hash_t *revprop_table, 4588251881Speter svn_commit_callback2_t commit_callback, 4589251881Speter void *commit_baton, 4590251881Speter svn_client_ctx_t *ctx, 4591251881Speter apr_pool_t *pool); 4592251881Speter 4593251881Speter/** 4594251881Speter * Similar to svn_client_copy6(), but returns the commit info in 4595251881Speter * @a *commit_info_p rather than through a callback function. 4596251881Speter * 4597251881Speter * @since New in 1.6. 4598251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 4599251881Speter */ 4600251881SpeterSVN_DEPRECATED 4601251881Spetersvn_error_t * 4602251881Spetersvn_client_copy5(svn_commit_info_t **commit_info_p, 4603251881Speter const apr_array_header_t *sources, 4604251881Speter const char *dst_path, 4605251881Speter svn_boolean_t copy_as_child, 4606251881Speter svn_boolean_t make_parents, 4607251881Speter svn_boolean_t ignore_externals, 4608251881Speter const apr_hash_t *revprop_table, 4609251881Speter svn_client_ctx_t *ctx, 4610251881Speter apr_pool_t *pool); 4611251881Speter 4612251881Speter/** 4613251881Speter * Similar to svn_client_copy5(), with @a ignore_externals set to @c FALSE. 4614251881Speter * 4615251881Speter * @since New in 1.5. 4616251881Speter * 4617251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 4618251881Speter */ 4619251881SpeterSVN_DEPRECATED 4620251881Spetersvn_error_t * 4621251881Spetersvn_client_copy4(svn_commit_info_t **commit_info_p, 4622251881Speter const apr_array_header_t *sources, 4623251881Speter const char *dst_path, 4624251881Speter svn_boolean_t copy_as_child, 4625251881Speter svn_boolean_t make_parents, 4626251881Speter const apr_hash_t *revprop_table, 4627251881Speter svn_client_ctx_t *ctx, 4628251881Speter apr_pool_t *pool); 4629251881Speter 4630251881Speter/** 4631251881Speter * Similar to svn_client_copy4(), with only one @a src_path, @a 4632251881Speter * copy_as_child set to @c FALSE, @a revprop_table passed as NULL, and 4633251881Speter * @a make_parents set to @c FALSE. Also, use @a src_revision as both 4634251881Speter * the operational and peg revision. 4635251881Speter * 4636251881Speter * @since New in 1.4. 4637251881Speter * 4638251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 4639251881Speter */ 4640251881SpeterSVN_DEPRECATED 4641251881Spetersvn_error_t * 4642251881Spetersvn_client_copy3(svn_commit_info_t **commit_info_p, 4643251881Speter const char *src_path, 4644251881Speter const svn_opt_revision_t *src_revision, 4645251881Speter const char *dst_path, 4646251881Speter svn_client_ctx_t *ctx, 4647251881Speter apr_pool_t *pool); 4648251881Speter 4649251881Speter 4650251881Speter/** 4651251881Speter * Similar to svn_client_copy3(), with the difference that if @a dst_path 4652251881Speter * already exists and is a directory, copy the item into that directory, 4653251881Speter * keeping its name (the last component of @a src_path). 4654251881Speter * 4655251881Speter * @since New in 1.3. 4656251881Speter * 4657251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 4658251881Speter */ 4659251881SpeterSVN_DEPRECATED 4660251881Spetersvn_error_t * 4661251881Spetersvn_client_copy2(svn_commit_info_t **commit_info_p, 4662251881Speter const char *src_path, 4663251881Speter const svn_opt_revision_t *src_revision, 4664251881Speter const char *dst_path, 4665251881Speter svn_client_ctx_t *ctx, 4666251881Speter apr_pool_t *pool); 4667251881Speter 4668251881Speter 4669251881Speter/** 4670251881Speter * Similar to svn_client_copy2(), but uses #svn_client_commit_info_t 4671251881Speter * for @a commit_info_p. 4672251881Speter * 4673251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 4674251881Speter */ 4675251881SpeterSVN_DEPRECATED 4676251881Spetersvn_error_t * 4677251881Spetersvn_client_copy(svn_client_commit_info_t **commit_info_p, 4678251881Speter const char *src_path, 4679251881Speter const svn_opt_revision_t *src_revision, 4680251881Speter const char *dst_path, 4681251881Speter svn_client_ctx_t *ctx, 4682251881Speter apr_pool_t *pool); 4683251881Speter 4684251881Speter 4685251881Speter/** @} */ 4686251881Speter 4687251881Speter/** 4688251881Speter * @defgroup Move Move paths in the working copy or repository. 4689251881Speter * 4690251881Speter * @{ 4691251881Speter */ 4692251881Speter 4693251881Speter/** 4694251881Speter * Move @a src_paths to @a dst_path. 4695251881Speter * 4696251881Speter * @a src_paths is an array of (const char *) paths -- either all WC paths 4697251881Speter * or all URLs -- of versioned items. If multiple @a src_paths are given, 4698251881Speter * @a dst_path must be a directory and @a src_paths will be moved as 4699251881Speter * children of @a dst_path. 4700251881Speter * 4701251881Speter * If @a src_paths are repository URLs: 4702251881Speter * 4703251881Speter * - @a dst_path must also be a repository URL. 4704251881Speter * 4705251881Speter * - The authentication baton in @a ctx and @a ctx->log_msg_func/@a 4706251881Speter * ctx->log_msg_baton are used to commit the move. 4707251881Speter * 4708251881Speter * - The move operation will be immediately committed. 4709251881Speter * 4710251881Speter * If @a src_paths are working copy paths: 4711251881Speter * 4712251881Speter * - @a dst_path must also be a working copy path. 4713251881Speter * 4714251881Speter * - @a ctx->log_msg_func3 and @a ctx->log_msg_baton3 are ignored. 4715251881Speter * 4716251881Speter * - This is a scheduling operation. No changes will happen to the 4717251881Speter * repository until a commit occurs. This scheduling can be removed 4718251881Speter * with svn_client_revert2(). If one of @a src_paths is a file it is 4719251881Speter * removed from the working copy immediately. If one of @a src_path 4720251881Speter * is a directory it will remain in the working copy but all the files, 4721251881Speter * and unversioned items, it contains will be removed. 4722251881Speter * 4723251881Speter * If @a src_paths has only one item, attempt to move it to @a dst_path. If 4724251881Speter * @a move_as_child is TRUE and @a dst_path already exists, attempt to move the 4725251881Speter * item as a child of @a dst_path. If @a move_as_child is FALSE and 4726251881Speter * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path 4727251881Speter * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a 4728251881Speter * URL. 4729251881Speter * 4730251881Speter * If @a src_paths has multiple items, and @a move_as_child is TRUE, all 4731251881Speter * @a src_paths are moved as children of @a dst_path. If any child of 4732251881Speter * @a dst_path already exists with the same name any item in @a src_paths, 4733251881Speter * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and 4734251881Speter * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL. 4735251881Speter * 4736251881Speter * If @a src_paths has multiple items, and @a move_as_child is FALSE, fail 4737251881Speter * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED. 4738251881Speter * 4739251881Speter * If @a make_parents is TRUE, create any non-existent parent directories 4740251881Speter * also. Otherwise, the parent of @a dst_path must already exist. 4741251881Speter * 4742251881Speter * If @a allow_mixed_revisions is @c FALSE, #SVN_ERR_WC_MIXED_REVISIONS 4743251881Speter * will be raised if the move source is a mixed-revision subtree. 4744251881Speter * If @a allow_mixed_revisions is TRUE, a mixed-revision move source is 4745251881Speter * allowed but the move will degrade to a copy and a delete without local 4746251881Speter * move tracking. This parameter should be set to FALSE except where backwards 4747251881Speter * compatibility to svn_client_move6() is required. 4748251881Speter * 4749251881Speter * If @a metadata_only is @c TRUE and moving a file in a working copy, 4750251881Speter * everything in the metadata is updated as if the node is moved, but the 4751251881Speter * actual disk move operation is not performed. This feature is useful for 4752251881Speter * clients that want to keep the working copy in sync while the actual working 4753251881Speter * copy is updated by some other task. 4754251881Speter * 4755251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 4756251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 4757251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision in 4758251881Speter * the event that this is a committing operation. This table cannot 4759251881Speter * contain any standard Subversion properties. 4760251881Speter * 4761251881Speter * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo that 4762251881Speter * this function can use to query for a commit log message when one is needed. 4763251881Speter * 4764251881Speter * If @a ctx->notify_func2 is non-NULL, then for each item moved, call 4765251881Speter * @a ctx->notify_func2 with the @a ctx->notify_baton2 twice, once to indicate 4766251881Speter * the deletion of the moved thing, and once to indicate the addition of 4767251881Speter * the new location of the thing. 4768251881Speter * 4769251881Speter * ### Is this really true? What about svn_wc_notify_commit_replaced()? ### 4770251881Speter * 4771251881Speter * If @a commit_callback is non-NULL, then for each successful commit, call 4772251881Speter * @a commit_callback with @a commit_baton and a #svn_commit_info_t for 4773251881Speter * the commit. 4774251881Speter * 4775251881Speter * @since New in 1.8. 4776251881Speter */ 4777251881Spetersvn_error_t * 4778251881Spetersvn_client_move7(const apr_array_header_t *src_paths, 4779251881Speter const char *dst_path, 4780251881Speter svn_boolean_t move_as_child, 4781251881Speter svn_boolean_t make_parents, 4782251881Speter svn_boolean_t allow_mixed_revisions, 4783251881Speter svn_boolean_t metadata_only, 4784251881Speter const apr_hash_t *revprop_table, 4785251881Speter svn_commit_callback2_t commit_callback, 4786251881Speter void *commit_baton, 4787251881Speter svn_client_ctx_t *ctx, 4788251881Speter apr_pool_t *pool); 4789251881Speter 4790251881Speter/** 4791251881Speter * Similar to svn_client_move7(), but with @a allow_mixed_revisions always 4792251881Speter * set to @c TRUE and @a metadata_only always to @c FALSE. 4793251881Speter * 4794251881Speter * @since New in 1.7. 4795251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 4796251881Speter */ 4797251881SpeterSVN_DEPRECATED 4798251881Spetersvn_error_t * 4799251881Spetersvn_client_move6(const apr_array_header_t *src_paths, 4800251881Speter const char *dst_path, 4801251881Speter svn_boolean_t move_as_child, 4802251881Speter svn_boolean_t make_parents, 4803251881Speter const apr_hash_t *revprop_table, 4804251881Speter svn_commit_callback2_t commit_callback, 4805251881Speter void *commit_baton, 4806251881Speter svn_client_ctx_t *ctx, 4807251881Speter apr_pool_t *pool); 4808251881Speter 4809251881Speter/** 4810251881Speter * Similar to svn_client_move6(), but returns the commit info in 4811251881Speter * @a *commit_info_p rather than through a callback function. 4812251881Speter * 4813251881Speter * A WC-to-WC move will include any modified and/or unversioned children. 4814251881Speter * @a force is ignored. 4815251881Speter * 4816251881Speter * @since New in 1.5. 4817251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 4818251881Speter */ 4819251881SpeterSVN_DEPRECATED 4820251881Spetersvn_error_t * 4821251881Spetersvn_client_move5(svn_commit_info_t **commit_info_p, 4822251881Speter const apr_array_header_t *src_paths, 4823251881Speter const char *dst_path, 4824251881Speter svn_boolean_t force, 4825251881Speter svn_boolean_t move_as_child, 4826251881Speter svn_boolean_t make_parents, 4827251881Speter const apr_hash_t *revprop_table, 4828251881Speter svn_client_ctx_t *ctx, 4829251881Speter apr_pool_t *pool); 4830251881Speter 4831251881Speter/** 4832251881Speter * Similar to svn_client_move5(), with only one @a src_path, @a 4833251881Speter * move_as_child set to @c FALSE, @a revprop_table passed as NULL, and 4834251881Speter * @a make_parents set to @c FALSE. 4835251881Speter * 4836251881Speter * Note: The behaviour of @a force changed in 1.5 (r860885 and r861421), when 4837251881Speter * the 'move' semantics were improved to just move the source including any 4838251881Speter * modified and/or unversioned items in it. Before that, @a force 4839251881Speter * controlled what happened to such items, but now @a force is ignored. 4840251881Speter * 4841251881Speter * @since New in 1.4. 4842251881Speter * 4843251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 4844251881Speter */ 4845251881SpeterSVN_DEPRECATED 4846251881Spetersvn_error_t * 4847251881Spetersvn_client_move4(svn_commit_info_t **commit_info_p, 4848251881Speter const char *src_path, 4849251881Speter const char *dst_path, 4850251881Speter svn_boolean_t force, 4851251881Speter svn_client_ctx_t *ctx, 4852251881Speter apr_pool_t *pool); 4853251881Speter 4854251881Speter/** 4855251881Speter * Similar to svn_client_move4(), with the difference that if @a dst_path 4856251881Speter * already exists and is a directory, move the item into that directory, 4857251881Speter * keeping its name (the last component of @a src_path). 4858251881Speter * 4859251881Speter * @since New in 1.3. 4860251881Speter * 4861251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 4862251881Speter */ 4863251881SpeterSVN_DEPRECATED 4864251881Spetersvn_error_t * 4865251881Spetersvn_client_move3(svn_commit_info_t **commit_info_p, 4866251881Speter const char *src_path, 4867251881Speter const char *dst_path, 4868251881Speter svn_boolean_t force, 4869251881Speter svn_client_ctx_t *ctx, 4870251881Speter apr_pool_t *pool); 4871251881Speter 4872251881Speter/** 4873251881Speter * Similar to svn_client_move3(), but uses #svn_client_commit_info_t 4874251881Speter * for @a commit_info_p. 4875251881Speter * 4876251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 4877251881Speter * 4878251881Speter * @since New in 1.2. 4879251881Speter */ 4880251881SpeterSVN_DEPRECATED 4881251881Spetersvn_error_t * 4882251881Spetersvn_client_move2(svn_client_commit_info_t **commit_info_p, 4883251881Speter const char *src_path, 4884251881Speter const char *dst_path, 4885251881Speter svn_boolean_t force, 4886251881Speter svn_client_ctx_t *ctx, 4887251881Speter apr_pool_t *pool); 4888251881Speter 4889251881Speter/** 4890251881Speter * Similar to svn_client_move2(), but an extra argument @a src_revision 4891251881Speter * must be passed. This has no effect, but must be of kind 4892251881Speter * #svn_opt_revision_unspecified or #svn_opt_revision_head, 4893251881Speter * otherwise error #SVN_ERR_UNSUPPORTED_FEATURE is returned. 4894251881Speter * 4895251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 4896251881Speter */ 4897251881SpeterSVN_DEPRECATED 4898251881Spetersvn_error_t * 4899251881Spetersvn_client_move(svn_client_commit_info_t **commit_info_p, 4900251881Speter const char *src_path, 4901251881Speter const svn_opt_revision_t *src_revision, 4902251881Speter const char *dst_path, 4903251881Speter svn_boolean_t force, 4904251881Speter svn_client_ctx_t *ctx, 4905251881Speter apr_pool_t *pool); 4906251881Speter 4907251881Speter/** @} */ 4908251881Speter 4909251881Speter 4910251881Speter/** Properties 4911251881Speter * 4912251881Speter * Note that certain svn-controlled properties must always have their 4913251881Speter * values set and stored in UTF8 with LF line endings. When 4914251881Speter * retrieving these properties, callers must convert the values back 4915251881Speter * to native locale and native line-endings before displaying them to 4916251881Speter * the user. For help with this task, see 4917251881Speter * svn_prop_needs_translation(), svn_subst_translate_string(), and 4918251881Speter * svn_subst_detranslate_string(). 4919251881Speter * 4920251881Speter * @defgroup svn_client_prop_funcs Property functions 4921251881Speter * @{ 4922251881Speter */ 4923251881Speter 4924251881Speter 4925251881Speter/** 4926251881Speter * Set @a propname to @a propval on @a url. A @a propval of @c NULL will 4927251881Speter * delete the property. 4928251881Speter * 4929251881Speter * Immediately attempt to commit the property change in the repository, 4930251881Speter * using the authentication baton in @a ctx and @a 4931251881Speter * ctx->log_msg_func3/@a ctx->log_msg_baton3. 4932251881Speter * 4933251881Speter * If the property has changed on @a url since revision 4934251881Speter * @a base_revision_for_url (which must not be #SVN_INVALID_REVNUM), no 4935251881Speter * change will be made and an error will be returned. 4936251881Speter * 4937251881Speter * If non-NULL, @a revprop_table is a hash table holding additional, 4938251881Speter * custom revision properties (<tt>const char *</tt> names mapped to 4939251881Speter * <tt>svn_string_t *</tt> values) to be set on the new revision. This 4940251881Speter * table cannot contain any standard Subversion properties. 4941251881Speter * 4942251881Speter * If @a commit_callback is non-NULL, then call @a commit_callback with 4943251881Speter * @a commit_baton and a #svn_commit_info_t for the commit. 4944251881Speter * 4945251881Speter * If @a propname is an svn-controlled property (i.e. prefixed with 4946251881Speter * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 4947251881Speter * the value is UTF8-encoded and uses LF line-endings. 4948251881Speter * 4949251881Speter * If @a skip_checks is TRUE, do no validity checking. But if @a 4950251881Speter * skip_checks is FALSE, and @a propname is not a valid property for @a 4951251881Speter * url, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the property is 4952251881Speter * not appropriate for @a url), or * #SVN_ERR_BAD_MIME_TYPE (if @a propname 4953251881Speter * is "svn:mime-type", but @a propval is not a valid mime-type). 4954251881Speter * 4955251881Speter * Use @a scratch_pool for all memory allocation. 4956251881Speter * 4957251881Speter * @since New in 1.7. 4958251881Speter */ 4959251881Spetersvn_error_t * 4960251881Spetersvn_client_propset_remote(const char *propname, 4961251881Speter const svn_string_t *propval, 4962251881Speter const char *url, 4963251881Speter svn_boolean_t skip_checks, 4964251881Speter svn_revnum_t base_revision_for_url, 4965251881Speter const apr_hash_t *revprop_table, 4966251881Speter svn_commit_callback2_t commit_callback, 4967251881Speter void *commit_baton, 4968251881Speter svn_client_ctx_t *ctx, 4969251881Speter apr_pool_t *scratch_pool); 4970251881Speter 4971251881Speter/** 4972251881Speter * Set @a propname to @a propval on each (const char *) target in @a 4973251881Speter * targets. The targets must be all working copy paths. A @a propval 4974251881Speter * of @c NULL will delete the property. 4975251881Speter * 4976251881Speter * If @a depth is #svn_depth_empty, set the property on each member of 4977251881Speter * @a targets only; if #svn_depth_files, set it on @a targets and their 4978251881Speter * file children (if any); if #svn_depth_immediates, on @a targets and all 4979251881Speter * of their immediate children (both files and directories); if 4980251881Speter * #svn_depth_infinity, on @a targets and everything beneath them. 4981251881Speter * 4982251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 4983251881Speter * names, used as a restrictive filter on items whose properties are 4984251881Speter * set; that is, don't set properties on any item unless it's a member 4985251881Speter * of one of those changelists. If @a changelists is empty (or 4986251881Speter * altogether @c NULL), no changelist filtering occurs. 4987251881Speter * 4988251881Speter * If @a propname is an svn-controlled property (i.e. prefixed with 4989251881Speter * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 4990251881Speter * the value is UTF8-encoded and uses LF line-endings. 4991251881Speter * 4992251881Speter * If @a skip_checks is TRUE, do no validity checking. But if @a 4993251881Speter * skip_checks is FALSE, and @a propname is not a valid property for @a 4994251881Speter * targets, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the 4995251881Speter * property is not appropriate for @a targets), or 4996251881Speter * #SVN_ERR_BAD_MIME_TYPE (if @a propname is "svn:mime-type", but @a 4997251881Speter * propval is not a valid mime-type). 4998251881Speter * 4999251881Speter * If @a ctx->cancel_func is non-NULL, invoke it passing @a 5000251881Speter * ctx->cancel_baton at various places during the operation. 5001251881Speter * 5002251881Speter * Use @a scratch_pool for all memory allocation. 5003251881Speter * 5004251881Speter * @since New in 1.7. 5005251881Speter */ 5006251881Spetersvn_error_t * 5007251881Spetersvn_client_propset_local(const char *propname, 5008251881Speter const svn_string_t *propval, 5009251881Speter const apr_array_header_t *targets, 5010251881Speter svn_depth_t depth, 5011251881Speter svn_boolean_t skip_checks, 5012251881Speter const apr_array_header_t *changelists, 5013251881Speter svn_client_ctx_t *ctx, 5014251881Speter apr_pool_t *scratch_pool); 5015251881Speter 5016251881Speter/** 5017251881Speter * An amalgamation of svn_client_propset_local() and 5018251881Speter * svn_client_propset_remote() that takes only a single target, and 5019251881Speter * returns the commit info in @a *commit_info_p rather than through a 5020251881Speter * callback function. 5021251881Speter * 5022251881Speter * @since New in 1.5. 5023251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 5024251881Speter */ 5025251881SpeterSVN_DEPRECATED 5026251881Spetersvn_error_t * 5027251881Spetersvn_client_propset3(svn_commit_info_t **commit_info_p, 5028251881Speter const char *propname, 5029251881Speter const svn_string_t *propval, 5030251881Speter const char *target, 5031251881Speter svn_depth_t depth, 5032251881Speter svn_boolean_t skip_checks, 5033251881Speter svn_revnum_t base_revision_for_url, 5034251881Speter const apr_array_header_t *changelists, 5035251881Speter const apr_hash_t *revprop_table, 5036251881Speter svn_client_ctx_t *ctx, 5037251881Speter apr_pool_t *pool); 5038251881Speter 5039251881Speter/** 5040251881Speter * Like svn_client_propset3(), but with @a base_revision_for_url 5041251881Speter * always #SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a 5042251881Speter * changelists always @c NULL; @a revprop_table always @c NULL; and @a 5043251881Speter * depth set according to @a recurse: if @a recurse is TRUE, @a depth 5044251881Speter * is #svn_depth_infinity, else #svn_depth_empty. 5045251881Speter * 5046251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 5047251881Speter */ 5048251881SpeterSVN_DEPRECATED 5049251881Spetersvn_error_t * 5050251881Spetersvn_client_propset2(const char *propname, 5051251881Speter const svn_string_t *propval, 5052251881Speter const char *target, 5053251881Speter svn_boolean_t recurse, 5054251881Speter svn_boolean_t skip_checks, 5055251881Speter svn_client_ctx_t *ctx, 5056251881Speter apr_pool_t *pool); 5057251881Speter 5058251881Speter/** 5059251881Speter * Like svn_client_propset2(), but with @a skip_checks always FALSE and a 5060251881Speter * newly created @a ctx. 5061251881Speter * 5062251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 5063251881Speter */ 5064251881SpeterSVN_DEPRECATED 5065251881Spetersvn_error_t * 5066251881Spetersvn_client_propset(const char *propname, 5067251881Speter const svn_string_t *propval, 5068251881Speter const char *target, 5069251881Speter svn_boolean_t recurse, 5070251881Speter apr_pool_t *pool); 5071251881Speter 5072251881Speter/** Set @a propname to @a propval on revision @a revision in the repository 5073251881Speter * represented by @a URL. Use the authentication baton in @a ctx for 5074251881Speter * authentication, and @a pool for all memory allocation. Return the actual 5075251881Speter * rev affected in @a *set_rev. A @a propval of @c NULL will delete the 5076251881Speter * property. 5077251881Speter * 5078251881Speter * If @a original_propval is non-NULL, then just before setting the 5079251881Speter * new value, check that the old value matches @a original_propval; 5080251881Speter * if they do not match, return the error #SVN_ERR_RA_OUT_OF_DATE. 5081251881Speter * This is to help clients support interactive editing of revprops: 5082251881Speter * without this check, the window during which the property may change 5083251881Speter * underneath the user is as wide as the amount of time the user 5084251881Speter * spends editing the property. With this check, the window is 5085251881Speter * reduced to a small, constant amount of time right before we set the 5086251881Speter * new value. (To check that an old value is still non-existent, set 5087251881Speter * @a original_propval->data to NULL, and @a original_propval->len is 5088251881Speter * ignored.) 5089251881Speter * If the server advertises #SVN_RA_CAPABILITY_ATOMIC_REVPROPS, the 5090251881Speter * check of @a original_propval is done atomically. 5091251881Speter * 5092251881Speter * Note: the representation of "property is not set" in @a 5093251881Speter * original_propval differs from the representation in other APIs 5094251881Speter * (such as svn_fs_change_rev_prop2() and svn_ra_change_rev_prop2()). 5095251881Speter * 5096251881Speter * If @a force is TRUE, allow newlines in the author property. 5097251881Speter * 5098251881Speter * If @a propname is an svn-controlled property (i.e. prefixed with 5099251881Speter * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that 5100251881Speter * the value UTF8-encoded and uses LF line-endings. 5101251881Speter * 5102251881Speter * Note that unlike its cousin svn_client_propset3(), this routine 5103251881Speter * doesn't affect the working copy at all; it's a pure network 5104251881Speter * operation that changes an *unversioned* property attached to a 5105251881Speter * revision. This can be used to tweak log messages, dates, authors, 5106251881Speter * and the like. Be careful: it's a lossy operation. 5107251881Speter 5108251881Speter * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification 5109251881Speter * functions and baton which are called upon successful setting of the 5110251881Speter * property. 5111251881Speter * 5112251881Speter * Also note that unless the administrator creates a 5113251881Speter * pre-revprop-change hook in the repository, this feature will fail. 5114251881Speter * 5115251881Speter * @since New in 1.6. 5116251881Speter */ 5117251881Spetersvn_error_t * 5118251881Spetersvn_client_revprop_set2(const char *propname, 5119251881Speter const svn_string_t *propval, 5120251881Speter const svn_string_t *original_propval, 5121251881Speter const char *URL, 5122251881Speter const svn_opt_revision_t *revision, 5123251881Speter svn_revnum_t *set_rev, 5124251881Speter svn_boolean_t force, 5125251881Speter svn_client_ctx_t *ctx, 5126251881Speter apr_pool_t *pool); 5127251881Speter 5128251881Speter/** 5129251881Speter * Similar to svn_client_revprop_set2(), but with @a original_propval 5130251881Speter * always @c NULL. 5131251881Speter * 5132251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 5133251881Speter */ 5134251881SpeterSVN_DEPRECATED 5135251881Spetersvn_error_t * 5136251881Spetersvn_client_revprop_set(const char *propname, 5137251881Speter const svn_string_t *propval, 5138251881Speter const char *URL, 5139251881Speter const svn_opt_revision_t *revision, 5140251881Speter svn_revnum_t *set_rev, 5141251881Speter svn_boolean_t force, 5142251881Speter svn_client_ctx_t *ctx, 5143251881Speter apr_pool_t *pool); 5144251881Speter 5145251881Speter/** 5146251881Speter * Set @a *props to a hash table whose keys are absolute paths or URLs 5147251881Speter * of items on which property @a propname is explicitly set, and whose 5148251881Speter * values are <tt>svn_string_t *</tt> representing the property value for 5149251881Speter * @a propname at that path. 5150251881Speter * 5151251881Speter * If @a inherited_props is not @c NULL, then set @a *inherited_props to a 5152251881Speter * depth-first ordered array of #svn_prop_inherited_item_t * structures 5153251881Speter * representing the properties inherited by @a target. If @a target is a 5154251881Speter * working copy path, then properties inherited by @a target as far as the 5155251881Speter * root of the working copy are obtained from the working copy's actual 5156251881Speter * property values. Properties inherited from above the working copy root 5157251881Speter * come from the inherited properties cache. If @a target is a URL, then 5158251881Speter * the inherited properties come from the repository. If @a inherited_props 5159251881Speter * is not @c NULL and no inheritable properties are found, then set 5160251881Speter * @a *inherited_props to an empty array. 5161251881Speter * 5162251881Speter * The #svn_prop_inherited_item_t->path_or_url members of the 5163251881Speter * #svn_prop_inherited_item_t * structures in @a *inherited_props are 5164251881Speter * URLs if @a target is a URL or if @a target is a working copy path but the 5165251881Speter * property represented by the structure is above the working copy root (i.e. 5166251881Speter * the inherited property is from the cache). In all other cases the 5167251881Speter * #svn_prop_inherited_item_t->path_or_url members are absolute working copy 5168251881Speter * paths. 5169251881Speter * 5170251881Speter * Allocate @a *props (including keys and values) and @a *inherited_props 5171251881Speter * (including its elements) in @a result_pool, use @a scratch_pool for 5172251881Speter * temporary allocations. 5173251881Speter * 5174251881Speter * @a target is a WC absolute path or a URL. 5175251881Speter * 5176251881Speter * Don't store any path, not even @a target, if it does not have a 5177251881Speter * property named @a propname. 5178251881Speter * 5179251881Speter * If @a revision->kind is #svn_opt_revision_unspecified, then: get 5180251881Speter * properties from the working copy if @a target is a working copy 5181251881Speter * path, or from the repository head if @a target is a URL. Else get 5182251881Speter * the properties as of @a revision. The actual node revision 5183251881Speter * selected is determined by the path as it exists in @a peg_revision. 5184251881Speter * If @a peg_revision->kind is #svn_opt_revision_unspecified, then 5185251881Speter * it defaults to #svn_opt_revision_head for URLs or 5186251881Speter * #svn_opt_revision_working for WC targets. Use the authentication 5187251881Speter * baton in @a ctx for authentication if contacting the repository. 5188251881Speter * If @a actual_revnum is not @c NULL, the actual revision number used 5189251881Speter * for the fetch is stored in @a *actual_revnum. 5190251881Speter * 5191251881Speter * If @a depth is #svn_depth_empty, fetch the property from 5192251881Speter * @a target only; if #svn_depth_files, fetch from @a target and its 5193251881Speter * file children (if any); if #svn_depth_immediates, from @a target 5194251881Speter * and all of its immediate children (both files and directories); if 5195251881Speter * #svn_depth_infinity, from @a target and everything beneath it. 5196251881Speter * 5197251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 5198251881Speter * names, used as a restrictive filter on items whose properties are 5199251881Speter * gotten; that is, don't get @a propname on any item unless it's a member 5200251881Speter * of one of those changelists. If @a changelists is empty (or 5201251881Speter * altogether @c NULL), no changelist filtering occurs. 5202251881Speter * 5203251881Speter * If error, don't touch @a *props, otherwise @a *props is a hash table 5204251881Speter * even if empty. 5205251881Speter * 5206251881Speter * This function returns SVN_ERR_UNVERSIONED_RESOURCE when it is called on 5207251881Speter * unversioned nodes. 5208251881Speter * 5209251881Speter * @since New in 1.8. 5210251881Speter */ 5211251881Spetersvn_error_t * 5212251881Spetersvn_client_propget5(apr_hash_t **props, 5213251881Speter apr_array_header_t **inherited_props, 5214251881Speter const char *propname, 5215251881Speter const char *target, /* abspath or URL */ 5216251881Speter const svn_opt_revision_t *peg_revision, 5217251881Speter const svn_opt_revision_t *revision, 5218251881Speter svn_revnum_t *actual_revnum, 5219251881Speter svn_depth_t depth, 5220251881Speter const apr_array_header_t *changelists, 5221251881Speter svn_client_ctx_t *ctx, 5222251881Speter apr_pool_t *result_pool, 5223251881Speter apr_pool_t *scratch_pool); 5224251881Speter 5225251881Speter/** 5226251881Speter * Similar to svn_client_propget5 but with @a inherited_props always 5227251881Speter * passed as NULL. 5228251881Speter * 5229251881Speter * @since New in 1.7. 5230251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 5231251881Speter */ 5232251881SpeterSVN_DEPRECATED 5233251881Spetersvn_error_t * 5234251881Spetersvn_client_propget4(apr_hash_t **props, 5235251881Speter const char *propname, 5236251881Speter const char *target, /* abspath or URL */ 5237251881Speter const svn_opt_revision_t *peg_revision, 5238251881Speter const svn_opt_revision_t *revision, 5239251881Speter svn_revnum_t *actual_revnum, 5240251881Speter svn_depth_t depth, 5241251881Speter const apr_array_header_t *changelists, 5242251881Speter svn_client_ctx_t *ctx, 5243251881Speter apr_pool_t *result_pool, 5244251881Speter apr_pool_t *scratch_pool); 5245251881Speter 5246251881Speter/** 5247251881Speter * Similar to svn_client_propget4(), but with the following change to the 5248251881Speter * output hash keys: keys are `<tt>char *</tt>' paths, prefixed by 5249251881Speter * @a target, which is a working copy path or a URL. 5250251881Speter * 5251251881Speter * This function returns SVN_ERR_ENTRY_NOT_FOUND where svn_client_propget4 5252251881Speter * would return SVN_ERR_UNVERSIONED_RESOURCE. 5253251881Speter * 5254251881Speter * @since New in 1.5. 5255251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 5256251881Speter */ 5257251881SpeterSVN_DEPRECATED 5258251881Spetersvn_error_t * 5259251881Spetersvn_client_propget3(apr_hash_t **props, 5260251881Speter const char *propname, 5261251881Speter const char *target, 5262251881Speter const svn_opt_revision_t *peg_revision, 5263251881Speter const svn_opt_revision_t *revision, 5264251881Speter svn_revnum_t *actual_revnum, 5265251881Speter svn_depth_t depth, 5266251881Speter const apr_array_header_t *changelists, 5267251881Speter svn_client_ctx_t *ctx, 5268251881Speter apr_pool_t *pool); 5269251881Speter 5270251881Speter/** 5271251881Speter * Similar to svn_client_propget3(), except that @a actual_revnum and 5272251881Speter * @a changelists are always @c NULL, and @a depth is set according to 5273251881Speter * @a recurse: if @a recurse is TRUE, then @a depth is 5274251881Speter * #svn_depth_infinity, else #svn_depth_empty. 5275251881Speter * 5276251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 5277251881Speter */ 5278251881SpeterSVN_DEPRECATED 5279251881Spetersvn_error_t * 5280251881Spetersvn_client_propget2(apr_hash_t **props, 5281251881Speter const char *propname, 5282251881Speter const char *target, 5283251881Speter const svn_opt_revision_t *peg_revision, 5284251881Speter const svn_opt_revision_t *revision, 5285251881Speter svn_boolean_t recurse, 5286251881Speter svn_client_ctx_t *ctx, 5287251881Speter apr_pool_t *pool); 5288251881Speter 5289251881Speter/** 5290251881Speter * Similar to svn_client_propget2(), except that @a peg_revision is 5291251881Speter * always the same as @a revision. 5292251881Speter * 5293251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 5294251881Speter */ 5295251881SpeterSVN_DEPRECATED 5296251881Spetersvn_error_t * 5297251881Spetersvn_client_propget(apr_hash_t **props, 5298251881Speter const char *propname, 5299251881Speter const char *target, 5300251881Speter const svn_opt_revision_t *revision, 5301251881Speter svn_boolean_t recurse, 5302251881Speter svn_client_ctx_t *ctx, 5303251881Speter apr_pool_t *pool); 5304251881Speter 5305251881Speter/** Set @a *propval to the value of @a propname on revision @a revision 5306251881Speter * in the repository represented by @a URL. Use the authentication baton 5307251881Speter * in @a ctx for authentication, and @a pool for all memory allocation. 5308251881Speter * Return the actual rev queried in @a *set_rev. 5309251881Speter * 5310289180Speter * If @a propname does not exist on @a revision, set @a *propval to @c NULL. 5311289180Speter * 5312251881Speter * Note that unlike its cousin svn_client_propget(), this routine 5313251881Speter * doesn't affect the working copy at all; it's a pure network 5314251881Speter * operation that queries an *unversioned* property attached to a 5315251881Speter * revision. This can query log messages, dates, authors, and the 5316251881Speter * like. 5317251881Speter */ 5318251881Spetersvn_error_t * 5319251881Spetersvn_client_revprop_get(const char *propname, 5320251881Speter svn_string_t **propval, 5321251881Speter const char *URL, 5322251881Speter const svn_opt_revision_t *revision, 5323251881Speter svn_revnum_t *set_rev, 5324251881Speter svn_client_ctx_t *ctx, 5325251881Speter apr_pool_t *pool); 5326251881Speter 5327251881Speter/** 5328251881Speter * Invoke @a receiver with @a receiver_baton to return the regular explicit, and 5329251881Speter * possibly the inherited, properties of @a target, a URL or working copy path. 5330251881Speter * @a receiver will be called for each path encountered. 5331251881Speter * 5332251881Speter * @a target is a WC path or a URL. 5333251881Speter * 5334251881Speter * If @a revision->kind is #svn_opt_revision_unspecified, then get the 5335251881Speter * explicit (and possibly the inherited) properties from the working copy, 5336251881Speter * if @a target is a working copy path, or from the repository head if 5337251881Speter * @a target is a URL. Else get the properties as of @a revision. 5338251881Speter * The actual node revision selected is determined by the path as it exists 5339251881Speter * in @a peg_revision. If @a peg_revision->kind is 5340251881Speter * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head 5341251881Speter * for URLs or #svn_opt_revision_working for WC targets. Use the 5342251881Speter * authentication baton cached in @a ctx for authentication if contacting 5343251881Speter * the repository. 5344251881Speter * 5345251881Speter * If @a depth is #svn_depth_empty, list only the properties of 5346251881Speter * @a target itself. If @a depth is #svn_depth_files, and 5347251881Speter * @a target is a directory, list the properties of @a target 5348251881Speter * and its file entries. If #svn_depth_immediates, list the properties 5349251881Speter * of its immediate file and directory entries. If #svn_depth_infinity, 5350251881Speter * list the properties of its file entries and recurse (with 5351251881Speter * #svn_depth_infinity) on directory entries. #svn_depth_unknown is 5352251881Speter * equivalent to #svn_depth_empty. All other values produce undefined 5353251881Speter * results. 5354251881Speter * 5355251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 5356251881Speter * names, used as a restrictive filter on items whose properties are 5357251881Speter * listed; that is, don't list properties on any item unless it's a member 5358251881Speter * of one of those changelists. If @a changelists is empty (or 5359251881Speter * altogether @c NULL), no changelist filtering occurs. 5360251881Speter * 5361251881Speter * If @a get_target_inherited_props is true, then also return any inherited 5362251881Speter * properties when @a receiver is called for @a target. If @a target is a 5363251881Speter * working copy path, then properties inherited by @a target as far as the 5364251881Speter * root of the working copy are obtained from the working copy's actual 5365251881Speter * property values. Properties inherited from above the working copy 5366251881Speter * root come from the inherited properties cache. If @a target is a URL, 5367251881Speter * then the inherited properties come from the repository. 5368251881Speter * If @a get_target_inherited_props is false, then no inherited properties 5369251881Speter * are returned to @a receiver. 5370251881Speter * 5371251881Speter * If @a target is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND. 5372251881Speter * 5373251881Speter * @since New in 1.8. 5374251881Speter */ 5375251881Spetersvn_error_t * 5376251881Spetersvn_client_proplist4(const char *target, 5377251881Speter const svn_opt_revision_t *peg_revision, 5378251881Speter const svn_opt_revision_t *revision, 5379251881Speter svn_depth_t depth, 5380251881Speter const apr_array_header_t *changelists, 5381251881Speter svn_boolean_t get_target_inherited_props, 5382251881Speter svn_proplist_receiver2_t receiver, 5383251881Speter void *receiver_baton, 5384251881Speter svn_client_ctx_t *ctx, 5385251881Speter apr_pool_t *scratch_pool); 5386251881Speter 5387251881Speter/** 5388251881Speter * Similar to svn_client_proplist4(), except that the @a receiver type 5389251881Speter * is a #svn_proplist_receiver_t, @a get_target_inherited_props is 5390251881Speter * always passed NULL, and there is no separate scratch pool. 5391251881Speter * 5392251881Speter * @since New in 1.5. 5393251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 5394251881Speter */ 5395251881SpeterSVN_DEPRECATED 5396251881Spetersvn_error_t * 5397251881Spetersvn_client_proplist3(const char *target, 5398251881Speter const svn_opt_revision_t *peg_revision, 5399251881Speter const svn_opt_revision_t *revision, 5400251881Speter svn_depth_t depth, 5401251881Speter const apr_array_header_t *changelists, 5402251881Speter svn_proplist_receiver_t receiver, 5403251881Speter void *receiver_baton, 5404251881Speter svn_client_ctx_t *ctx, 5405251881Speter apr_pool_t *pool); 5406251881Speter 5407251881Speter/** 5408251881Speter * Similar to svn_client_proplist3(), except the properties are 5409251881Speter * returned as an array of #svn_client_proplist_item_t * structures 5410251881Speter * instead of by invoking the receiver function, there's no support 5411251881Speter * for @a changelists filtering, and @a recurse is used instead of a 5412251881Speter * #svn_depth_t parameter (FALSE corresponds to #svn_depth_empty, 5413251881Speter * and TRUE to #svn_depth_infinity). 5414251881Speter * 5415251881Speter * @since New in 1.2. 5416251881Speter * 5417251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 5418251881Speter */ 5419251881SpeterSVN_DEPRECATED 5420251881Spetersvn_error_t * 5421251881Spetersvn_client_proplist2(apr_array_header_t **props, 5422251881Speter const char *target, 5423251881Speter const svn_opt_revision_t *peg_revision, 5424251881Speter const svn_opt_revision_t *revision, 5425251881Speter svn_boolean_t recurse, 5426251881Speter svn_client_ctx_t *ctx, 5427251881Speter apr_pool_t *pool); 5428251881Speter 5429251881Speter/** 5430251881Speter * Similar to svn_client_proplist2(), except that @a peg_revision is 5431251881Speter * always the same as @a revision. 5432251881Speter * 5433251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 5434251881Speter */ 5435251881SpeterSVN_DEPRECATED 5436251881Spetersvn_error_t * 5437251881Spetersvn_client_proplist(apr_array_header_t **props, 5438251881Speter const char *target, 5439251881Speter const svn_opt_revision_t *revision, 5440251881Speter svn_boolean_t recurse, 5441251881Speter svn_client_ctx_t *ctx, 5442251881Speter apr_pool_t *pool); 5443251881Speter 5444251881Speter/** Set @a *props to a hash of the revision props attached to @a revision in 5445251881Speter * the repository represented by @a URL. Use the authentication baton cached 5446251881Speter * in @a ctx for authentication, and @a pool for all memory allocation. 5447251881Speter * Return the actual rev queried in @a *set_rev. 5448251881Speter * 5449251881Speter * The allocated hash maps (<tt>const char *</tt>) property names to 5450251881Speter * (#svn_string_t *) property values. 5451251881Speter * 5452251881Speter * Note that unlike its cousin svn_client_proplist(), this routine 5453251881Speter * doesn't read a working copy at all; it's a pure network operation 5454251881Speter * that reads *unversioned* properties attached to a revision. 5455251881Speter */ 5456251881Spetersvn_error_t * 5457251881Spetersvn_client_revprop_list(apr_hash_t **props, 5458251881Speter const char *URL, 5459251881Speter const svn_opt_revision_t *revision, 5460251881Speter svn_revnum_t *set_rev, 5461251881Speter svn_client_ctx_t *ctx, 5462251881Speter apr_pool_t *pool); 5463251881Speter/** @} */ 5464251881Speter 5465251881Speter 5466251881Speter/** 5467251881Speter * @defgroup Export Export a tree from version control. 5468251881Speter * 5469251881Speter * @{ 5470251881Speter */ 5471251881Speter 5472251881Speter/** 5473251881Speter * Export the contents of either a subversion repository or a 5474251881Speter * subversion working copy into a 'clean' directory (meaning a 5475251881Speter * directory with no administrative directories). If @a result_rev 5476251881Speter * is not @c NULL and the path being exported is a repository URL, set 5477251881Speter * @a *result_rev to the value of the revision actually exported (set 5478251881Speter * it to #SVN_INVALID_REVNUM for local exports). 5479251881Speter * 5480251881Speter * @a from_path_or_url is either the path the working copy on disk, or 5481251881Speter * a URL to the repository you wish to export. 5482251881Speter * 5483251881Speter * When exporting a directory, @a to_path is the path to the directory 5484251881Speter * where you wish to create the exported tree; when exporting a file, it 5485251881Speter * is the path of the file that will be created. If @a to_path is the 5486251881Speter * empty path, then the basename of the export file/directory in the repository 5487251881Speter * will be used. If @a to_path represents an existing directory, and a 5488251881Speter * file is being exported, then a file with the that basename will be 5489251881Speter * created under that directory (as with 'copy' operations). 5490251881Speter * 5491251881Speter * @a peg_revision is the revision where the path is first looked up 5492251881Speter * when exporting from a repository. If @a peg_revision->kind is 5493251881Speter * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head 5494251881Speter * for URLs or #svn_opt_revision_working for WC targets. 5495251881Speter * 5496251881Speter * @a revision is the revision that should be exported, which is only used 5497251881Speter * when exporting from a repository. 5498251881Speter * 5499251881Speter * @a peg_revision and @a revision must not be @c NULL. 5500251881Speter * 5501251881Speter * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification 5502251881Speter * functions and baton which are passed to svn_client_checkout() when 5503251881Speter * exporting from a repository. 5504251881Speter * 5505251881Speter * @a ctx is a context used for authentication in the repository case. 5506251881Speter * 5507251881Speter * @a overwrite if TRUE will cause the export to overwrite files or 5508251881Speter * directories. 5509251881Speter * 5510251881Speter * If @a ignore_externals is set, don't process externals definitions 5511251881Speter * as part of this operation. 5512251881Speter * 5513251881Speter * If @a ignore_keywords is set, don't expand keywords as part of this 5514251881Speter * operation. 5515251881Speter * 5516251881Speter * @a native_eol allows you to override the standard eol marker on the 5517251881Speter * platform you are running on. Can be either "LF", "CR" or "CRLF" or 5518251881Speter * NULL. If NULL will use the standard eol marker. Any other value 5519251881Speter * will cause the #SVN_ERR_IO_UNKNOWN_EOL error to be returned. 5520251881Speter * 5521251881Speter * If @a depth is #svn_depth_infinity, export fully recursively. Else 5522251881Speter * if it is #svn_depth_immediates, export @a from_path_or_url and its 5523251881Speter * immediate children (if any), but with subdirectories empty and at 5524251881Speter * #svn_depth_empty. Else if #svn_depth_files, export @a 5525251881Speter * from_path_or_url and its immediate file children (if any) only. If 5526251881Speter * @a depth is #svn_depth_empty, then export exactly @a 5527251881Speter * from_path_or_url and none of its children. 5528251881Speter * 5529251881Speter * All allocations are done in @a pool. 5530251881Speter * 5531251881Speter * @since New in 1.7. 5532251881Speter */ 5533251881Spetersvn_error_t * 5534251881Spetersvn_client_export5(svn_revnum_t *result_rev, 5535251881Speter const char *from_path_or_url, 5536251881Speter const char *to_path, 5537251881Speter const svn_opt_revision_t *peg_revision, 5538251881Speter const svn_opt_revision_t *revision, 5539251881Speter svn_boolean_t overwrite, 5540251881Speter svn_boolean_t ignore_externals, 5541251881Speter svn_boolean_t ignore_keywords, 5542251881Speter svn_depth_t depth, 5543251881Speter const char *native_eol, 5544251881Speter svn_client_ctx_t *ctx, 5545251881Speter apr_pool_t *pool); 5546251881Speter 5547251881Speter/** 5548251881Speter * Similar to svn_client_export5(), but with @a ignore_keywords set 5549251881Speter * to FALSE. 5550251881Speter * 5551251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 5552251881Speter * @since New in 1.5. 5553251881Speter */ 5554251881SpeterSVN_DEPRECATED 5555251881Spetersvn_error_t * 5556251881Spetersvn_client_export4(svn_revnum_t *result_rev, 5557251881Speter const char *from_path_or_url, 5558251881Speter const char *to_path, 5559251881Speter const svn_opt_revision_t *peg_revision, 5560251881Speter const svn_opt_revision_t *revision, 5561251881Speter svn_boolean_t overwrite, 5562251881Speter svn_boolean_t ignore_externals, 5563251881Speter svn_depth_t depth, 5564251881Speter const char *native_eol, 5565251881Speter svn_client_ctx_t *ctx, 5566251881Speter apr_pool_t *pool); 5567251881Speter 5568251881Speter 5569251881Speter/** 5570251881Speter * Similar to svn_client_export4(), but with @a depth set according to 5571251881Speter * @a recurse: if @a recurse is TRUE, set @a depth to 5572251881Speter * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to 5573251881Speter * #svn_depth_files. 5574251881Speter * 5575251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 5576251881Speter * 5577251881Speter * @since New in 1.2. 5578251881Speter */ 5579251881SpeterSVN_DEPRECATED 5580251881Spetersvn_error_t * 5581251881Spetersvn_client_export3(svn_revnum_t *result_rev, 5582251881Speter const char *from_path_or_url, 5583251881Speter const char *to_path, 5584251881Speter const svn_opt_revision_t *peg_revision, 5585251881Speter const svn_opt_revision_t *revision, 5586251881Speter svn_boolean_t overwrite, 5587251881Speter svn_boolean_t ignore_externals, 5588251881Speter svn_boolean_t recurse, 5589251881Speter const char *native_eol, 5590251881Speter svn_client_ctx_t *ctx, 5591251881Speter apr_pool_t *pool); 5592251881Speter 5593251881Speter 5594251881Speter/** 5595251881Speter * Similar to svn_client_export3(), but with @a peg_revision 5596251881Speter * always set to #svn_opt_revision_unspecified, @a overwrite set to 5597251881Speter * the value of @a force, @a ignore_externals always FALSE, and 5598251881Speter * @a recurse always TRUE. 5599251881Speter * 5600251881Speter * @since New in 1.1. 5601251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 5602251881Speter */ 5603251881SpeterSVN_DEPRECATED 5604251881Spetersvn_error_t * 5605251881Spetersvn_client_export2(svn_revnum_t *result_rev, 5606251881Speter const char *from_path_or_url, 5607251881Speter const char *to_path, 5608251881Speter svn_opt_revision_t *revision, 5609251881Speter svn_boolean_t force, 5610251881Speter const char *native_eol, 5611251881Speter svn_client_ctx_t *ctx, 5612251881Speter apr_pool_t *pool); 5613251881Speter 5614251881Speter 5615251881Speter/** 5616251881Speter * Similar to svn_client_export2(), but with @a native_eol always set 5617251881Speter * to NULL. 5618251881Speter * 5619251881Speter * @deprecated Provided for backward compatibility with the 1.0 API. 5620251881Speter */ 5621251881SpeterSVN_DEPRECATED 5622251881Spetersvn_error_t * 5623251881Spetersvn_client_export(svn_revnum_t *result_rev, 5624251881Speter const char *from_path_or_url, 5625251881Speter const char *to_path, 5626251881Speter svn_opt_revision_t *revision, 5627251881Speter svn_boolean_t force, 5628251881Speter svn_client_ctx_t *ctx, 5629251881Speter apr_pool_t *pool); 5630251881Speter 5631251881Speter/** @} */ 5632251881Speter 5633251881Speter/** 5634251881Speter * @defgroup List List / ls 5635251881Speter * 5636251881Speter * @{ 5637251881Speter */ 5638251881Speter 5639251881Speter/** The type of function invoked by svn_client_list3() to report the details 5640251881Speter * of each directory entry being listed. 5641251881Speter * 5642251881Speter * @a baton is the baton that was passed to the caller. @a path is the 5643251881Speter * entry's path relative to @a abs_path; it is the empty path when reporting 5644251881Speter * the top node of the list operation. @a dirent contains some or all of 5645251881Speter * the directory entry's details, as determined by the caller. @a lock is 5646251881Speter * the entry's lock, if it is locked and if lock information is being 5647251881Speter * reported by the caller; otherwise @a lock is NULL. @a abs_path is the 5648251881Speter * repository path of the top node of the list operation; it is relative to 5649251881Speter * the repository root and begins with "/". 5650251881Speter * 5651251881Speter * If svn_client_list3() was called with @a include_externals set to TRUE, 5652251881Speter * @a external_parent_url and @a external_target will be set. 5653251881Speter * @a external_parent_url is url of the directory which has the 5654251881Speter * externals definitions. @a external_target is the target subdirectory of 5655251881Speter * externals definitions which is relative to the parent directory that holds 5656251881Speter * the external item. 5657251881Speter * 5658251881Speter * If external_parent_url and external_target are defined, the item being 5659251881Speter * listed is part of the external described by external_parent_url and 5660251881Speter * external_target. Else, the item is not part of any external. 5661251881Speter * Moreover, we will never mix items which are part of separate 5662251881Speter * externals, and will always finish listing an external before listing 5663251881Speter * the next one. 5664251881Speter * 5665251881Speter * @a scratch_pool may be used for temporary allocations. 5666251881Speter * 5667251881Speter * @since New in 1.8. 5668251881Speter */ 5669251881Spetertypedef svn_error_t *(*svn_client_list_func2_t)( 5670251881Speter void *baton, 5671251881Speter const char *path, 5672251881Speter const svn_dirent_t *dirent, 5673251881Speter const svn_lock_t *lock, 5674251881Speter const char *abs_path, 5675251881Speter const char *external_parent_url, 5676251881Speter const char *external_target, 5677251881Speter apr_pool_t *scratch_pool); 5678251881Speter 5679251881Speter/** 5680251881Speter * Similar to #svn_client_list_func2_t, but without any information about 5681251881Speter * externals definitions. 5682251881Speter * 5683251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 5684251881Speter * 5685251881Speter * @since New in 1.4 5686251881Speter * 5687251881Speter * */ 5688251881Spetertypedef svn_error_t *(*svn_client_list_func_t)(void *baton, 5689251881Speter const char *path, 5690251881Speter const svn_dirent_t *dirent, 5691251881Speter const svn_lock_t *lock, 5692251881Speter const char *abs_path, 5693251881Speter apr_pool_t *pool); 5694251881Speter 5695251881Speter/** 5696251881Speter * Report the directory entry, and possibly children, for @a 5697251881Speter * path_or_url at @a revision. The actual node revision selected is 5698251881Speter * determined by the path as it exists in @a peg_revision. If @a 5699251881Speter * peg_revision->kind is #svn_opt_revision_unspecified, then it defaults 5700251881Speter * to #svn_opt_revision_head for URLs or #svn_opt_revision_working 5701251881Speter * for WC targets. 5702251881Speter * 5703251881Speter * Report directory entries by invoking @a list_func/@a baton with @a path 5704251881Speter * relative to @a path_or_url. The dirent for @a path_or_url is reported 5705251881Speter * using an empty @a path. If @a path_or_url is a directory, also report 5706251881Speter * its children. If @a path_or_url is non-existent, return 5707251881Speter * #SVN_ERR_FS_NOT_FOUND. 5708251881Speter * 5709251881Speter * If @a fetch_locks is TRUE, include locks when reporting directory entries. 5710251881Speter * 5711251881Speter * If @a include_externals is TRUE, also list all external items 5712251881Speter * reached by recursion. @a depth value passed to the original list target 5713251881Speter * applies for the externals also. 5714251881Speter * 5715251881Speter * Use @a pool for temporary allocations. 5716251881Speter * 5717251881Speter * Use authentication baton cached in @a ctx to authenticate against the 5718251881Speter * repository. 5719251881Speter * 5720251881Speter * If @a depth is #svn_depth_empty, list just @a path_or_url itself. 5721251881Speter * If @a depth is #svn_depth_files, list @a path_or_url and its file 5722251881Speter * entries. If #svn_depth_immediates, list its immediate file and 5723251881Speter * directory entries. If #svn_depth_infinity, list file entries and 5724251881Speter * recurse (with #svn_depth_infinity) on directory entries. 5725251881Speter * 5726251881Speter * @a dirent_fields controls which fields in the #svn_dirent_t's are 5727251881Speter * filled in. To have them totally filled in use #SVN_DIRENT_ALL, 5728251881Speter * otherwise simply bitwise OR together the combination of @c SVN_DIRENT_ 5729251881Speter * fields you care about. 5730251881Speter * 5731251881Speter * @since New in 1.8. 5732251881Speter */ 5733251881Spetersvn_error_t * 5734251881Spetersvn_client_list3(const char *path_or_url, 5735251881Speter const svn_opt_revision_t *peg_revision, 5736251881Speter const svn_opt_revision_t *revision, 5737251881Speter svn_depth_t depth, 5738251881Speter apr_uint32_t dirent_fields, 5739251881Speter svn_boolean_t fetch_locks, 5740251881Speter svn_boolean_t include_externals, 5741251881Speter svn_client_list_func2_t list_func, 5742251881Speter void *baton, 5743251881Speter svn_client_ctx_t *ctx, 5744251881Speter apr_pool_t *pool); 5745251881Speter 5746251881Speter 5747251881Speter/** Similar to svn_client_list3(), but with @a include_externals set 5748251881Speter * to FALSE, and using a #svn_client_list_func_t as callback. 5749251881Speter * 5750251881Speter * @deprecated Provided for backwards compatibility with the 1.7 API. 5751251881Speter * 5752251881Speter * @since New in 1.5. 5753251881Speter */ 5754251881SpeterSVN_DEPRECATED 5755251881Spetersvn_error_t * 5756251881Spetersvn_client_list2(const char *path_or_url, 5757251881Speter const svn_opt_revision_t *peg_revision, 5758251881Speter const svn_opt_revision_t *revision, 5759251881Speter svn_depth_t depth, 5760251881Speter apr_uint32_t dirent_fields, 5761251881Speter svn_boolean_t fetch_locks, 5762251881Speter svn_client_list_func_t list_func, 5763251881Speter void *baton, 5764251881Speter svn_client_ctx_t *ctx, 5765251881Speter apr_pool_t *pool); 5766251881Speter 5767251881Speter/** 5768251881Speter * Similar to svn_client_list2(), but with @a recurse instead of @a depth. 5769251881Speter * If @a recurse is TRUE, pass #svn_depth_files for @a depth; else 5770251881Speter * pass #svn_depth_infinity. 5771251881Speter * 5772251881Speter * @since New in 1.4. 5773251881Speter * 5774251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 5775251881Speter */ 5776251881SpeterSVN_DEPRECATED 5777251881Spetersvn_error_t * 5778251881Spetersvn_client_list(const char *path_or_url, 5779251881Speter const svn_opt_revision_t *peg_revision, 5780251881Speter const svn_opt_revision_t *revision, 5781251881Speter svn_boolean_t recurse, 5782251881Speter apr_uint32_t dirent_fields, 5783251881Speter svn_boolean_t fetch_locks, 5784251881Speter svn_client_list_func_t list_func, 5785251881Speter void *baton, 5786251881Speter svn_client_ctx_t *ctx, 5787251881Speter apr_pool_t *pool); 5788251881Speter 5789251881Speter/** 5790251881Speter * Same as svn_client_list(), but always passes #SVN_DIRENT_ALL for 5791251881Speter * the @a dirent_fields argument and returns all information in two 5792251881Speter * hash tables instead of invoking a callback. 5793251881Speter * 5794251881Speter * Set @a *dirents to a newly allocated hash of directory entries. 5795251881Speter * The @a dirents hash maps entry names (<tt>const char *</tt>) to 5796251881Speter * #svn_dirent_t *'s. 5797251881Speter * 5798251881Speter * If @a locks is not @c NULL, set @a *locks to a hash table mapping 5799251881Speter * entry names (<tt>const char *</tt>) to #svn_lock_t *'s. 5800251881Speter * 5801251881Speter * @since New in 1.3. 5802251881Speter * 5803251881Speter * @deprecated Provided for backward compatibility with the 1.3 API. 5804251881Speter * Use svn_client_list2() instead. 5805251881Speter */ 5806251881SpeterSVN_DEPRECATED 5807251881Spetersvn_error_t * 5808251881Spetersvn_client_ls3(apr_hash_t **dirents, 5809251881Speter apr_hash_t **locks, 5810251881Speter const char *path_or_url, 5811251881Speter const svn_opt_revision_t *peg_revision, 5812251881Speter const svn_opt_revision_t *revision, 5813251881Speter svn_boolean_t recurse, 5814251881Speter svn_client_ctx_t *ctx, 5815251881Speter apr_pool_t *pool); 5816251881Speter 5817251881Speter/** 5818251881Speter * Same as svn_client_ls3(), but without the ability to get locks. 5819251881Speter * 5820251881Speter * @since New in 1.2. 5821251881Speter * 5822251881Speter * @deprecated Provided for backward compatibility with the 1.2 API. 5823251881Speter * Use svn_client_list2() instead. 5824251881Speter */ 5825251881SpeterSVN_DEPRECATED 5826251881Spetersvn_error_t * 5827251881Spetersvn_client_ls2(apr_hash_t **dirents, 5828251881Speter const char *path_or_url, 5829251881Speter const svn_opt_revision_t *peg_revision, 5830251881Speter const svn_opt_revision_t *revision, 5831251881Speter svn_boolean_t recurse, 5832251881Speter svn_client_ctx_t *ctx, 5833251881Speter apr_pool_t *pool); 5834251881Speter 5835251881Speter/** 5836251881Speter * Similar to svn_client_ls2() except that @a peg_revision is always 5837251881Speter * the same as @a revision. 5838251881Speter * 5839251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 5840251881Speter * Use svn_client_list2() instead. 5841251881Speter */ 5842251881SpeterSVN_DEPRECATED 5843251881Spetersvn_error_t * 5844251881Spetersvn_client_ls(apr_hash_t **dirents, 5845251881Speter const char *path_or_url, 5846251881Speter svn_opt_revision_t *revision, 5847251881Speter svn_boolean_t recurse, 5848251881Speter svn_client_ctx_t *ctx, 5849251881Speter apr_pool_t *pool); 5850251881Speter 5851251881Speter 5852251881Speter/** @} */ 5853251881Speter 5854251881Speter/** 5855251881Speter * @defgroup Cat View the contents of a file in the repository. 5856251881Speter * 5857251881Speter * @{ 5858251881Speter */ 5859251881Speter 5860251881Speter/** 5861251881Speter * Output the content of a file. 5862251881Speter * 5863289180Speter * @param[out] props Optional output argument to obtain properties. 5864289180Speter * @param[in] out The stream to which the content will be written. 5865289180Speter * @param[in] path_or_url The path or URL of the file. 5866289180Speter * @param[in] peg_revision The peg revision. 5867289180Speter * @param[in] revision The operative revision. 5868289180Speter * @param[in] expand_keywords When true, keywords (when set) are expanded. 5869251881Speter * @param[in] ctx The standard client context, used for possible 5870251881Speter * authentication. 5871251881Speter * 5872251881Speter * @return A pointer to an #svn_error_t of the type (this list is not 5873251881Speter * exhaustive): <br> 5874251881Speter * An unspecified error if @a revision is of kind 5875251881Speter * #svn_opt_revision_previous (or some other kind that requires 5876251881Speter * a local path), because the desired revision cannot be 5877251881Speter * determined. <br> 5878251881Speter * If no error occurred, return #SVN_NO_ERROR. 5879251881Speter * 5880289180Speter * If @a *props is not NULL it is set to a hash of all the file's 5881289180Speter * non-inherited properties. If it is NULL, the properties are only 5882289180Speter * used for determining how and if the file should be translated. 5883251881Speter * 5884251881Speter * @see #svn_client_ctx_t <br> @ref clnt_revisions for 5885251881Speter * a discussion of operative and peg revisions. 5886289180Speter * 5887289180Speter * @since New in 1.9. 5888251881Speter */ 5889251881Spetersvn_error_t * 5890289180Spetersvn_client_cat3(apr_hash_t **props, 5891289180Speter svn_stream_t *out, 5892289180Speter const char *path_or_url, 5893289180Speter const svn_opt_revision_t *peg_revision, 5894289180Speter const svn_opt_revision_t *revision, 5895289180Speter svn_boolean_t expand_keywords, 5896289180Speter svn_client_ctx_t *ctx, 5897289180Speter apr_pool_t *result_pool, 5898289180Speter apr_pool_t *scratch_pool); 5899289180Speter 5900289180Speter/** 5901289180Speter * Similar to svn_client_cat3() except without the option of directly 5902289180Speter * reading the properties, and with @a expand_keywords always TRUE. 5903289180Speter * 5904289180Speter * @since New in 1.2. 5905289180Speter * @deprecated Provided for backward compatibility with the 1.8 API. 5906289180Speter */ 5907289180SpeterSVN_DEPRECATED 5908289180Spetersvn_error_t * 5909251881Spetersvn_client_cat2(svn_stream_t *out, 5910251881Speter const char *path_or_url, 5911251881Speter const svn_opt_revision_t *peg_revision, 5912251881Speter const svn_opt_revision_t *revision, 5913251881Speter svn_client_ctx_t *ctx, 5914251881Speter apr_pool_t *pool); 5915251881Speter 5916251881Speter 5917251881Speter/** 5918251881Speter * Similar to svn_client_cat2() except that the peg revision is always 5919251881Speter * the same as @a revision. 5920251881Speter * 5921251881Speter * @deprecated Provided for backward compatibility with the 1.1 API. 5922251881Speter */ 5923251881SpeterSVN_DEPRECATED 5924251881Spetersvn_error_t * 5925251881Spetersvn_client_cat(svn_stream_t *out, 5926251881Speter const char *path_or_url, 5927251881Speter const svn_opt_revision_t *revision, 5928251881Speter svn_client_ctx_t *ctx, 5929251881Speter apr_pool_t *pool); 5930251881Speter 5931251881Speter/** @} end group: cat */ 5932251881Speter 5933251881Speter 5934251881Speter 5935251881Speter/** Changelist commands 5936251881Speter * 5937251881Speter * @defgroup svn_client_changelist_funcs Client Changelist Functions 5938251881Speter * @{ 5939251881Speter */ 5940251881Speter 5941251881Speter/** Implementation note: 5942251881Speter * 5943251881Speter * For now, changelists are implemented by scattering the 5944251881Speter * associations across multiple .svn/entries files in a working copy. 5945251881Speter * However, this client API was written so that we have the option of 5946251881Speter * changing the underlying implementation -- we may someday want to 5947251881Speter * store changelist definitions in a centralized database. 5948251881Speter */ 5949251881Speter 5950251881Speter/** 5951251881Speter * Add each path in @a paths (recursing to @a depth as necessary) to 5952251881Speter * @a changelist. If a path is already a member of another 5953251881Speter * changelist, then remove it from the other changelist and add it to 5954251881Speter * @a changelist. (For now, a path cannot belong to two changelists 5955251881Speter * at once.) 5956251881Speter * 5957251881Speter * @a paths is an array of (const char *) local WC paths. 5958251881Speter * 5959251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 5960251881Speter * names, used as a restrictive filter on items whose changelist 5961251881Speter * assignments are adjusted; that is, don't tweak the changeset of any 5962251881Speter * item unless it's currently a member of one of those changelists. 5963251881Speter * If @a changelists is empty (or altogether @c NULL), no changelist 5964251881Speter * filtering occurs. 5965251881Speter * 5966251881Speter * @note This metadata is purely a client-side "bookkeeping" 5967251881Speter * convenience, and is entirely managed by the working copy. 5968251881Speter * 5969251881Speter * @since New in 1.5. 5970251881Speter */ 5971251881Spetersvn_error_t * 5972251881Spetersvn_client_add_to_changelist(const apr_array_header_t *paths, 5973251881Speter const char *changelist, 5974251881Speter svn_depth_t depth, 5975251881Speter const apr_array_header_t *changelists, 5976251881Speter svn_client_ctx_t *ctx, 5977251881Speter apr_pool_t *pool); 5978251881Speter 5979251881Speter/** 5980251881Speter * Remove each path in @a paths (recursing to @a depth as necessary) 5981251881Speter * from changelists to which they are currently assigned. 5982251881Speter * 5983251881Speter * @a paths is an array of (const char *) local WC paths. 5984251881Speter * 5985251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 5986251881Speter * names, used as a restrictive filter on items whose changelist 5987251881Speter * assignments are removed; that is, don't remove from a changeset any 5988251881Speter * item unless it's currently a member of one of those changelists. 5989251881Speter * If @a changelists is empty (or altogether @c NULL), all changelist 5990251881Speter * assignments in and under each path in @a paths (to @a depth) will 5991251881Speter * be removed. 5992251881Speter * 5993251881Speter * @note This metadata is purely a client-side "bookkeeping" 5994251881Speter * convenience, and is entirely managed by the working copy. 5995251881Speter * 5996251881Speter * @since New in 1.5. 5997251881Speter */ 5998251881Spetersvn_error_t * 5999251881Spetersvn_client_remove_from_changelists(const apr_array_header_t *paths, 6000251881Speter svn_depth_t depth, 6001251881Speter const apr_array_header_t *changelists, 6002251881Speter svn_client_ctx_t *ctx, 6003251881Speter apr_pool_t *pool); 6004251881Speter 6005251881Speter 6006251881Speter/** 6007251881Speter * Beginning at @a path, crawl to @a depth to discover every path in 6008251881Speter * or under @a path which belongs to one of the changelists in @a 6009251881Speter * changelists (an array of <tt>const char *</tt> changelist names). 6010251881Speter * If @a changelists is @c NULL, discover paths with any changelist. 6011251881Speter * Call @a callback_func (with @a callback_baton) each time a 6012251881Speter * changelist-having path is discovered. 6013251881Speter * 6014251881Speter * @a path is a local WC path. 6015251881Speter * 6016251881Speter * If @a ctx->cancel_func is not @c NULL, invoke it passing @a 6017251881Speter * ctx->cancel_baton during the recursive walk. 6018251881Speter * 6019251881Speter * @since New in 1.5. 6020251881Speter */ 6021251881Spetersvn_error_t * 6022251881Spetersvn_client_get_changelists(const char *path, 6023251881Speter const apr_array_header_t *changelists, 6024251881Speter svn_depth_t depth, 6025251881Speter svn_changelist_receiver_t callback_func, 6026251881Speter void *callback_baton, 6027251881Speter svn_client_ctx_t *ctx, 6028251881Speter apr_pool_t *pool); 6029251881Speter 6030251881Speter/** @} */ 6031251881Speter 6032251881Speter 6033251881Speter 6034251881Speter/** Locking commands 6035251881Speter * 6036251881Speter * @defgroup svn_client_locking_funcs Client Locking Functions 6037251881Speter * @{ 6038251881Speter */ 6039251881Speter 6040251881Speter/** 6041251881Speter * Lock @a targets in the repository. @a targets is an array of 6042251881Speter * <tt>const char *</tt> paths - either all working copy paths or all URLs. 6043251881Speter * All targets must be in the same repository. 6044251881Speter * 6045251881Speter * If a target is already locked in the repository, no lock will be 6046251881Speter * acquired unless @a steal_lock is TRUE, in which case the locks are 6047251881Speter * stolen. @a comment, if non-NULL, is an xml-escapable description 6048251881Speter * stored with each lock in the repository. Each acquired lock will 6049251881Speter * be stored in the working copy if the targets are WC paths. 6050251881Speter * 6051251881Speter * For each target @a ctx->notify_func2/notify_baton2 will be used to indicate 6052251881Speter * whether it was locked. An action of #svn_wc_notify_locked 6053251881Speter * means that the path was locked. If the path was not locked because 6054251881Speter * it was out of date or there was already a lock in the repository, 6055251881Speter * the notification function will be called with 6056251881Speter * #svn_wc_notify_failed_lock, and the error passed in the notification 6057251881Speter * structure. 6058251881Speter * 6059251881Speter * Use @a pool for temporary allocations. 6060251881Speter * 6061251881Speter * @since New in 1.2. 6062251881Speter */ 6063251881Spetersvn_error_t * 6064251881Spetersvn_client_lock(const apr_array_header_t *targets, 6065251881Speter const char *comment, 6066251881Speter svn_boolean_t steal_lock, 6067251881Speter svn_client_ctx_t *ctx, 6068251881Speter apr_pool_t *pool); 6069251881Speter 6070251881Speter/** 6071251881Speter * Unlock @a targets in the repository. @a targets is an array of 6072251881Speter * <tt>const char *</tt> paths - either all working copy paths or all URLs. 6073251881Speter * All targets must be in the same repository. 6074251881Speter * 6075251881Speter * If the targets are WC paths, and @a break_lock is FALSE, the working 6076251881Speter * copy must contain a lock for each target. 6077251881Speter * If this is not the case, or the working copy lock doesn't match the 6078251881Speter * lock token in the repository, an error will be signaled. 6079251881Speter * 6080251881Speter * If the targets are URLs, the locks may be broken even if @a break_lock 6081251881Speter * is FALSE, but only if the lock owner is the same as the 6082251881Speter * authenticated user. 6083251881Speter * 6084251881Speter * If @a break_lock is TRUE, the locks will be broken in the 6085251881Speter * repository. In both cases, the locks, if any, will be removed from 6086251881Speter * the working copy if the targets are WC paths. 6087251881Speter * 6088251881Speter * The notification functions in @a ctx will be called for each 6089251881Speter * target. If the target was successfully unlocked, 6090251881Speter * #svn_wc_notify_unlocked will be used. Else, if the error is 6091251881Speter * directly related to unlocking the path (see 6092251881Speter * #SVN_ERR_IS_UNLOCK_ERROR), #svn_wc_notify_failed_unlock will be 6093251881Speter * used and the error will be passed in the notification structure. 6094251881Speter 6095251881Speter * Use @a pool for temporary allocations. 6096251881Speter * 6097251881Speter * @since New in 1.2. 6098251881Speter */ 6099251881Spetersvn_error_t * 6100251881Spetersvn_client_unlock(const apr_array_header_t *targets, 6101251881Speter svn_boolean_t break_lock, 6102251881Speter svn_client_ctx_t *ctx, 6103251881Speter apr_pool_t *pool); 6104251881Speter 6105251881Speter/** @} */ 6106251881Speter 6107251881Speter/** 6108251881Speter * @defgroup Info Show repository information about a working copy. 6109251881Speter * 6110251881Speter * @{ 6111251881Speter */ 6112251881Speter 6113251881Speter/** The size of the file is unknown. 6114251881Speter * Used as value in fields of type @c apr_size_t in #svn_info_t. 6115251881Speter * 6116251881Speter * @since New in 1.5 6117251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 6118251881Speter */ 6119251881Speter#define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1) 6120251881Speter 6121251881Speter/** 6122251881Speter * A structure which describes various system-generated metadata about 6123251881Speter * a working-copy path or URL. 6124251881Speter * 6125251881Speter * @note Fields may be added to the end of this structure in future 6126251881Speter * versions. Therefore, users shouldn't allocate structures of this 6127251881Speter * type, to preserve binary compatibility. 6128251881Speter * 6129251881Speter * @since New in 1.2. 6130251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. The new 6131251881Speter * API is #svn_client_info2_t. 6132251881Speter */ 6133251881Spetertypedef struct svn_info_t 6134251881Speter{ 6135251881Speter /** Where the item lives in the repository. */ 6136251881Speter const char *URL; 6137251881Speter 6138251881Speter /** The revision of the object. If path_or_url is a working-copy 6139251881Speter * path, then this is its current working revnum. If path_or_url 6140251881Speter * is a URL, then this is the repos revision that path_or_url lives in. */ 6141251881Speter svn_revnum_t rev; 6142251881Speter 6143251881Speter /** The node's kind. */ 6144251881Speter svn_node_kind_t kind; 6145251881Speter 6146251881Speter /** The root URL of the repository. */ 6147251881Speter const char *repos_root_URL; 6148251881Speter 6149251881Speter /** The repository's UUID. */ 6150251881Speter const char *repos_UUID; 6151251881Speter 6152251881Speter /** The last revision in which this object changed. */ 6153251881Speter svn_revnum_t last_changed_rev; 6154251881Speter 6155251881Speter /** The date of the last_changed_rev. */ 6156251881Speter apr_time_t last_changed_date; 6157251881Speter 6158251881Speter /** The author of the last_changed_rev. */ 6159251881Speter const char *last_changed_author; 6160251881Speter 6161251881Speter /** An exclusive lock, if present. Could be either local or remote. */ 6162251881Speter svn_lock_t *lock; 6163251881Speter 6164251881Speter /** Whether or not to ignore the next 10 wc-specific fields. */ 6165251881Speter svn_boolean_t has_wc_info; 6166251881Speter 6167251881Speter /** 6168251881Speter * @name Working-copy path fields 6169251881Speter * These things only apply to a working-copy path. 6170251881Speter * See svn_wc_entry_t for explanations. 6171251881Speter * @{ 6172251881Speter */ 6173251881Speter svn_wc_schedule_t schedule; 6174251881Speter const char *copyfrom_url; 6175251881Speter svn_revnum_t copyfrom_rev; 6176251881Speter apr_time_t text_time; 6177251881Speter apr_time_t prop_time; /* will always be 0 for svn 1.4 and later */ 6178251881Speter const char *checksum; 6179251881Speter const char *conflict_old; 6180251881Speter const char *conflict_new; 6181251881Speter const char *conflict_wrk; 6182251881Speter const char *prejfile; 6183251881Speter /** @since New in 1.5. */ 6184251881Speter const char *changelist; 6185251881Speter /** @since New in 1.5. */ 6186251881Speter svn_depth_t depth; 6187251881Speter 6188251881Speter /** 6189251881Speter * Similar to working_size64, but will be #SVN_INFO_SIZE_UNKNOWN when 6190251881Speter * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte). 6191251881Speter * 6192251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 6193251881Speter */ 6194251881Speter apr_size_t working_size; 6195251881Speter 6196251881Speter /** @} */ 6197251881Speter 6198251881Speter /** 6199251881Speter * Similar to size64, but size will be #SVN_INFO_SIZE_UNKNOWN when 6200251881Speter * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte). 6201251881Speter * 6202251881Speter * @deprecated Provided for backward compatibility with the 1.5 API. 6203251881Speter */ 6204251881Speter apr_size_t size; 6205251881Speter 6206251881Speter /** 6207251881Speter * The size of the file in the repository (untranslated, 6208251881Speter * e.g. without adjustment of line endings and keyword 6209251881Speter * expansion). Only applicable for file -- not directory -- URLs. 6210251881Speter * For working copy paths, size64 will be #SVN_INVALID_FILESIZE. 6211251881Speter * @since New in 1.6. 6212251881Speter */ 6213251881Speter svn_filesize_t size64; 6214251881Speter 6215251881Speter /** 6216251881Speter * The size of the file after being translated into its local 6217251881Speter * representation, or #SVN_INVALID_FILESIZE if unknown. 6218251881Speter * Not applicable for directories. 6219251881Speter * @since New in 1.6. 6220251881Speter * @name Working-copy path fields 6221251881Speter * @{ 6222251881Speter */ 6223251881Speter svn_filesize_t working_size64; 6224251881Speter 6225251881Speter /** 6226251881Speter * Info on any tree conflict of which this node is a victim. Otherwise NULL. 6227251881Speter * @since New in 1.6. 6228251881Speter */ 6229251881Speter svn_wc_conflict_description_t *tree_conflict; 6230251881Speter 6231251881Speter /** @} */ 6232251881Speter 6233251881Speter} svn_info_t; 6234251881Speter 6235251881Speter 6236251881Speter/** 6237251881Speter * The callback invoked by svn_client_info2(). Each invocation 6238251881Speter * describes @a path with the information present in @a info. Note 6239251881Speter * that any fields within @a info may be NULL if information is 6240251881Speter * unavailable. Use @a pool for all temporary allocation. 6241251881Speter * 6242251881Speter * @since New in 1.2. 6243251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. The new 6244251881Speter * API is #svn_client_info_receiver2_t. 6245251881Speter */ 6246251881Spetertypedef svn_error_t *(*svn_info_receiver_t)( 6247251881Speter void *baton, 6248251881Speter const char *path, 6249251881Speter const svn_info_t *info, 6250251881Speter apr_pool_t *pool); 6251251881Speter 6252251881Speter/** 6253251881Speter * Return a duplicate of @a info, allocated in @a pool. No part of the new 6254251881Speter * structure will be shared with @a info. 6255251881Speter * 6256251881Speter * @since New in 1.3. 6257251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. The new 6258251881Speter * API is #svn_client_info2_dup(). 6259251881Speter */ 6260251881SpeterSVN_DEPRECATED 6261251881Spetersvn_info_t * 6262251881Spetersvn_info_dup(const svn_info_t *info, 6263251881Speter apr_pool_t *pool); 6264251881Speter 6265251881Speter/** 6266251881Speter * A structure which describes various system-generated metadata about 6267251881Speter * a working-copy path or URL. 6268251881Speter * 6269251881Speter * @note Fields may be added to the end of this structure in future 6270251881Speter * versions. Therefore, users shouldn't allocate structures of this 6271251881Speter * type, to preserve binary compatibility. 6272251881Speter * 6273251881Speter * @since New in 1.7. 6274251881Speter */ 6275251881Spetertypedef struct svn_client_info2_t 6276251881Speter{ 6277251881Speter /** Where the item lives in the repository. */ 6278251881Speter const char *URL; 6279251881Speter 6280251881Speter /** The revision of the object. If the target is a working-copy 6281251881Speter * path, then this is its current working revnum. If the target 6282251881Speter * is a URL, then this is the repos revision that it lives in. */ 6283251881Speter svn_revnum_t rev; 6284251881Speter 6285251881Speter /** The root URL of the repository. */ 6286251881Speter const char *repos_root_URL; 6287251881Speter 6288251881Speter /** The repository's UUID. */ 6289251881Speter const char *repos_UUID; 6290251881Speter 6291251881Speter /** The node's kind. */ 6292251881Speter svn_node_kind_t kind; 6293251881Speter 6294251881Speter /** The size of the file in the repository (untranslated, 6295251881Speter * e.g. without adjustment of line endings and keyword 6296251881Speter * expansion). Only applicable for file -- not directory -- URLs. 6297251881Speter * For working copy paths, @a size will be #SVN_INVALID_FILESIZE. */ 6298251881Speter svn_filesize_t size; 6299251881Speter 6300251881Speter /** The last revision in which this object changed. */ 6301251881Speter svn_revnum_t last_changed_rev; 6302251881Speter 6303251881Speter /** The date of the last_changed_rev. */ 6304251881Speter apr_time_t last_changed_date; 6305251881Speter 6306251881Speter /** The author of the last_changed_rev. */ 6307251881Speter const char *last_changed_author; 6308251881Speter 6309251881Speter /** An exclusive lock, if present. Could be either local or remote. */ 6310251881Speter const svn_lock_t *lock; 6311251881Speter 6312251881Speter /** Possible information about the working copy, NULL if not valid. */ 6313251881Speter const svn_wc_info_t *wc_info; 6314251881Speter 6315251881Speter} svn_client_info2_t; 6316251881Speter 6317251881Speter/** 6318251881Speter * Return a duplicate of @a info, allocated in @a pool. No part of the new 6319251881Speter * structure will be shared with @a info. 6320251881Speter * 6321251881Speter * @since New in 1.7. 6322251881Speter */ 6323251881Spetersvn_client_info2_t * 6324251881Spetersvn_client_info2_dup(const svn_client_info2_t *info, 6325251881Speter apr_pool_t *pool); 6326251881Speter 6327251881Speter/** 6328251881Speter * The callback invoked by info retrievers. Each invocation 6329251881Speter * describes @a abspath_or_url with the information present in @a info. 6330251881Speter * Use @a scratch_pool for all temporary allocation. 6331251881Speter * 6332251881Speter * @since New in 1.7. 6333251881Speter */ 6334251881Spetertypedef svn_error_t *(*svn_client_info_receiver2_t)( 6335251881Speter void *baton, 6336251881Speter const char *abspath_or_url, 6337251881Speter const svn_client_info2_t *info, 6338251881Speter apr_pool_t *scratch_pool); 6339251881Speter 6340251881Speter/** 6341251881Speter * Invoke @a receiver with @a receiver_baton to return information 6342251881Speter * about @a abspath_or_url in @a revision. The information returned is 6343251881Speter * system-generated metadata, not the sort of "property" metadata 6344251881Speter * created by users. See #svn_client_info2_t. 6345251881Speter * 6346251881Speter * If both revision arguments are either #svn_opt_revision_unspecified 6347251881Speter * or @c NULL, then information will be pulled solely from the working copy; 6348251881Speter * no network connections will be made. 6349251881Speter * 6350251881Speter * Otherwise, information will be pulled from a repository. The 6351251881Speter * actual node revision selected is determined by the @a abspath_or_url 6352251881Speter * as it exists in @a peg_revision. If @a peg_revision->kind is 6353251881Speter * #svn_opt_revision_unspecified, then it defaults to 6354251881Speter * #svn_opt_revision_head for URLs or #svn_opt_revision_working for 6355251881Speter * WC targets. 6356251881Speter * 6357251881Speter * If @a abspath_or_url is not a local path, then if @a revision is of 6358251881Speter * kind #svn_opt_revision_previous (or some other kind that requires 6359251881Speter * a local path), an error will be returned, because the desired 6360251881Speter * revision cannot be determined. 6361251881Speter * 6362251881Speter * Use the authentication baton cached in @a ctx to authenticate 6363251881Speter * against the repository. 6364251881Speter * 6365251881Speter * If @a abspath_or_url is a file, just invoke @a receiver on it. If it 6366251881Speter * is a directory, then descend according to @a depth. If @a depth is 6367251881Speter * #svn_depth_empty, invoke @a receiver on @a abspath_or_url and 6368251881Speter * nothing else; if #svn_depth_files, on @a abspath_or_url and its 6369251881Speter * immediate file children; if #svn_depth_immediates, the preceding 6370251881Speter * plus on each immediate subdirectory; if #svn_depth_infinity, then 6371251881Speter * recurse fully, invoking @a receiver on @a abspath_or_url and 6372251881Speter * everything beneath it. 6373251881Speter * 6374251881Speter * If @a fetch_excluded is TRUE, also also send excluded nodes in the working 6375251881Speter * copy to @a receiver, otherwise these are skipped. If @a fetch_actual_only 6376251881Speter * is TRUE also send nodes that don't exist as versioned but are still 6377251881Speter * tree conflicted. 6378251881Speter * 6379289180Speter * If @a include_externals is @c TRUE, recurse into externals and report about 6380289180Speter * them as well. 6381289180Speter * 6382251881Speter * @a changelists is an array of <tt>const char *</tt> changelist 6383251881Speter * names, used as a restrictive filter on items whose info is 6384251881Speter * reported; that is, don't report info about any item unless 6385251881Speter * it's a member of one of those changelists. If @a changelists is 6386251881Speter * empty (or altogether @c NULL), no changelist filtering occurs. 6387251881Speter * 6388289180Speter * @since New in 1.9. 6389289180Speter */ 6390289180Spetersvn_error_t * 6391289180Spetersvn_client_info4(const char *abspath_or_url, 6392289180Speter const svn_opt_revision_t *peg_revision, 6393289180Speter const svn_opt_revision_t *revision, 6394289180Speter svn_depth_t depth, 6395289180Speter svn_boolean_t fetch_excluded, 6396289180Speter svn_boolean_t fetch_actual_only, 6397289180Speter svn_boolean_t include_externals, 6398289180Speter const apr_array_header_t *changelists, 6399289180Speter svn_client_info_receiver2_t receiver, 6400289180Speter void *receiver_baton, 6401289180Speter svn_client_ctx_t *ctx, 6402289180Speter apr_pool_t *scratch_pool); 6403289180Speter 6404289180Speter 6405289180Speter/** Similar to svn_client_info4, but doesn't support walking externals. 6406289180Speter * 6407251881Speter * @since New in 1.7. 6408289180Speter * @deprecated Provided for backward compatibility with the 1.8 API. 6409251881Speter */ 6410289180SpeterSVN_DEPRECATED 6411251881Spetersvn_error_t * 6412251881Spetersvn_client_info3(const char *abspath_or_url, 6413251881Speter const svn_opt_revision_t *peg_revision, 6414251881Speter const svn_opt_revision_t *revision, 6415251881Speter svn_depth_t depth, 6416251881Speter svn_boolean_t fetch_excluded, 6417251881Speter svn_boolean_t fetch_actual_only, 6418251881Speter const apr_array_header_t *changelists, 6419251881Speter svn_client_info_receiver2_t receiver, 6420251881Speter void *receiver_baton, 6421251881Speter svn_client_ctx_t *ctx, 6422251881Speter apr_pool_t *scratch_pool); 6423251881Speter 6424251881Speter/** Similar to svn_client_info3, but uses an svn_info_receiver_t instead of 6425251881Speter * a #svn_client_info_receiver2_t, and @a path_or_url may be a relative path. 6426251881Speter * 6427251881Speter * @since New in 1.5. 6428251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 6429251881Speter */ 6430251881SpeterSVN_DEPRECATED 6431251881Spetersvn_error_t * 6432251881Spetersvn_client_info2(const char *path_or_url, 6433251881Speter const svn_opt_revision_t *peg_revision, 6434251881Speter const svn_opt_revision_t *revision, 6435251881Speter svn_info_receiver_t receiver, 6436251881Speter void *receiver_baton, 6437251881Speter svn_depth_t depth, 6438251881Speter const apr_array_header_t *changelists, 6439251881Speter svn_client_ctx_t *ctx, 6440251881Speter apr_pool_t *pool); 6441251881Speter 6442251881Speter/** 6443251881Speter * Similar to svn_client_info2() but with @a changelists passed as @c 6444251881Speter * NULL, and @a depth set according to @a recurse: if @a recurse is 6445251881Speter * TRUE, @a depth is #svn_depth_infinity, else #svn_depth_empty. 6446251881Speter * 6447251881Speter * @deprecated Provided for backward compatibility with the 1.4 API. 6448251881Speter */ 6449251881SpeterSVN_DEPRECATED 6450251881Spetersvn_error_t * 6451251881Spetersvn_client_info(const char *path_or_url, 6452251881Speter const svn_opt_revision_t *peg_revision, 6453251881Speter const svn_opt_revision_t *revision, 6454251881Speter svn_info_receiver_t receiver, 6455251881Speter void *receiver_baton, 6456251881Speter svn_boolean_t recurse, 6457251881Speter svn_client_ctx_t *ctx, 6458251881Speter apr_pool_t *pool); 6459251881Speter 6460251881Speter/** 6461251881Speter * Set @a *wcroot_abspath to the local abspath of the root of the 6462251881Speter * working copy in which @a local_abspath resides. 6463251881Speter * 6464251881Speter * @since New in 1.7. 6465251881Speter */ 6466251881Spetersvn_error_t * 6467251881Spetersvn_client_get_wc_root(const char **wcroot_abspath, 6468251881Speter const char *local_abspath, 6469251881Speter svn_client_ctx_t *ctx, 6470251881Speter apr_pool_t *result_pool, 6471251881Speter apr_pool_t *scratch_pool); 6472251881Speter 6473251881Speter/** 6474251881Speter * Set @a *min_revision and @a *max_revision to the lowest and highest 6475251881Speter * revision numbers found within @a local_abspath. If @a committed is 6476251881Speter * TRUE, set @a *min_revision and @a *max_revision to the lowest and 6477251881Speter * highest comitted (i.e. "last changed") revision numbers, 6478251881Speter * respectively. NULL may be passed for either of @a min_revision and 6479251881Speter * @a max_revision to indicate the caller's lack of interest in the 6480251881Speter * value. Use @a scratch_pool for temporary allocations. 6481251881Speter * 6482251881Speter * @since New in 1.7. 6483251881Speter */ 6484251881Spetersvn_error_t * 6485251881Spetersvn_client_min_max_revisions(svn_revnum_t *min_revision, 6486251881Speter svn_revnum_t *max_revision, 6487251881Speter const char *local_abspath, 6488251881Speter svn_boolean_t committed, 6489251881Speter svn_client_ctx_t *ctx, 6490251881Speter apr_pool_t *scratch_pool); 6491251881Speter 6492251881Speter/** @} */ 6493251881Speter 6494251881Speter 6495251881Speter/** 6496251881Speter * @defgroup Patch Apply a patch to the working copy 6497251881Speter * 6498251881Speter * @{ 6499251881Speter */ 6500251881Speter 6501251881Speter/** 6502251881Speter * The callback invoked by svn_client_patch() before attempting to patch 6503251881Speter * the target file at @a canon_path_from_patchfile (the path as parsed from 6504251881Speter * the patch file, but in canonicalized form). The callback can set 6505251881Speter * @a *filtered to @c TRUE to prevent the file from being patched, or else 6506251881Speter * must set it to @c FALSE. 6507251881Speter * 6508251881Speter * The callback is also provided with @a patch_abspath, the path of a 6509251881Speter * temporary file containing the patched result, and with @a reject_abspath, 6510251881Speter * the path to a temporary file containing the diff text of any hunks 6511251881Speter * which were rejected during patching. 6512251881Speter * 6513251881Speter * Because the callback is invoked before the patching attempt is made, 6514251881Speter * there is no guarantee that the target file will actually be patched 6515251881Speter * successfully. Client implementations must pay attention to notification 6516251881Speter * feedback provided by svn_client_patch() to find out which paths were 6517251881Speter * patched successfully. 6518251881Speter * 6519251881Speter * Note also that the files at @a patch_abspath and @a reject_abspath are 6520251881Speter * guaranteed to remain on disk after patching only if the 6521251881Speter * @a remove_tempfiles parameter for svn_client_patch() is @c FALSE. 6522251881Speter * 6523251881Speter * The const char * parameters may be allocated in @a scratch_pool which 6524251881Speter * will be cleared after each invocation. 6525251881Speter * 6526251881Speter * @since New in 1.7. 6527251881Speter */ 6528251881Spetertypedef svn_error_t *(*svn_client_patch_func_t)( 6529251881Speter void *baton, 6530251881Speter svn_boolean_t *filtered, 6531251881Speter const char *canon_path_from_patchfile, 6532251881Speter const char *patch_abspath, 6533251881Speter const char *reject_abspath, 6534251881Speter apr_pool_t *scratch_pool); 6535251881Speter 6536251881Speter/** 6537251881Speter * Apply a unidiff patch that's located at absolute path 6538251881Speter * @a patch_abspath to the working copy directory at @a wc_dir_abspath. 6539251881Speter * 6540251881Speter * This function makes a best-effort attempt at applying the patch. 6541251881Speter * It might skip patch targets which cannot be patched (e.g. targets 6542251881Speter * that are outside of the working copy). It will also reject hunks 6543251881Speter * which cannot be applied to a target in case the hunk's context 6544251881Speter * does not match anywhere in the patch target. 6545251881Speter * 6546251881Speter * If @a dry_run is TRUE, the patching process is carried out, and full 6547251881Speter * notification feedback is provided, but the working copy is not modified. 6548251881Speter * 6549251881Speter * @a strip_count specifies how many leading path components should be 6550251881Speter * stripped from paths obtained from the patch. It is an error if a 6551251881Speter * negative strip count is passed. 6552251881Speter * 6553251881Speter * If @a reverse is @c TRUE, apply patches in reverse, deleting lines 6554251881Speter * the patch would add and adding lines the patch would delete. 6555251881Speter * 6556251881Speter * If @a ignore_whitespace is TRUE, allow patches to be applied if they 6557251881Speter * only differ from the target by whitespace. 6558251881Speter * 6559251881Speter * If @a remove_tempfiles is TRUE, lifetimes of temporary files created 6560251881Speter * during patching will be managed internally. Otherwise, the caller should 6561251881Speter * take ownership of these files, the names of which can be obtained by 6562251881Speter * passing a @a patch_func callback. 6563251881Speter * 6564251881Speter * If @a patch_func is non-NULL, invoke @a patch_func with @a patch_baton 6565251881Speter * for each patch target processed. 6566251881Speter * 6567251881Speter * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with 6568251881Speter * @a ctx->notify_baton2 as patching progresses. 6569251881Speter * 6570251881Speter * If @a ctx->cancel_func is non-NULL, invoke it passing @a 6571251881Speter * ctx->cancel_baton at various places during the operation. 6572251881Speter * 6573251881Speter * Use @a scratch_pool for temporary allocations. 6574251881Speter * 6575251881Speter * @since New in 1.7. 6576251881Speter */ 6577251881Spetersvn_error_t * 6578251881Spetersvn_client_patch(const char *patch_abspath, 6579251881Speter const char *wc_dir_abspath, 6580251881Speter svn_boolean_t dry_run, 6581251881Speter int strip_count, 6582251881Speter svn_boolean_t reverse, 6583251881Speter svn_boolean_t ignore_whitespace, 6584251881Speter svn_boolean_t remove_tempfiles, 6585251881Speter svn_client_patch_func_t patch_func, 6586251881Speter void *patch_baton, 6587251881Speter svn_client_ctx_t *ctx, 6588251881Speter apr_pool_t *scratch_pool); 6589251881Speter 6590251881Speter/** @} */ 6591251881Speter 6592251881Speter/** @} end group: Client working copy management */ 6593251881Speter 6594251881Speter/** 6595251881Speter * 6596251881Speter * @defgroup clnt_sessions Client session related functions 6597251881Speter * 6598251881Speter * @{ 6599251881Speter * 6600251881Speter */ 6601251881Speter 6602251881Speter 6603251881Speter/* Converting paths to URLs. */ 6604251881Speter 6605251881Speter/** Set @a *url to the URL for @a path_or_url allocated in result_pool. 6606251881Speter * 6607251881Speter * If @a path_or_url is already a URL, set @a *url to @a path_or_url. 6608251881Speter * 6609251881Speter * If @a path_or_url is a versioned item, set @a *url to @a 6610251881Speter * path_or_url's entry URL. If @a path_or_url is unversioned (has 6611251881Speter * no entry), set @a *url to NULL. 6612251881Speter * 6613251881Speter * Use @a ctx->wc_ctx to retrieve the information. Use 6614251881Speter ** @a scratch_pool for temporary allocations. 6615251881Speter * 6616251881Speter * @since New in 1.7. 6617251881Speter */ 6618251881Spetersvn_error_t * 6619251881Spetersvn_client_url_from_path2(const char **url, 6620251881Speter const char *path_or_url, 6621251881Speter svn_client_ctx_t *ctx, 6622251881Speter apr_pool_t *result_pool, 6623251881Speter apr_pool_t *scratch_pool); 6624251881Speter 6625251881Speter/** Similar to svn_client_url_from_path2(), but without a context argument. 6626251881Speter * 6627251881Speter * @since New in 1.5. 6628251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 6629251881Speter */ 6630251881SpeterSVN_DEPRECATED 6631251881Spetersvn_error_t * 6632251881Spetersvn_client_url_from_path(const char **url, 6633251881Speter const char *path_or_url, 6634251881Speter apr_pool_t *pool); 6635251881Speter 6636251881Speter 6637251881Speter 6638251881Speter/* Fetching a repository's root URL and UUID. */ 6639251881Speter 6640251881Speter/** Set @a *repos_root_url and @a *repos_uuid, to the root URL and UUID of 6641251881Speter * the repository in which @a abspath_or_url is versioned. Use the 6642251881Speter * authentication baton and working copy context cached in @a ctx as 6643251881Speter * necessary. @a repos_root_url and/or @a repos_uuid may be NULL if not 6644251881Speter * wanted. 6645251881Speter * 6646251881Speter * This function will open a temporary RA session to the repository if 6647251881Speter * necessary to get the information. 6648251881Speter * 6649251881Speter * Allocate @a *repos_root_url and @a *repos_uuid in @a result_pool. 6650251881Speter * Use @a scratch_pool for temporary allocations. 6651251881Speter * 6652251881Speter * @since New in 1.8. 6653251881Speter */ 6654251881Spetersvn_error_t * 6655251881Spetersvn_client_get_repos_root(const char **repos_root_url, 6656251881Speter const char **repos_uuid, 6657251881Speter const char *abspath_or_url, 6658251881Speter svn_client_ctx_t *ctx, 6659251881Speter apr_pool_t *result_pool, 6660251881Speter apr_pool_t *scratch_pool); 6661251881Speter 6662251881Speter/** Set @a *url to the repository root URL of the repository in which 6663251881Speter * @a path_or_url is versioned (or scheduled to be versioned), 6664251881Speter * allocated in @a pool. @a ctx is required for possible repository 6665251881Speter * authentication. 6666251881Speter * 6667251881Speter * @since New in 1.5. 6668251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. Use 6669251881Speter * svn_client_get_repos_root() instead, with an absolute path. 6670251881Speter */ 6671251881SpeterSVN_DEPRECATED 6672251881Spetersvn_error_t * 6673251881Spetersvn_client_root_url_from_path(const char **url, 6674251881Speter const char *path_or_url, 6675251881Speter svn_client_ctx_t *ctx, 6676251881Speter apr_pool_t *pool); 6677251881Speter 6678251881Speter/** Get repository @a uuid for @a url. 6679251881Speter * 6680251881Speter * Use a @a pool to open a temporary RA session to @a url, discover the 6681251881Speter * repository uuid, and free the session. Return the uuid in @a uuid, 6682251881Speter * allocated in @a pool. @a ctx is required for possible repository 6683251881Speter * authentication. 6684251881Speter * 6685251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. Use 6686251881Speter * svn_client_get_repos_root() instead. 6687251881Speter */ 6688251881SpeterSVN_DEPRECATED 6689251881Spetersvn_error_t * 6690251881Spetersvn_client_uuid_from_url(const char **uuid, 6691251881Speter const char *url, 6692251881Speter svn_client_ctx_t *ctx, 6693251881Speter apr_pool_t *pool); 6694251881Speter 6695251881Speter 6696251881Speter/** Return the repository @a uuid for working-copy @a local_abspath, 6697251881Speter * allocated in @a result_pool. Use @a ctx->wc_ctx to retrieve the 6698251881Speter * information. 6699251881Speter * 6700251881Speter * Use @a scratch_pool for temporary allocations. 6701251881Speter * 6702251881Speter * @since New in 1.7. 6703251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. Use 6704251881Speter * svn_client_get_repos_root() instead. 6705251881Speter */ 6706251881SpeterSVN_DEPRECATED 6707251881Spetersvn_error_t * 6708251881Spetersvn_client_uuid_from_path2(const char **uuid, 6709251881Speter const char *local_abspath, 6710251881Speter svn_client_ctx_t *ctx, 6711251881Speter apr_pool_t *result_pool, 6712251881Speter apr_pool_t *scratch_pool); 6713251881Speter 6714251881Speter/** Similar to svn_client_uuid_from_path2(), but with a relative path and 6715251881Speter * an access baton. 6716251881Speter * 6717251881Speter * @deprecated Provided for backward compatibility with the 1.6 API. 6718251881Speter */ 6719251881SpeterSVN_DEPRECATED 6720251881Spetersvn_error_t * 6721251881Spetersvn_client_uuid_from_path(const char **uuid, 6722251881Speter const char *path, 6723251881Speter svn_wc_adm_access_t *adm_access, 6724251881Speter svn_client_ctx_t *ctx, 6725251881Speter apr_pool_t *pool); 6726251881Speter 6727251881Speter 6728251881Speter/* Opening RA sessions. */ 6729251881Speter 6730251881Speter/** Open an RA session rooted at @a url, and return it in @a *session. 6731251881Speter * 6732251881Speter * Use the authentication baton stored in @a ctx for authentication. 6733251881Speter * @a *session is allocated in @a result_pool. 6734251881Speter * 6735251881Speter * If @a wri_abspath is not NULL, use the working copy identified by @a 6736251881Speter * wri_abspath to potentially avoid transferring unneeded data. 6737251881Speter * 6738251881Speter * @note This function is similar to svn_ra_open4(), but the caller avoids 6739251881Speter * having to providing its own callback functions. 6740251881Speter * @since New in 1.8. 6741251881Speter */ 6742251881Spetersvn_error_t * 6743251881Spetersvn_client_open_ra_session2(svn_ra_session_t **session, 6744251881Speter const char *url, 6745251881Speter const char *wri_abspath, 6746251881Speter svn_client_ctx_t *ctx, 6747251881Speter apr_pool_t *result_pool, 6748251881Speter apr_pool_t *scratch_pool); 6749251881Speter 6750262250Speter/** Similar to svn_client_open_ra_session2(), but with @ wri_abspath 6751251881Speter * always passed as NULL, and with the same pool used as both @a 6752251881Speter * result_pool and @a scratch_pool. 6753251881Speter * 6754251881Speter * @since New in 1.3. 6755251881Speter * @deprecated Provided for backward compatibility with the 1.7 API. 6756251881Speter */ 6757251881SpeterSVN_DEPRECATED 6758251881Spetersvn_error_t * 6759251881Spetersvn_client_open_ra_session(svn_ra_session_t **session, 6760251881Speter const char *url, 6761251881Speter svn_client_ctx_t *ctx, 6762251881Speter apr_pool_t *pool); 6763251881Speter 6764251881Speter 6765251881Speter/** @} end group: Client session related functions */ 6766251881Speter 6767251881Speter/** @} */ 6768251881Speter 6769251881Speter#ifdef __cplusplus 6770251881Speter} 6771251881Speter#endif /* __cplusplus */ 6772251881Speter 6773251881Speter#endif /* SVN_CLIENT_H */ 6774