svn_client.h revision 299742
1/**
2 * @copyright
3 * ====================================================================
4 *    Licensed to the Apache Software Foundation (ASF) under one
5 *    or more contributor license agreements.  See the NOTICE file
6 *    distributed with this work for additional information
7 *    regarding copyright ownership.  The ASF licenses this file
8 *    to you under the Apache License, Version 2.0 (the
9 *    "License"); you may not use this file except in compliance
10 *    with the License.  You may obtain a copy of the License at
11 *
12 *      http://www.apache.org/licenses/LICENSE-2.0
13 *
14 *    Unless required by applicable law or agreed to in writing,
15 *    software distributed under the License is distributed on an
16 *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17 *    KIND, either express or implied.  See the License for the
18 *    specific language governing permissions and limitations
19 *    under the License.
20 * ====================================================================
21 * @endcopyright
22 *
23 * @file svn_client.h
24 * @brief Subversion's client library
25 *
26 * Requires:  The working copy library and repository access library.
27 * Provides:  Broad wrappers around working copy library functionality.
28 * Used By:   Client programs.
29 */
30
31#ifndef SVN_CLIENT_H
32#define SVN_CLIENT_H
33
34#include <apr.h>
35#include <apr_pools.h>
36#include <apr_hash.h>
37#include <apr_tables.h>
38#include <apr_getopt.h>
39#include <apr_file_io.h>
40#include <apr_time.h>
41
42#include "svn_types.h"
43#include "svn_string.h"
44#include "svn_wc.h"
45#include "svn_opt.h"
46#include "svn_ra.h"
47#include "svn_diff.h"
48#include "svn_auth.h"
49
50#ifdef __cplusplus
51extern "C" {
52#endif /* __cplusplus */
53
54
55
56/**
57 * Get libsvn_client version information.
58 *
59 * @since New in 1.1.
60 */
61const svn_version_t *
62svn_client_version(void);
63
64/** Client supporting functions
65 *
66 * @defgroup clnt_support Client supporting subsystem
67 *
68 * @{
69 */
70
71
72/*** Authentication stuff ***/
73
74/**  The new authentication system allows the RA layer to "pull"
75 *   information as needed from libsvn_client.
76 *
77 *   @deprecated Replaced by the svn_auth_* functions.
78 *   @see auth_fns
79 *
80 *   @defgroup auth_fns_depr (deprecated) AuthZ client subsystem
81 *
82 *   @{
83 */
84
85/** Create and return @a *provider, an authentication provider of type
86 * svn_auth_cred_simple_t that gets information by prompting the user
87 * with @a prompt_func and @a prompt_baton.  Allocate @a *provider in
88 * @a pool.
89 *
90 * If both #SVN_AUTH_PARAM_DEFAULT_USERNAME and
91 * #SVN_AUTH_PARAM_DEFAULT_PASSWORD are defined as runtime
92 * parameters in the @c auth_baton, then @a *provider will return the
93 * default arguments when svn_auth_first_credentials() is called.  If
94 * svn_auth_first_credentials() fails, then @a *provider will
95 * re-prompt @a retry_limit times (via svn_auth_next_credentials()).
96 * For infinite retries, set @a retry_limit to value less than 0.
97 *
98 * @deprecated Provided for backward compatibility with the 1.3 API.
99 * Use svn_auth_get_simple_prompt_provider() instead.
100 */
101SVN_DEPRECATED
102void
103svn_client_get_simple_prompt_provider(
104  svn_auth_provider_object_t **provider,
105  svn_auth_simple_prompt_func_t prompt_func,
106  void *prompt_baton,
107  int retry_limit,
108  apr_pool_t *pool);
109
110
111/** Create and return @a *provider, an authentication provider of type
112 * #svn_auth_cred_username_t that gets information by prompting the
113 * user with @a prompt_func and @a prompt_baton.  Allocate @a *provider
114 * in @a pool.
115 *
116 * If #SVN_AUTH_PARAM_DEFAULT_USERNAME is defined as a runtime
117 * parameter in the @c auth_baton, then @a *provider will return the
118 * default argument when svn_auth_first_credentials() is called.  If
119 * svn_auth_first_credentials() fails, then @a *provider will
120 * re-prompt @a retry_limit times (via svn_auth_next_credentials()).
121 * For infinite retries, set @a retry_limit to value less than 0.
122 *
123 * @deprecated Provided for backward compatibility with the 1.3 API.
124 * Use svn_auth_get_username_prompt_provider() instead.
125 */
126SVN_DEPRECATED
127void
128svn_client_get_username_prompt_provider(
129  svn_auth_provider_object_t **provider,
130  svn_auth_username_prompt_func_t prompt_func,
131  void *prompt_baton,
132  int retry_limit,
133  apr_pool_t *pool);
134
135
136/** Create and return @a *provider, an authentication provider of type
137 * #svn_auth_cred_simple_t that gets/sets information from the user's
138 * ~/.subversion configuration directory.  Allocate @a *provider in
139 * @a pool.
140 *
141 * If a default username or password is available, @a *provider will
142 * honor them as well, and return them when
143 * svn_auth_first_credentials() is called.  (see
144 * #SVN_AUTH_PARAM_DEFAULT_USERNAME and #SVN_AUTH_PARAM_DEFAULT_PASSWORD).
145 *
146 * @deprecated Provided for backward compatibility with the 1.3 API.
147 * Use svn_auth_get_simple_provider2() instead.
148 */
149SVN_DEPRECATED
150void
151svn_client_get_simple_provider(svn_auth_provider_object_t **provider,
152                               apr_pool_t *pool);
153
154
155#if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN) || defined(CTYPESGEN) || defined(SWIG)
156/**
157 * Create and return @a *provider, an authentication provider of type
158 * #svn_auth_cred_simple_t that gets/sets information from the user's
159 * ~/.subversion configuration directory.  Allocate @a *provider in
160 * @a pool.
161 *
162 * This is like svn_client_get_simple_provider(), except that, when
163 * running on Window 2000 or newer (or any other Windows version that
164 * includes the CryptoAPI), the provider encrypts the password before
165 * storing it to disk. On earlier versions of Windows, the provider
166 * does nothing.
167 *
168 * @since New in 1.2.
169 * @note This function is only available on Windows.
170 *
171 * @note An administrative password reset may invalidate the account's
172 * secret key. This function will detect that situation and behave as
173 * if the password were not cached at all.
174 *
175 * @deprecated Provided for backward compatibility with the 1.3 API.
176 * Use svn_auth_get_windows_simple_provider() instead.
177 */
178SVN_DEPRECATED
179void
180svn_client_get_windows_simple_provider(svn_auth_provider_object_t **provider,
181                                       apr_pool_t *pool);
182#endif /* WIN32 && !__MINGW32__ || DOXYGEN || CTYPESGEN || SWIG */
183
184/** Create and return @a *provider, an authentication provider of type
185 * #svn_auth_cred_username_t that gets/sets information from a user's
186 * ~/.subversion configuration directory.  Allocate @a *provider in
187 * @a pool.
188 *
189 * If a default username is available, @a *provider will honor it,
190 * and return it when svn_auth_first_credentials() is called.  (see
191 * #SVN_AUTH_PARAM_DEFAULT_USERNAME).
192 *
193 * @deprecated Provided for backward compatibility with the 1.3 API.
194 * Use svn_auth_get_username_provider() instead.
195 */
196SVN_DEPRECATED
197void
198svn_client_get_username_provider(svn_auth_provider_object_t **provider,
199                                 apr_pool_t *pool);
200
201
202/** Create and return @a *provider, an authentication provider of type
203 * #svn_auth_cred_ssl_server_trust_t, allocated in @a pool.
204 *
205 * @a *provider retrieves its credentials from the configuration
206 * mechanism.  The returned credential is used to override SSL
207 * security on an error.
208 *
209 * @deprecated Provided for backward compatibility with the 1.3 API.
210 * Use svn_auth_get_ssl_server_trust_file_provider() instead.
211 */
212SVN_DEPRECATED
213void
214svn_client_get_ssl_server_trust_file_provider(
215  svn_auth_provider_object_t **provider,
216  apr_pool_t *pool);
217
218
219/** Create and return @a *provider, an authentication provider of type
220 * #svn_auth_cred_ssl_client_cert_t, allocated in @a pool.
221 *
222 * @a *provider retrieves its credentials from the configuration
223 * mechanism.  The returned credential is used to load the appropriate
224 * client certificate for authentication when requested by a server.
225 *
226 * @deprecated Provided for backward compatibility with the 1.3 API.
227 * Use svn_auth_get_ssl_client_cert_file_provider() instead.
228 */
229SVN_DEPRECATED
230void
231svn_client_get_ssl_client_cert_file_provider(
232  svn_auth_provider_object_t **provider,
233  apr_pool_t *pool);
234
235
236/** Create and return @a *provider, an authentication provider of type
237 * #svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool.
238 *
239 * @a *provider retrieves its credentials from the configuration
240 * mechanism.  The returned credential is used when a loaded client
241 * certificate is protected by a passphrase.
242 *
243 * @deprecated Provided for backward compatibility with the 1.3 API.
244 * Use svn_auth_get_ssl_client_cert_pw_file_provider2() instead.
245 */
246SVN_DEPRECATED
247void
248svn_client_get_ssl_client_cert_pw_file_provider(
249  svn_auth_provider_object_t **provider,
250  apr_pool_t *pool);
251
252
253/** Create and return @a *provider, an authentication provider of type
254 * #svn_auth_cred_ssl_server_trust_t, allocated in @a pool.
255 *
256 * @a *provider retrieves its credentials by using the @a prompt_func
257 * and @a prompt_baton.  The returned credential is used to override
258 * SSL security on an error.
259 *
260 * @deprecated Provided for backward compatibility with the 1.3 API.
261 * Use svn_auth_get_ssl_server_trust_prompt_provider() instead.
262 */
263SVN_DEPRECATED
264void
265svn_client_get_ssl_server_trust_prompt_provider(
266  svn_auth_provider_object_t **provider,
267  svn_auth_ssl_server_trust_prompt_func_t prompt_func,
268  void *prompt_baton,
269  apr_pool_t *pool);
270
271
272/** Create and return @a *provider, an authentication provider of type
273 * #svn_auth_cred_ssl_client_cert_t, allocated in @a pool.
274 *
275 * @a *provider retrieves its credentials by using the @a prompt_func
276 * and @a prompt_baton.  The returned credential is used to load the
277 * appropriate client certificate for authentication when requested by
278 * a server.  The prompt will be retried @a retry_limit times.
279 * For infinite retries, set @a retry_limit to value less than 0.
280 *
281 * @deprecated Provided for backward compatibility with the 1.3 API.
282 * Use svn_auth_get_ssl_client_cert_prompt_provider() instead.
283 */
284SVN_DEPRECATED
285void
286svn_client_get_ssl_client_cert_prompt_provider(
287  svn_auth_provider_object_t **provider,
288  svn_auth_ssl_client_cert_prompt_func_t prompt_func,
289  void *prompt_baton,
290  int retry_limit,
291  apr_pool_t *pool);
292
293
294/** Create and return @a *provider, an authentication provider of type
295 * #svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool.
296 *
297 * @a *provider retrieves its credentials by using the @a prompt_func
298 * and @a prompt_baton.  The returned credential is used when a loaded
299 * client certificate is protected by a passphrase.  The prompt will
300 * be retried @a retry_limit times. For infinite retries, set @a retry_limit
301 * to value less than 0.
302 *
303 * @deprecated Provided for backward compatibility with the 1.3 API.
304 * Use svn_auth_get_ssl_client_cert_pw_prompt_provider() instead.
305 */
306SVN_DEPRECATED
307void
308svn_client_get_ssl_client_cert_pw_prompt_provider(
309  svn_auth_provider_object_t **provider,
310  svn_auth_ssl_client_cert_pw_prompt_func_t prompt_func,
311  void *prompt_baton,
312  int retry_limit,
313  apr_pool_t *pool);
314
315/** @} */
316
317/**
318 * Revisions and Peg Revisions
319 *
320 * @defgroup clnt_revisions Revisions and Peg Revisions
321 *
322 * A brief word on operative and peg revisions.
323 *
324 * If the kind of the peg revision is #svn_opt_revision_unspecified, then it
325 * defaults to #svn_opt_revision_head for URLs and #svn_opt_revision_working
326 * for local paths.
327 *
328 * For deeper insight, please see the
329 * <a href="http://svnbook.red-bean.com/nightly/en/svn.advanced.pegrevs.html">
330 * Peg and Operative Revisions</a> section of the Subversion Book.
331 */
332
333/**
334 * Commit operations
335 *
336 * @defgroup clnt_commit Client commit subsystem
337 *
338 * @{
339 */
340
341/** This is a structure which stores a filename and a hash of property
342 * names and values.
343 *
344 * @deprecated Provided for backward compatibility with the 1.4 API.
345 */
346typedef struct svn_client_proplist_item_t
347{
348  /** The name of the node on which these properties are set. */
349  svn_stringbuf_t *node_name;
350
351  /** A hash of (const char *) property names, and (svn_string_t *) property
352   * values. */
353  apr_hash_t *prop_hash;
354
355} svn_client_proplist_item_t;
356
357/**
358 * The callback invoked by svn_client_proplist4().  Each invocation
359 * provides the regular and/or inherited properties of @a path, which is
360 * either a working copy path or a URL.  If @a prop_hash is not @c NULL, then
361 * it maps explicit <tt>const char *</tt> property names to
362 * <tt>svn_string_t *</tt> explicit property values.  If @a inherited_props
363 * is not @c NULL, then it is a depth-first ordered array of
364 * #svn_prop_inherited_item_t * structures representing the
365 * properties inherited by @a path.  Use @a scratch_pool for all temporary
366 * allocations.
367 *
368 * The #svn_prop_inherited_item_t->path_or_url members of the
369 * #svn_prop_inherited_item_t * structures in @a inherited_props are
370 * URLs if @a path is a URL or if @a path is a working copy path but the
371 * property represented by the structure is above the working copy root (i.e.
372 * the inherited property is from the cache).  In all other cases the
373 * #svn_prop_inherited_item_t->path_or_url members are absolute working copy
374 * paths.
375 *
376 * @since New in 1.8.
377 */
378typedef svn_error_t *(*svn_proplist_receiver2_t)(
379  void *baton,
380  const char *path,
381  apr_hash_t *prop_hash,
382  apr_array_header_t *inherited_props,
383  apr_pool_t *scratch_pool);
384
385/**
386 * Similar to #svn_proplist_receiver2_t, but doesn't return inherited
387 * properties.
388 *
389 * @deprecated Provided for backward compatibility with the 1.7 API.
390 *
391 * @since New in 1.5.
392 */
393typedef svn_error_t *(*svn_proplist_receiver_t)(
394  void *baton,
395  const char *path,
396  apr_hash_t *prop_hash,
397  apr_pool_t *pool);
398
399/**
400 * Return a duplicate of @a item, allocated in @a pool. No part of the new
401 * structure will be shared with @a item.
402 *
403 * @since New in 1.3.
404 *
405 * @deprecated Provided for backward compatibility with the 1.4 API.
406 */
407SVN_DEPRECATED
408svn_client_proplist_item_t *
409svn_client_proplist_item_dup(const svn_client_proplist_item_t *item,
410                             apr_pool_t *pool);
411
412/** Information about commits passed back to client from this module.
413 *
414 * @deprecated Provided for backward compatibility with the 1.2 API.
415 */
416typedef struct svn_client_commit_info_t
417{
418  /** just-committed revision. */
419  svn_revnum_t revision;
420
421  /** server-side date of the commit. */
422  const char *date;
423
424  /** author of the commit. */
425  const char *author;
426
427} svn_client_commit_info_t;
428
429
430/**
431 * @name Commit state flags
432 * @brief State flags for use with the #svn_client_commit_item3_t structure
433 * (see the note about the namespace for that structure, which also
434 * applies to these flags).
435 * @{
436 */
437#define SVN_CLIENT_COMMIT_ITEM_ADD         0x01
438#define SVN_CLIENT_COMMIT_ITEM_DELETE      0x02
439#define SVN_CLIENT_COMMIT_ITEM_TEXT_MODS   0x04
440#define SVN_CLIENT_COMMIT_ITEM_PROP_MODS   0x08
441#define SVN_CLIENT_COMMIT_ITEM_IS_COPY     0x10
442/** One of the flags for a commit item.  The node has a lock token that
443 * should be released after a successful commit and, if the node is also
444 * modified, transferred to the server as part of the commit process.
445 *
446 * @since New in 1.2. */
447#define SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN  0x20
448/** One of the flags for a commit item.  The node is the 'moved here'
449 * side of a local move.  This is used to check and enforce that the
450 * other side of the move is also included in the commit.
451 *
452 * @since New in 1.8. */
453#define SVN_CLIENT_COMMIT_ITEM_MOVED_HERE  0x40
454/** @} */
455
456/** The commit candidate structure.
457 *
458 * In order to avoid backwards compatibility problems clients should use
459 * svn_client_commit_item3_create() to allocate and initialize this
460 * structure instead of doing so themselves.
461 *
462 * @since New in 1.5.
463 */
464typedef struct svn_client_commit_item3_t
465{
466  /* IMPORTANT: If you extend this structure, add new fields to the end. */
467
468  /** absolute working-copy path of item. Always set during normal commits
469   * (and copies from a working copy) to the repository. Can only be NULL
470   * when stub commit items are created for operations that only involve
471   * direct repository operations. During WC->REPOS copy operations, this
472   * path is the WC source path of the operation. */
473  const char *path;
474
475  /** node kind (dir, file) */
476  svn_node_kind_t kind;
477
478  /** commit URL for this item. Points to the repository location of PATH
479   * during commits, or to the final URL of the item when copying from the
480   * working copy to the repository. */
481  const char *url;
482
483  /** revision of textbase */
484  svn_revnum_t revision;
485
486  /** copyfrom-url or NULL if not a copied item */
487  const char *copyfrom_url;
488
489  /** copyfrom-rev, valid when copyfrom_url != NULL */
490  svn_revnum_t copyfrom_rev;
491
492  /** state flags */
493  apr_byte_t state_flags;
494
495  /** An array of #svn_prop_t *'s, which are incoming changes from
496   * the repository to WC properties.  These changes are applied
497   * post-commit.
498   *
499   * When adding to this array, allocate the #svn_prop_t and its
500   * contents in @c incoming_prop_changes->pool, so that it has the
501   * same lifetime as this data structure.
502   *
503   * See http://subversion.tigris.org/issues/show_bug.cgi?id=806 for a
504   * description of what would happen if the post-commit process
505   * didn't group these changes together with all other changes to the
506   * item.
507   */
508  apr_array_header_t *incoming_prop_changes;
509
510  /** An array of #svn_prop_t *'s, which are outgoing changes to
511   * make to properties in the repository.  These extra property
512   * changes are declared pre-commit, and applied to the repository as
513   * part of a commit.
514   *
515   * When adding to this array, allocate the #svn_prop_t and its
516   * contents in @c outgoing_prop_changes->pool, so that it has the
517   * same lifetime as this data structure.
518   */
519  apr_array_header_t *outgoing_prop_changes;
520
521  /**
522   * When processing the commit this contains the relative path for
523   * the commit session. #NULL until the commit item is preprocessed.
524   * @since New in 1.7.
525   */
526  const char *session_relpath;
527
528  /**
529   * When committing a move, this contains the absolute path where
530   * the node was directly moved from. (If an ancestor at the original
531   * location was moved then it points to where the node itself was
532   * moved from; not the original location.)
533   * @since New in 1.8.
534   */
535  const char *moved_from_abspath;
536
537} svn_client_commit_item3_t;
538
539/** The commit candidate structure.
540 *
541 * @deprecated Provided for backward compatibility with the 1.4 API.
542 */
543typedef struct svn_client_commit_item2_t
544{
545  /** absolute working-copy path of item */
546  const char *path;
547
548  /** node kind (dir, file) */
549  svn_node_kind_t kind;
550
551  /** commit URL for this item */
552  const char *url;
553
554  /** revision of textbase */
555  svn_revnum_t revision;
556
557  /** copyfrom-url or NULL if not a copied item */
558  const char *copyfrom_url;
559
560  /** copyfrom-rev, valid when copyfrom_url != NULL */
561  svn_revnum_t copyfrom_rev;
562
563  /** state flags */
564  apr_byte_t state_flags;
565
566  /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes
567   * field.
568   */
569  apr_array_header_t *wcprop_changes;
570} svn_client_commit_item2_t;
571
572/** The commit candidate structure.
573 *
574 * @deprecated Provided for backward compatibility with the 1.2 API.
575 */
576typedef struct svn_client_commit_item_t
577{
578  /** absolute working-copy path of item */
579  const char *path;
580
581  /** node kind (dir, file) */
582  svn_node_kind_t kind;
583
584  /** commit URL for this item */
585  const char *url;
586
587  /** revision (copyfrom-rev if _IS_COPY) */
588  svn_revnum_t revision;
589
590  /** copyfrom-url */
591  const char *copyfrom_url;
592
593  /** state flags */
594  apr_byte_t state_flags;
595
596  /** Analogous to the #svn_client_commit_item3_t.incoming_prop_changes
597   * field.
598   */
599  apr_array_header_t *wcprop_changes;
600
601} svn_client_commit_item_t;
602
603/** Return a new commit item object, allocated in @a pool.
604 *
605 * In order to avoid backwards compatibility problems, this function
606 * is used to initialize and allocate the #svn_client_commit_item3_t
607 * structure rather than doing so explicitly, as the size of this
608 * structure may change in the future.
609 *
610 * @since New in 1.6.
611 */
612svn_client_commit_item3_t *
613svn_client_commit_item3_create(apr_pool_t *pool);
614
615/** Like svn_client_commit_item3_create() but with a stupid "const"
616 * qualifier on the returned structure, and it returns an error that
617 * will never happen.
618 *
619 * @deprecated Provided for backward compatibility with the 1.5 API.
620 */
621SVN_DEPRECATED
622svn_error_t *
623svn_client_commit_item_create(const svn_client_commit_item3_t **item,
624                              apr_pool_t *pool);
625
626/**
627 * Return a duplicate of @a item, allocated in @a pool. No part of the
628 * new structure will be shared with @a item, except for the adm_access
629 * member.
630 *
631 * @since New in 1.5.
632 */
633svn_client_commit_item3_t *
634svn_client_commit_item3_dup(const svn_client_commit_item3_t *item,
635                            apr_pool_t *pool);
636
637/**
638 * Return a duplicate of @a item, allocated in @a pool. No part of the new
639 * structure will be shared with @a item.
640 *
641 * @deprecated Provided for backward compatibility with the 1.4 API.
642 */
643SVN_DEPRECATED
644svn_client_commit_item2_t *
645svn_client_commit_item2_dup(const svn_client_commit_item2_t *item,
646                            apr_pool_t *pool);
647
648/** Callback type used by commit-y operations to get a commit log message
649 * from the caller.
650 *
651 * Set @a *log_msg to the log message for the commit, allocated in @a
652 * pool, or @c NULL if wish to abort the commit process.  Set @a *tmp_file
653 * to the path of any temporary file which might be holding that log
654 * message, or @c NULL if no such file exists (though, if @a *log_msg is
655 * @c NULL, this value is undefined).  The log message MUST be a UTF8
656 * string with LF line separators.
657 *
658 * @a commit_items is a read-only array of #svn_client_commit_item3_t
659 * structures, which may be fully or only partially filled-in,
660 * depending on the type of commit operation.
661 *
662 * @a baton is provided along with the callback for use by the handler.
663 *
664 * All allocations should be performed in @a pool.
665 *
666 * @since New in 1.5.
667 */
668typedef svn_error_t *(*svn_client_get_commit_log3_t)(
669  const char **log_msg,
670  const char **tmp_file,
671  const apr_array_header_t *commit_items,
672  void *baton,
673  apr_pool_t *pool);
674
675/** Callback type used by commit-y operations to get a commit log message
676 * from the caller.
677 *
678 * Set @a *log_msg to the log message for the commit, allocated in @a
679 * pool, or @c NULL if wish to abort the commit process.  Set @a *tmp_file
680 * to the path of any temporary file which might be holding that log
681 * message, or @c NULL if no such file exists (though, if @a *log_msg is
682 * @c NULL, this value is undefined).  The log message MUST be a UTF8
683 * string with LF line separators.
684 *
685 * @a commit_items is a read-only array of #svn_client_commit_item2_t
686 * structures, which may be fully or only partially filled-in,
687 * depending on the type of commit operation.
688 *
689 * @a baton is provided along with the callback for use by the handler.
690 *
691 * All allocations should be performed in @a pool.
692 *
693 * @deprecated Provided for backward compatibility with the 1.3 API.
694 */
695typedef svn_error_t *(*svn_client_get_commit_log2_t)(
696  const char **log_msg,
697  const char **tmp_file,
698  const apr_array_header_t *commit_items,
699  void *baton,
700  apr_pool_t *pool);
701
702/** Callback type used by commit-y operations to get a commit log message
703 * from the caller.
704 *
705 * Set @a *log_msg to the log message for the commit, allocated in @a
706 * pool, or @c NULL if wish to abort the commit process.  Set @a *tmp_file
707 * to the path of any temporary file which might be holding that log
708 * message, or @c NULL if no such file exists (though, if @a *log_msg is
709 * @c NULL, this value is undefined).  The log message MUST be a UTF8
710 * string with LF line separators.
711 *
712 * @a commit_items is a read-only array of #svn_client_commit_item_t
713 * structures, which may be fully or only partially filled-in,
714 * depending on the type of commit operation.
715 *
716 * @a baton is provided along with the callback for use by the handler.
717 *
718 * All allocations should be performed in @a pool.
719 *
720 * @deprecated Provided for backward compatibility with the 1.2 API.
721 */
722typedef svn_error_t *(*svn_client_get_commit_log_t)(
723  const char **log_msg,
724  const char **tmp_file,
725  apr_array_header_t *commit_items,
726  void *baton,
727  apr_pool_t *pool);
728
729/** @} */
730
731/**
732 * Client blame
733 *
734 * @defgroup clnt_blame Client blame functionality
735 *
736 * @{
737 */
738
739/** Callback type used by svn_client_blame5() to notify the caller
740 * that line @a line_no of the blamed file was last changed in @a revision
741 * which has the revision properties @a rev_props, and that the contents were
742 * @a line.
743 *
744 * @a start_revnum and @a end_revnum contain the start and end revision
745 * number of the entire blame operation, as determined from the repository
746 * inside svn_client_blame5(). This can be useful for the blame receiver
747 * to format the blame output.
748 *
749 * If svn_client_blame5() was called with @a include_merged_revisions set to
750 * TRUE, @a merged_revision, @a merged_rev_props and @a merged_path will be
751 * set, otherwise they will be NULL. @a merged_path will be set to the
752 * absolute repository path.
753 *
754 * All allocations should be performed in @a pool.
755 *
756 * @note If there is no blame information for this line, @a revision will be
757 * invalid and @a rev_props will be NULL. In this case @a local_change
758 * will be true if the reason there is no blame information is that the line
759 * was modified locally. In all other cases @a local_change will be false.
760 *
761 * @since New in 1.7.
762 */
763typedef svn_error_t *(*svn_client_blame_receiver3_t)(
764  void *baton,
765  svn_revnum_t start_revnum,
766  svn_revnum_t end_revnum,
767  apr_int64_t line_no,
768  svn_revnum_t revision,
769  apr_hash_t *rev_props,
770  svn_revnum_t merged_revision,
771  apr_hash_t *merged_rev_props,
772  const char *merged_path,
773  const char *line,
774  svn_boolean_t local_change,
775  apr_pool_t *pool);
776
777/**
778 * Similar to #svn_client_blame_receiver3_t, but with separate author and
779 * date revision properties instead of all revision properties, and without
780 * information about local changes.
781 *
782 * @deprecated Provided for backward compatibility with the 1.6 API.
783 *
784 * @since New in 1.5.
785 */
786typedef svn_error_t *(*svn_client_blame_receiver2_t)(
787  void *baton,
788  apr_int64_t line_no,
789  svn_revnum_t revision,
790  const char *author,
791  const char *date,
792  svn_revnum_t merged_revision,
793  const char *merged_author,
794  const char *merged_date,
795  const char *merged_path,
796  const char *line,
797  apr_pool_t *pool);
798
799/**
800 * Similar to #svn_client_blame_receiver2_t, but without @a merged_revision,
801 * @a merged_author, @a merged_date, or @a merged_path members.
802 *
803 * @note New in 1.4 is that the line is defined to contain only the line
804 * content (and no [partial] EOLs; which was undefined in older versions).
805 * Using this callback with svn_client_blame() or svn_client_blame2()
806 * will still give you the old behaviour.
807 *
808 * @deprecated Provided for backward compatibility with the 1.4 API.
809 */
810typedef svn_error_t *(*svn_client_blame_receiver_t)(
811  void *baton,
812  apr_int64_t line_no,
813  svn_revnum_t revision,
814  const char *author,
815  const char *date,
816  const char *line,
817  apr_pool_t *pool);
818
819
820/** @} */
821
822/**
823 * Client diff
824 *
825 * @defgroup clnt_diff Client diff functionality
826 *
827 * @{
828 */
829/** The difference type in an svn_diff_summarize_t structure.
830 *
831 * @since New in 1.4.
832 */
833typedef enum svn_client_diff_summarize_kind_t
834{
835  /** An item with no text modifications */
836  svn_client_diff_summarize_kind_normal,
837
838  /** An added item */
839  svn_client_diff_summarize_kind_added,
840
841  /** An item with text modifications */
842  svn_client_diff_summarize_kind_modified,
843
844  /** A deleted item */
845  svn_client_diff_summarize_kind_deleted
846} svn_client_diff_summarize_kind_t;
847
848
849/** A struct that describes the diff of an item. Passed to
850 * #svn_client_diff_summarize_func_t.
851 *
852 * @note Fields may be added to the end of this structure in future
853 * versions.  Therefore, users shouldn't allocate structures of this
854 * type, to preserve binary compatibility.
855 *
856 * @since New in 1.4.
857 */
858typedef struct svn_client_diff_summarize_t
859{
860  /** Path relative to the target.  If the target is a file, path is
861   * the empty string. */
862  const char *path;
863
864  /** Change kind */
865  svn_client_diff_summarize_kind_t summarize_kind;
866
867  /** Properties changed?  For consistency with 'svn status' output,
868   * this should be false if summarize_kind is _added or _deleted. */
869  svn_boolean_t prop_changed;
870
871  /** File or dir */
872  svn_node_kind_t node_kind;
873} svn_client_diff_summarize_t;
874
875/**
876 * Return a duplicate of @a diff, allocated in @a pool. No part of the new
877 * structure will be shared with @a diff.
878 *
879 * @since New in 1.4.
880 */
881svn_client_diff_summarize_t *
882svn_client_diff_summarize_dup(const svn_client_diff_summarize_t *diff,
883                              apr_pool_t *pool);
884
885
886/** A callback used in svn_client_diff_summarize2() and
887 * svn_client_diff_summarize_peg2() for reporting a @a diff summary.
888 *
889 * All allocations should be performed in @a pool.
890 *
891 * @a baton is a closure object; it should be provided by the implementation,
892 * and passed by the caller.
893 *
894 * @since New in 1.4.
895 */
896typedef svn_error_t *(*svn_client_diff_summarize_func_t)(
897  const svn_client_diff_summarize_t *diff,
898  void *baton,
899  apr_pool_t *pool);
900
901
902
903/** @} */
904
905
906/**
907 * Client context
908 *
909 * @defgroup clnt_ctx Client context management
910 *
911 * @{
912 */
913
914/** A client context structure, which holds client specific callbacks,
915 * batons, serves as a cache for configuration options, and other various
916 * and sundry things.  In order to avoid backwards compatibility problems
917 * clients should use svn_client_create_context() to allocate and
918 * initialize this structure instead of doing so themselves.
919 */
920typedef struct svn_client_ctx_t
921{
922  /** main authentication baton. */
923  svn_auth_baton_t *auth_baton;
924
925  /** notification callback function.
926   * This will be called by notify_func2() by default.
927   * @deprecated Provided for backward compatibility with the 1.1 API.
928   * Use @c notify_func2 instead. */
929  svn_wc_notify_func_t notify_func;
930
931  /** notification callback baton for notify_func()
932   * @deprecated Provided for backward compatibility with the 1.1 API.
933   * Use @c notify_baton2 instead */
934  void *notify_baton;
935
936  /** Log message callback function.  NULL means that Subversion
937    * should try not attempt to fetch a log message.
938    * @deprecated Provided for backward compatibility with the 1.2 API.
939    * Use @c log_msg_func2 instead. */
940  svn_client_get_commit_log_t log_msg_func;
941
942  /** log message callback baton
943    * @deprecated Provided for backward compatibility with the 1.2 API.
944    * Use @c log_msg_baton2 instead. */
945  void *log_msg_baton;
946
947  /** a hash mapping of <tt>const char *</tt> configuration file names to
948   * #svn_config_t *'s. For example, the '~/.subversion/config' file's
949   * contents should have the key "config".  May be left unset (or set to
950   * NULL) to use the built-in default settings and not use any configuration.
951   */
952  apr_hash_t *config;
953
954  /** a callback to be used to see if the client wishes to cancel the running
955   * operation. */
956  svn_cancel_func_t cancel_func;
957
958  /** a baton to pass to the cancellation callback. */
959  void *cancel_baton;
960
961  /** notification function, defaulting to a function that forwards
962   * to notify_func().  If @c NULL, it will not be invoked.
963   * @since New in 1.2. */
964  svn_wc_notify_func2_t notify_func2;
965
966  /** notification baton for notify_func2().
967   * @since New in 1.2. */
968  void *notify_baton2;
969
970  /** Log message callback function. NULL means that Subversion
971   *   should try log_msg_func.
972   * @since New in 1.3. */
973  svn_client_get_commit_log2_t log_msg_func2;
974
975  /** callback baton for log_msg_func2
976   * @since New in 1.3. */
977  void *log_msg_baton2;
978
979  /** Notification callback for network progress information.
980   * May be NULL if not used.
981   * @since New in 1.3. */
982  svn_ra_progress_notify_func_t progress_func;
983
984  /** Callback baton for progress_func.
985   * @since New in 1.3. */
986  void *progress_baton;
987
988  /** Log message callback function. NULL means that Subversion
989   *   should try @c log_msg_func2, then @c log_msg_func.
990   * @since New in 1.5. */
991  svn_client_get_commit_log3_t log_msg_func3;
992
993  /** The callback baton for @c log_msg_func3.
994   * @since New in 1.5. */
995  void *log_msg_baton3;
996
997  /** MIME types map.
998   * @since New in 1.5. */
999  apr_hash_t *mimetypes_map;
1000
1001  /** Conflict resolution callback and baton, if available.
1002   * @since New in 1.5. */
1003  svn_wc_conflict_resolver_func_t conflict_func;
1004  void *conflict_baton;
1005
1006  /** Custom client name string, or @c NULL.
1007   * @since New in 1.5. */
1008  const char *client_name;
1009
1010  /** Conflict resolution callback and baton, if available. NULL means that
1011   * subversion should try @c conflict_func.
1012   * @since New in 1.7. */
1013  svn_wc_conflict_resolver_func2_t conflict_func2;
1014  void *conflict_baton2;
1015
1016  /** A working copy context for the client operation to use.
1017   * This is initialized by svn_client_create_context() and should never
1018   * be @c NULL.
1019   *
1020   * @since New in 1.7.  */
1021  svn_wc_context_t *wc_ctx;
1022
1023  /** Check-tunnel callback
1024   *
1025   * If not @c NULL, and open_tunnel_func is also not @c NULL, this
1026   * callback will be invoked to check if open_tunnel_func should be
1027   * used to create a specific tunnel, or if the default tunnel
1028   * implementation (either built-in or configured in the client
1029   * configuration file) should be used instead.
1030   * @since New in 1.9.
1031   */
1032  svn_ra_check_tunnel_func_t check_tunnel_func;
1033
1034  /** Open-tunnel callback
1035   *
1036   * If not @c NULL, this callback will be invoked to create a tunnel
1037   * for a ra_svn connection that needs one, overriding any tunnel
1038   * definitions in the client config file. This callback is used only
1039   * for ra_svn and ignored by the other RA modules.
1040   * @since New in 1.9.
1041   */
1042  svn_ra_open_tunnel_func_t open_tunnel_func;
1043
1044  /** The baton used with check_tunnel_func and open_tunnel_func.
1045   * @since New in 1.9.
1046   */
1047  void *tunnel_baton;
1048} svn_client_ctx_t;
1049
1050/** Initialize a client context.
1051 * Set @a *ctx to a client context object, allocated in @a pool, that
1052 * represents a particular instance of an svn client. @a cfg_hash is used
1053 * to initialise the config member of the returned context object and should
1054 * remain valid for the lifetime of the object. @a cfg_hash may be @c NULL,
1055 * in which case it is ignored.
1056 *
1057 * In order to avoid backwards compatibility problems, clients must
1058 * use this function to initialize and allocate the
1059 * #svn_client_ctx_t structure rather than doing so themselves, as
1060 * the size of this structure may change in the future.
1061 *
1062 * The current implementation never returns error, but callers should
1063 * still check for error, for compatibility with future versions.
1064 *
1065 * @since New in 1.8.
1066 */
1067svn_error_t *
1068svn_client_create_context2(svn_client_ctx_t **ctx,
1069                           apr_hash_t *cfg_hash,
1070                           apr_pool_t *pool);
1071
1072
1073/** Similar to svn_client_create_context2 but passes a NULL @a cfg_hash.
1074 *
1075 * @deprecated Provided for backward compatibility with the 1.7 API.
1076 */
1077SVN_DEPRECATED
1078svn_error_t *
1079svn_client_create_context(svn_client_ctx_t **ctx,
1080                          apr_pool_t *pool);
1081
1082/** @} end group: Client context management */
1083
1084/**
1085 * @deprecated Provided for backward compatibility. This constant was never
1086 * used in released versions.
1087 */
1088#define SVN_CLIENT_AUTH_USERNAME            "username"
1089/**
1090 * @deprecated Provided for backward compatibility. This constant was never
1091 * used in released versions.
1092 */
1093#define SVN_CLIENT_AUTH_PASSWORD            "password"
1094
1095/** Client argument processing
1096 *
1097 * @defgroup clnt_cmdline Client command-line processing
1098 *
1099 * @{
1100 */
1101
1102/**
1103 * Pull remaining target arguments from @a os into @a *targets_p,
1104 * converting them to UTF-8, followed by targets from @a known_targets
1105 * (which might come from, for example, the "--targets" command line option).
1106 *
1107 * Process each target in one of the following ways.  For a repository-
1108 * relative URL: resolve to a full URL, contacting the repository if
1109 * necessary to do so, and then treat as a full URL.  For a URL: do some
1110 * IRI-to-URI encoding and some auto-escaping, and canonicalize.  For a
1111 * local path: canonicalize case and path separators.
1112 *
1113 * If @a keep_last_origpath_on_truepath_collision is TRUE, and there are
1114 * exactly two targets which both case-canonicalize to the same path, the last
1115 * target will be returned in the original non-case-canonicalized form.
1116 *
1117 * Allocate @a *targets_p and its elements in @a pool.
1118 *
1119 * @a ctx is required for possible repository authentication.
1120 *
1121 * If a path has the same name as a Subversion working copy
1122 * administrative directory, return #SVN_ERR_RESERVED_FILENAME_SPECIFIED;
1123 * if multiple reserved paths are encountered, return a chain of
1124 * errors, all of which are #SVN_ERR_RESERVED_FILENAME_SPECIFIED.  Do
1125 * not return this type of error in a chain with any other type of
1126 * error, and if this is the only type of error encountered, complete
1127 * the operation before returning the error(s).
1128 *
1129 * Return an error if a target is just a peg specifier with no path, such as
1130 * "@abc". Before v1.6.5 (r878062) this form was interpreted as a literal path;
1131 * it is now ambiguous. The form "@abc@" should now be used to refer to the
1132 * literal path "@abc" with no peg revision, or the form ".@abc" to refer to
1133 * the empty path with peg revision "abc".
1134 *
1135 * @since New in 1.7
1136 */
1137svn_error_t *
1138svn_client_args_to_target_array2(apr_array_header_t **targets_p,
1139                                 apr_getopt_t *os,
1140                                 const apr_array_header_t *known_targets,
1141                                 svn_client_ctx_t *ctx,
1142                                 svn_boolean_t keep_last_origpath_on_truepath_collision,
1143                                 apr_pool_t *pool);
1144
1145/**
1146 * Similar to svn_client_args_to_target_array2() but with
1147 * @a keep_last_origpath_on_truepath_collision always set to FALSE.
1148 *
1149 * @since Since 1.6.5, this returns an error if a path contains a peg
1150 * specifier with no path before it, such as "@abc".
1151 *
1152 * @deprecated Provided for backward compatibility with the 1.6 API.
1153 */
1154SVN_DEPRECATED
1155svn_error_t *
1156svn_client_args_to_target_array(apr_array_header_t **targets_p,
1157                                apr_getopt_t *os,
1158                                const apr_array_header_t *known_targets,
1159                                svn_client_ctx_t *ctx,
1160                                apr_pool_t *pool);
1161
1162/** @} group end: Client command-line processing */
1163
1164/** @} */
1165
1166/**
1167 * Client working copy management functions
1168 *
1169 * @defgroup clnt_wc Client working copy management
1170 *
1171 * @{
1172 */
1173
1174/**
1175 * @defgroup clnt_wc_checkout Checkout
1176 *
1177 * @{
1178 */
1179
1180
1181/**
1182 * Checkout a working copy from a repository.
1183 *
1184 * @param[out] result_rev   If non-NULL, the value of the revision checked
1185 *              out from the repository.
1186 * @param[in] URL       The repository URL of the checkout source.
1187 * @param[in] path      The root of the new working copy.
1188 * @param[in] peg_revision  The peg revision.
1189 * @param[in] revision  The operative revision.
1190 * @param[in] depth     The depth of the operation.  If #svn_depth_unknown,
1191 *              then behave as if for #svn_depth_infinity, except in the case
1192 *              of resuming a previous checkout of @a path (i.e., updating),
1193 *              in which case use the depth of the existing working copy.
1194 * @param[in] ignore_externals  If @c TRUE, don't process externals
1195 *              definitions as part of this operation.
1196 * @param[in] allow_unver_obstructions  If @c TRUE, then tolerate existing
1197 *              unversioned items that obstruct incoming paths.  Only
1198 *              obstructions of the same type (file or dir) as the added
1199 *              item are tolerated.  The text of obstructing files is left
1200 *              as-is, effectively treating it as a user modification after
1201 *              the checkout.  Working properties of obstructing items are
1202 *              set equal to the base properties. <br>
1203 *              If @c FALSE, then abort if there are any unversioned
1204 *              obstructing items.
1205 * @param[in] ctx   The standard client context, used for authentication and
1206 *              notification.
1207 * @param[in] pool  Used for any temporary allocation.
1208 *
1209 * @return A pointer to an #svn_error_t of the type (this list is not
1210 *         exhaustive): <br>
1211 *         #SVN_ERR_UNSUPPORTED_FEATURE if @a URL refers to a file rather
1212 *         than a directory; <br>
1213 *         #SVN_ERR_RA_ILLEGAL_URL if @a URL does not exist; <br>
1214 *         #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of
1215 *         #svn_opt_revision_number, #svn_opt_revision_head, or
1216 *         #svn_opt_revision_date. <br>
1217 *         If no error occurred, return #SVN_NO_ERROR.
1218 *
1219 * @since New in 1.5.
1220 *
1221 * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for
1222 *      a discussion of operative and peg revisions.
1223 */
1224svn_error_t *
1225svn_client_checkout3(svn_revnum_t *result_rev,
1226                     const char *URL,
1227                     const char *path,
1228                     const svn_opt_revision_t *peg_revision,
1229                     const svn_opt_revision_t *revision,
1230                     svn_depth_t depth,
1231                     svn_boolean_t ignore_externals,
1232                     svn_boolean_t allow_unver_obstructions,
1233                     svn_client_ctx_t *ctx,
1234                     apr_pool_t *pool);
1235
1236
1237/**
1238 * Similar to svn_client_checkout3() but with @a allow_unver_obstructions
1239 * always set to FALSE, and @a depth set according to @a recurse: if
1240 * @a recurse is TRUE, @a depth is #svn_depth_infinity, if @a recurse
1241 * is FALSE, @a depth is #svn_depth_files.
1242 *
1243 * @deprecated Provided for backward compatibility with the 1.4 API.
1244 */
1245SVN_DEPRECATED
1246svn_error_t *
1247svn_client_checkout2(svn_revnum_t *result_rev,
1248                     const char *URL,
1249                     const char *path,
1250                     const svn_opt_revision_t *peg_revision,
1251                     const svn_opt_revision_t *revision,
1252                     svn_boolean_t recurse,
1253                     svn_boolean_t ignore_externals,
1254                     svn_client_ctx_t *ctx,
1255                     apr_pool_t *pool);
1256
1257
1258/**
1259 * Similar to svn_client_checkout2(), but with @a peg_revision
1260 * always set to #svn_opt_revision_unspecified and
1261 * @a ignore_externals always set to FALSE.
1262 *
1263 * @deprecated Provided for backward compatibility with the 1.1 API.
1264 */
1265SVN_DEPRECATED
1266svn_error_t *
1267svn_client_checkout(svn_revnum_t *result_rev,
1268                    const char *URL,
1269                    const char *path,
1270                    const svn_opt_revision_t *revision,
1271                    svn_boolean_t recurse,
1272                    svn_client_ctx_t *ctx,
1273                    apr_pool_t *pool);
1274/** @} */
1275
1276/**
1277 * @defgroup Update Bring a working copy up-to-date with a repository
1278 *
1279 * @{
1280 *
1281 */
1282
1283/**
1284 * Update working trees @a paths to @a revision, authenticating with the
1285 * authentication baton cached in @a ctx.  @a paths is an array of const
1286 * char * paths to be updated.  Unversioned paths that are direct children
1287 * of a versioned path will cause an update that attempts to add that path;
1288 * other unversioned paths are skipped.  If @a result_revs is not NULL,
1289 * @a *result_revs will be set to an array of svn_revnum_t with each
1290 * element set to the revision to which @a revision was resolved for the
1291 * corresponding element of @a paths.
1292 *
1293 * @a revision must be of kind #svn_opt_revision_number,
1294 * #svn_opt_revision_head, or #svn_opt_revision_date.  If @a
1295 * revision does not meet these requirements, return the error
1296 * #SVN_ERR_CLIENT_BAD_REVISION.
1297 *
1298 * The paths in @a paths can be from multiple working copies from multiple
1299 * repositories, but even if they all come from the same repository there
1300 * is no guarantee that revision represented by #svn_opt_revision_head
1301 * will remain the same as each path is updated.
1302 *
1303 * If @a ignore_externals is set, don't process externals definitions
1304 * as part of this operation.
1305 *
1306 * If @a depth is #svn_depth_infinity, update fully recursively.
1307 * Else if it is #svn_depth_immediates or #svn_depth_files, update
1308 * each target and its file entries, but not its subdirectories.  Else
1309 * if #svn_depth_empty, update exactly each target, nonrecursively
1310 * (essentially, update the target's properties).
1311 *
1312 * If @a depth is #svn_depth_unknown, take the working depth from
1313 * @a paths and then behave as described above.
1314 *
1315 * If @a depth_is_sticky is set and @a depth is not
1316 * #svn_depth_unknown, then in addition to updating PATHS, also set
1317 * their sticky ambient depth value to @a depth.
1318 *
1319 * If @a allow_unver_obstructions is TRUE then the update tolerates
1320 * existing unversioned items that obstruct added paths.  Only
1321 * obstructions of the same type (file or dir) as the added item are
1322 * tolerated.  The text of obstructing files is left as-is, effectively
1323 * treating it as a user modification after the update.  Working
1324 * properties of obstructing items are set equal to the base properties.
1325 * If @a allow_unver_obstructions is FALSE then the update will abort
1326 * if there are any unversioned obstructing items.
1327 *
1328 * If @a adds_as_modification is TRUE, a local addition at the same path
1329 * as an incoming addition of the same node kind results in a normal node
1330 * with a possible local modification, instead of a tree conflict.
1331 *
1332 * If @a make_parents is TRUE, create any non-existent parent
1333 * directories also by checking them out at depth=empty.
1334 *
1335 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
1336 * @a ctx->notify_baton2 for each item handled by the update, and also for
1337 * files restored from text-base.  If @a ctx->cancel_func is non-NULL, invoke
1338 * it passing @a ctx->cancel_baton at various places during the update.
1339 *
1340 * Use @a pool for any temporary allocation.
1341 *
1342 *  @todo  Multiple Targets
1343 *  - Up for debate:  an update on multiple targets is *not* atomic.
1344 *  Right now, svn_client_update only takes one path.  What's
1345 *  debatable is whether this should ever change.  On the one hand,
1346 *  it's kind of losing to have the client application loop over
1347 *  targets and call svn_client_update() on each one;  each call to
1348 *  update initializes a whole new repository session (network
1349 *  overhead, etc.)  On the other hand, it's a very simple
1350 *  implementation, and allows for the possibility that different
1351 *  targets may come from different repositories.
1352 *
1353 * @since New in 1.7.
1354 */
1355svn_error_t *
1356svn_client_update4(apr_array_header_t **result_revs,
1357                   const apr_array_header_t *paths,
1358                   const svn_opt_revision_t *revision,
1359                   svn_depth_t depth,
1360                   svn_boolean_t depth_is_sticky,
1361                   svn_boolean_t ignore_externals,
1362                   svn_boolean_t allow_unver_obstructions,
1363                   svn_boolean_t adds_as_modification,
1364                   svn_boolean_t make_parents,
1365                   svn_client_ctx_t *ctx,
1366                   apr_pool_t *pool);
1367
1368/**
1369 * Similar to svn_client_update4() but with @a make_parents always set
1370 * to FALSE and @a adds_as_modification set to TRUE.
1371 *
1372 * @deprecated Provided for backward compatibility with the 1.6 API.
1373 * @since New in 1.5.
1374 */
1375SVN_DEPRECATED
1376svn_error_t *
1377svn_client_update3(apr_array_header_t **result_revs,
1378                   const apr_array_header_t *paths,
1379                   const svn_opt_revision_t *revision,
1380                   svn_depth_t depth,
1381                   svn_boolean_t depth_is_sticky,
1382                   svn_boolean_t ignore_externals,
1383                   svn_boolean_t allow_unver_obstructions,
1384                   svn_client_ctx_t *ctx,
1385                   apr_pool_t *pool);
1386
1387/**
1388 * Similar to svn_client_update3() but with @a allow_unver_obstructions
1389 * always set to FALSE, @a depth_is_sticky to FALSE, and @a depth set
1390 * according to @a recurse: if @a recurse is TRUE, set @a depth to
1391 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
1392 * #svn_depth_files.
1393 *
1394 * @deprecated Provided for backward compatibility with the 1.4 API.
1395 */
1396SVN_DEPRECATED
1397svn_error_t *
1398svn_client_update2(apr_array_header_t **result_revs,
1399                   const apr_array_header_t *paths,
1400                   const svn_opt_revision_t *revision,
1401                   svn_boolean_t recurse,
1402                   svn_boolean_t ignore_externals,
1403                   svn_client_ctx_t *ctx,
1404                   apr_pool_t *pool);
1405
1406/**
1407 * Similar to svn_client_update2() except that it accepts only a single
1408 * target in @a path, returns a single revision if @a result_rev is
1409 * not NULL, and @a ignore_externals is always set to FALSE.
1410 *
1411 * @deprecated Provided for backward compatibility with the 1.1 API.
1412 */
1413SVN_DEPRECATED
1414svn_error_t *
1415svn_client_update(svn_revnum_t *result_rev,
1416                  const char *path,
1417                  const svn_opt_revision_t *revision,
1418                  svn_boolean_t recurse,
1419                  svn_client_ctx_t *ctx,
1420                  apr_pool_t *pool);
1421/** @} */
1422
1423/**
1424 * @defgroup Switch Switch a working copy to another location.
1425 *
1426 * @{
1427 */
1428
1429/**
1430 * Switch an existing working copy directory to a different repository
1431 * location.
1432 *
1433 * This is normally used to switch a working copy directory over to another
1434 * line of development, such as a branch or a tag.  Switching an existing
1435 * working copy directory is more efficient than checking out @a url from
1436 * scratch.
1437 *
1438 * @param[out] result_rev   If non-NULL, the value of the revision to which
1439 *                          the working copy was actually switched.
1440 * @param[in] path      The directory to be switched.  This need not be the
1441 *              root of a working copy.
1442 * @param[in] url       The repository URL to switch to.
1443 * @param[in] peg_revision  The peg revision.
1444 * @param[in] revision  The operative revision.
1445 * @param[in] depth     The depth of the operation.  If #svn_depth_infinity,
1446 *                      switch fully recursively.  Else if #svn_depth_immediates,
1447 *                      switch @a path and its file children (if any), and
1448 *                      switch subdirectories but do not update them.  Else if
1449 *                      #svn_depth_files, switch just file children, ignoring
1450 *                      subdirectories completely.  Else if #svn_depth_empty,
1451 *                      switch just @a path and touch nothing underneath it.
1452 * @param[in] depth_is_sticky   If @c TRUE, and @a depth is not
1453 *              #svn_depth_unknown, then in addition to switching @a path, also
1454 *              set its sticky ambient depth value to @a depth.
1455 * @param[in] ignore_externals  If @c TRUE, don't process externals
1456 *              definitions as part of this operation.
1457 * @param[in] allow_unver_obstructions  If @c TRUE, then tolerate existing
1458 *              unversioned items that obstruct incoming paths.  Only
1459 *              obstructions of the same type (file or dir) as the added
1460 *              item are tolerated.  The text of obstructing files is left
1461 *              as-is, effectively treating it as a user modification after
1462 *              the checkout.  Working properties of obstructing items are
1463 *              set equal to the base properties. <br>
1464 *              If @c FALSE, then abort if there are any unversioned
1465 *              obstructing items.
1466 * @param[in] ignore_ancestry  If @c FALSE, then verify that the file
1467 *              or directory at @a path shares some common version control
1468 *              ancestry with the switch URL location (represented by the
1469 *              combination of @a url, @a peg_revision, and @a revision),
1470 *              and returning #SVN_ERR_CLIENT_UNRELATED_RESOURCES if they
1471 *              do not. If @c TRUE, no such sanity checks are performed.
1472 *
1473 * @param[in] ctx   The standard client context, used for authentication and
1474 *              notification.  The notifier is invoked for paths affected by
1475 *              the switch, and also for files which may be restored from the
1476 *              pristine store after being previously removed from the working
1477 *              copy.
1478 * @param[in] pool  Used for any temporary allocation.
1479 *
1480 * @return A pointer to an #svn_error_t of the type (this list is not
1481 *         exhaustive): <br>
1482 *         #SVN_ERR_CLIENT_BAD_REVISION if @a revision is not one of
1483 *         #svn_opt_revision_number, #svn_opt_revision_head, or
1484 *         #svn_opt_revision_date. <br>
1485 *         If no error occurred, return #SVN_NO_ERROR.
1486 *
1487 * @since New in 1.7.
1488 *
1489 * @see #svn_depth_t <br> #svn_client_ctx_t <br> @ref clnt_revisions for
1490 *      a discussion of operative and peg revisions.
1491 */
1492svn_error_t *
1493svn_client_switch3(svn_revnum_t *result_rev,
1494                   const char *path,
1495                   const char *url,
1496                   const svn_opt_revision_t *peg_revision,
1497                   const svn_opt_revision_t *revision,
1498                   svn_depth_t depth,
1499                   svn_boolean_t depth_is_sticky,
1500                   svn_boolean_t ignore_externals,
1501                   svn_boolean_t allow_unver_obstructions,
1502                   svn_boolean_t ignore_ancestry,
1503                   svn_client_ctx_t *ctx,
1504                   apr_pool_t *pool);
1505
1506
1507/**
1508 * Similar to svn_client_switch3() but with @a ignore_ancestry always
1509 * set to TRUE.
1510 *
1511 * @since New in 1.5.
1512 * @deprecated Provided for backward compatibility with the 1.4 API.
1513 */
1514SVN_DEPRECATED
1515svn_error_t *
1516svn_client_switch2(svn_revnum_t *result_rev,
1517                   const char *path,
1518                   const char *url,
1519                   const svn_opt_revision_t *peg_revision,
1520                   const svn_opt_revision_t *revision,
1521                   svn_depth_t depth,
1522                   svn_boolean_t depth_is_sticky,
1523                   svn_boolean_t ignore_externals,
1524                   svn_boolean_t allow_unver_obstructions,
1525                   svn_client_ctx_t *ctx,
1526                   apr_pool_t *pool);
1527
1528
1529/**
1530 * Similar to svn_client_switch2() but with @a allow_unver_obstructions,
1531 * @a ignore_externals, and @a depth_is_sticky always set to FALSE,
1532 * and @a depth set according to @a recurse: if @a recurse is TRUE,
1533 * set @a depth to #svn_depth_infinity, if @a recurse is FALSE, set
1534 * @a depth to #svn_depth_files.
1535 *
1536 * @deprecated Provided for backward compatibility with the 1.4 API.
1537 */
1538SVN_DEPRECATED
1539svn_error_t *
1540svn_client_switch(svn_revnum_t *result_rev,
1541                  const char *path,
1542                  const char *url,
1543                  const svn_opt_revision_t *revision,
1544                  svn_boolean_t recurse,
1545                  svn_client_ctx_t *ctx,
1546                  apr_pool_t *pool);
1547
1548/** @} */
1549
1550/**
1551 * @defgroup Add Begin versioning files/directories in a working copy.
1552 *
1553 * @{
1554 */
1555
1556/**
1557 * Schedule a working copy @a path for addition to the repository.
1558 *
1559 * If @a depth is #svn_depth_empty, add just @a path and nothing
1560 * below it.  If #svn_depth_files, add @a path and any file
1561 * children of @a path.  If #svn_depth_immediates, add @a path, any
1562 * file children, and any immediate subdirectories (but nothing
1563 * underneath those subdirectories).  If #svn_depth_infinity, add
1564 * @a path and everything under it fully recursively.
1565 *
1566 * @a path's parent must be under revision control already (unless
1567 * @a add_parents is TRUE), but @a path is not.
1568 *
1569 * If @a force is not set and @a path is already under version
1570 * control, return the error #SVN_ERR_ENTRY_EXISTS.  If @a force is
1571 * set, do not error on already-versioned items.  When used on a
1572 * directory in conjunction with a @a depth value greater than
1573 * #svn_depth_empty, this has the effect of scheduling for addition
1574 * any unversioned files and directories scattered within even a
1575 * versioned tree (up to @a depth).
1576 *
1577 * If @a ctx->notify_func2 is non-NULL, then for each added item, call
1578 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the
1579 * added item.
1580 *
1581 * If @a no_ignore is FALSE, don't add any file or directory (or recurse
1582 * into any directory) that is unversioned and found by recursion (as
1583 * opposed to being the explicit target @a path) and whose name matches the
1584 * svn:ignore property on its parent directory or the global-ignores list in
1585 * @a ctx->config. If @a no_ignore is TRUE, do include such files and
1586 * directories. (Note that an svn:ignore property can influence this
1587 * behaviour only when recursing into an already versioned directory with @a
1588 * force.)
1589 *
1590 * If @a no_autoprops is TRUE, don't set any autoprops on added files. If
1591 * @a no_autoprops is FALSE then all added files have autprops set as per
1592 * the auto-props list in @a ctx->config and the value of any
1593 * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by the nearest
1594 * parents of @a path which are already under version control.
1595 *
1596 * If @a add_parents is TRUE, recurse up @a path's directory and look for
1597 * a versioned directory.  If found, add all intermediate paths between it
1598 * and @a path.  If not found, return #SVN_ERR_CLIENT_NO_VERSIONED_PARENT.
1599 *
1600 * @a scratch_pool is used for temporary allocations only.
1601 *
1602 * @par Important:
1603 * This is a *scheduling* operation.  No changes will
1604 * happen to the repository until a commit occurs.  This scheduling
1605 * can be removed with svn_client_revert2().
1606 *
1607 * @since New in 1.8.
1608 */
1609svn_error_t *
1610svn_client_add5(const char *path,
1611                svn_depth_t depth,
1612                svn_boolean_t force,
1613                svn_boolean_t no_ignore,
1614                svn_boolean_t no_autoprops,
1615                svn_boolean_t add_parents,
1616                svn_client_ctx_t *ctx,
1617                apr_pool_t *scratch_pool);
1618
1619/**
1620 * Similar to svn_client_add5(), but with @a no_autoprops always set to
1621 * FALSE.
1622 *
1623 * @deprecated Provided for backward compatibility with the 1.7 API.
1624 */
1625SVN_DEPRECATED
1626svn_error_t *
1627svn_client_add4(const char *path,
1628                svn_depth_t depth,
1629                svn_boolean_t force,
1630                svn_boolean_t no_ignore,
1631                svn_boolean_t add_parents,
1632                svn_client_ctx_t *ctx,
1633                apr_pool_t *pool);
1634
1635/**
1636 * Similar to svn_client_add4(), but with @a add_parents always set to
1637 * FALSE and @a depth set according to @a recursive: if TRUE, then
1638 * @a depth is #svn_depth_infinity, if FALSE, then #svn_depth_empty.
1639 *
1640 * @deprecated Provided for backward compatibility with the 1.4 API.
1641 */
1642SVN_DEPRECATED
1643svn_error_t *
1644svn_client_add3(const char *path,
1645                svn_boolean_t recursive,
1646                svn_boolean_t force,
1647                svn_boolean_t no_ignore,
1648                svn_client_ctx_t *ctx,
1649                apr_pool_t *pool);
1650
1651/**
1652 * Similar to svn_client_add3(), but with @a no_ignore always set to
1653 * FALSE.
1654 *
1655 * @deprecated Provided for backward compatibility with the 1.2 API.
1656 */
1657SVN_DEPRECATED
1658svn_error_t *
1659svn_client_add2(const char *path,
1660                svn_boolean_t recursive,
1661                svn_boolean_t force,
1662                svn_client_ctx_t *ctx,
1663                apr_pool_t *pool);
1664
1665/**
1666 * Similar to svn_client_add2(), but with @a force always set to FALSE.
1667 *
1668 * @deprecated Provided for backward compatibility with the 1.0 API.
1669 */
1670SVN_DEPRECATED
1671svn_error_t *
1672svn_client_add(const char *path,
1673               svn_boolean_t recursive,
1674               svn_client_ctx_t *ctx,
1675               apr_pool_t *pool);
1676
1677/** @} */
1678
1679/**
1680 * @defgroup Mkdir Create directories in a working copy or repository.
1681 *
1682 * @{
1683 */
1684
1685/** Create a directory, either in a repository or a working copy.
1686 *
1687 * @a paths is an array of (const char *) paths, either all local WC paths
1688 * or all URLs.
1689 *
1690 * If @a paths contains URLs, use the authentication baton in @a ctx
1691 * and @a message to immediately attempt to commit the creation of the
1692 * directories in @a paths in the repository.
1693 *
1694 * Else, create the directories on disk, and attempt to schedule them
1695 * for addition (using svn_client_add(), whose docstring you should
1696 * read).
1697 *
1698 * If @a make_parents is TRUE, create any non-existent parent directories
1699 * also.
1700 *
1701 * If non-NULL, @a revprop_table is a hash table holding additional,
1702 * custom revision properties (<tt>const char *</tt> names mapped to
1703 * <tt>svn_string_t *</tt> values) to be set on the new revision in
1704 * the event that this is a committing operation.  This table cannot
1705 * contain any standard Subversion properties.
1706 *
1707 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1708 * combo that this function can use to query for a commit log message
1709 * when one is needed.
1710 *
1711 * If @a ctx->notify_func2 is non-NULL, when the directory has been created
1712 * (successfully) in the working copy, call @a ctx->notify_func2 with
1713 * @a ctx->notify_baton2 and the path of the new directory.  Note that this is
1714 * only called for items added to the working copy.
1715 *
1716 * If @a commit_callback is non-NULL, then for each successful commit, call
1717 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
1718 * the commit.
1719 *
1720 * @since New in 1.7.
1721 */
1722svn_error_t *
1723svn_client_mkdir4(const apr_array_header_t *paths,
1724                  svn_boolean_t make_parents,
1725                  const apr_hash_t *revprop_table,
1726                  svn_commit_callback2_t commit_callback,
1727                  void *commit_baton,
1728                  svn_client_ctx_t *ctx,
1729                  apr_pool_t *pool);
1730
1731/**
1732 * Similar to svn_client_mkdir4(), but returns the commit info in
1733 * @a *commit_info_p rather than through a callback function.
1734 *
1735 * @since New in 1.5.
1736 * @deprecated Provided for backward compatibility with the 1.6 API.
1737 */
1738SVN_DEPRECATED
1739svn_error_t *
1740svn_client_mkdir3(svn_commit_info_t **commit_info_p,
1741                  const apr_array_header_t *paths,
1742                  svn_boolean_t make_parents,
1743                  const apr_hash_t *revprop_table,
1744                  svn_client_ctx_t *ctx,
1745                  apr_pool_t *pool);
1746
1747
1748/**
1749 * Same as svn_client_mkdir3(), but with @a make_parents always FALSE,
1750 * and @a revprop_table always NULL.
1751 *
1752 * @since New in 1.3.
1753 * @deprecated Provided for backward compatibility with the 1.4 API.
1754 */
1755SVN_DEPRECATED
1756svn_error_t *
1757svn_client_mkdir2(svn_commit_info_t **commit_info_p,
1758                  const apr_array_header_t *paths,
1759                  svn_client_ctx_t *ctx,
1760                  apr_pool_t *pool);
1761
1762/**
1763 * Same as svn_client_mkdir2(), but takes the #svn_client_commit_info_t
1764 * type for @a commit_info_p.
1765 *
1766 * @deprecated Provided for backward compatibility with the 1.2 API.
1767 */
1768SVN_DEPRECATED
1769svn_error_t *
1770svn_client_mkdir(svn_client_commit_info_t **commit_info_p,
1771                 const apr_array_header_t *paths,
1772                 svn_client_ctx_t *ctx,
1773                 apr_pool_t *pool);
1774
1775/** @} */
1776
1777/**
1778 * @defgroup Delete Remove files/directories from a working copy or repository.
1779 *
1780 * @{
1781 */
1782
1783/** Delete items from a repository or working copy.
1784 *
1785 * @a paths is an array of (const char *) paths, either all local WC paths
1786 * or all URLs.
1787 *
1788 * If the paths in @a paths are URLs, use the authentication baton in
1789 * @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to
1790 * immediately attempt to commit a deletion of the URLs from the
1791 * repository.  Every path must belong to the same repository.
1792 *
1793 * Else, schedule the working copy paths in @a paths for removal from
1794 * the repository.  Each path's parent must be under revision control.
1795 * This is just a *scheduling* operation.  No changes will happen to
1796 * the repository until a commit occurs.  This scheduling can be
1797 * removed with svn_client_revert2(). If a path is a file it is
1798 * immediately removed from the working copy. If the path is a
1799 * directory it will remain in the working copy but all the files, and
1800 * all unversioned items, it contains will be removed. If @a force is
1801 * not set then this operation will fail if any path contains locally
1802 * modified and/or unversioned items. If @a force is set such items
1803 * will be deleted.
1804 *
1805 * If the paths are working copy paths and @a keep_local is TRUE then
1806 * the paths will not be removed from the working copy, only scheduled
1807 * for removal from the repository.  Once the scheduled deletion is
1808 * committed, they will appear as unversioned paths in the working copy.
1809 *
1810 * If non-NULL, @a revprop_table is a hash table holding additional,
1811 * custom revision properties (<tt>const char *</tt> names mapped to
1812 * <tt>svn_string_t *</tt> values) to be set on the new revision in
1813 * the event that this is a committing operation.  This table cannot
1814 * contain any standard Subversion properties.
1815 *
1816 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1817 * combo that this function can use to query for a commit log message
1818 * when one is needed.
1819 *
1820 * If @a ctx->notify_func2 is non-NULL, then for each item deleted, call
1821 * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted
1822 * item.
1823 *
1824 * If @a commit_callback is non-NULL, then for each successful commit, call
1825 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
1826 * the commit.
1827 *
1828 * @since New in 1.7.
1829 */
1830svn_error_t *
1831svn_client_delete4(const apr_array_header_t *paths,
1832                   svn_boolean_t force,
1833                   svn_boolean_t keep_local,
1834                   const apr_hash_t *revprop_table,
1835                   svn_commit_callback2_t commit_callback,
1836                   void *commit_baton,
1837                   svn_client_ctx_t *ctx,
1838                   apr_pool_t *pool);
1839
1840/**
1841 * Similar to svn_client_delete4(), but returns the commit info in
1842 * @a *commit_info_p rather than through a callback function.
1843 *
1844 * @since New in 1.5.
1845 * @deprecated Provided for backward compatibility with the 1.6 API.
1846 */
1847SVN_DEPRECATED
1848svn_error_t *
1849svn_client_delete3(svn_commit_info_t **commit_info_p,
1850                   const apr_array_header_t *paths,
1851                   svn_boolean_t force,
1852                   svn_boolean_t keep_local,
1853                   const apr_hash_t *revprop_table,
1854                   svn_client_ctx_t *ctx,
1855                   apr_pool_t *pool);
1856
1857/**
1858 * Similar to svn_client_delete3(), but with @a keep_local always set
1859 * to FALSE, and @a revprop_table passed as NULL.
1860 *
1861 * @deprecated Provided for backward compatibility with the 1.4 API.
1862 */
1863SVN_DEPRECATED
1864svn_error_t *
1865svn_client_delete2(svn_commit_info_t **commit_info_p,
1866                   const apr_array_header_t *paths,
1867                   svn_boolean_t force,
1868                   svn_client_ctx_t *ctx,
1869                   apr_pool_t *pool);
1870
1871/**
1872 * Similar to svn_client_delete2(), but takes the #svn_client_commit_info_t
1873 * type for @a commit_info_p.
1874 *
1875 * @deprecated Provided for backward compatibility with the 1.2 API.
1876 */
1877SVN_DEPRECATED
1878svn_error_t *
1879svn_client_delete(svn_client_commit_info_t **commit_info_p,
1880                  const apr_array_header_t *paths,
1881                  svn_boolean_t force,
1882                  svn_client_ctx_t *ctx,
1883                  apr_pool_t *pool);
1884
1885
1886/** @} */
1887
1888/**
1889 * @defgroup Import Import files into the repository.
1890 *
1891 * @{
1892 */
1893
1894/**
1895 * The callback invoked by svn_client_import5() before adding a node to the
1896 * list of nodes to be imported.
1897 *
1898 * @a baton is the value passed to @a svn_client_import5 as filter_baton.
1899 *
1900 * The callback receives the @a local_abspath for each node and the @a dirent
1901 * for it when walking the directory tree. Only the kind of node, including
1902 * special status is available in @a dirent.
1903 *
1904 * Implementations can set @a *filtered to TRUE, to make the import
1905 * process omit the node and (if the node is a directory) all its
1906 * descendants.
1907 *
1908 * @a scratch_pool can be used for temporary allocations.
1909 *
1910 * @since New in 1.8.
1911 */
1912typedef svn_error_t *(*svn_client_import_filter_func_t)(
1913  void *baton,
1914  svn_boolean_t *filtered,
1915  const char *local_abspath,
1916  const svn_io_dirent2_t *dirent,
1917  apr_pool_t *scratch_pool);
1918
1919/** Import file or directory @a path into repository directory @a url at
1920 * head, authenticating with the authentication baton cached in @a ctx,
1921 * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message
1922 * for the (implied) commit.  If some components of @a url do not exist
1923 * then create parent directories as necessary.
1924 *
1925 * This function reads an unversioned tree from disk and skips any ".svn"
1926 * directories. Even if a file or directory being imported is part of an
1927 * existing WC, this function sees it as unversioned and does not notice any
1928 * existing Subversion properties in it.
1929 *
1930 * If @a path is a directory, the contents of that directory are
1931 * imported directly into the directory identified by @a url.  Note that the
1932 * directory @a path itself is not imported -- that is, the basename of
1933 * @a path is not part of the import.
1934 *
1935 * If @a path is a file, then the dirname of @a url is the directory
1936 * receiving the import.  The basename of @a url is the filename in the
1937 * repository.  In this case if @a url already exists, return error.
1938 *
1939 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
1940 * @a ctx->notify_baton2 as the import progresses, with any of the following
1941 * actions: #svn_wc_notify_commit_added,
1942 * #svn_wc_notify_commit_postfix_txdelta.
1943 *
1944 * Use @a scratch_pool for any temporary allocation.
1945 *
1946 * If non-NULL, @a revprop_table is a hash table holding additional,
1947 * custom revision properties (<tt>const char *</tt> names mapped to
1948 * <tt>svn_string_t *</tt> values) to be set on the new revision.
1949 * This table cannot contain any standard Subversion properties.
1950 *
1951 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1952 * combo that this function can use to query for a commit log message
1953 * when one is needed.
1954 *
1955 * If @a depth is #svn_depth_empty, import just @a path and nothing
1956 * below it.  If #svn_depth_files, import @a path and any file
1957 * children of @a path.  If #svn_depth_immediates, import @a path, any
1958 * file children, and any immediate subdirectories (but nothing
1959 * underneath those subdirectories).  If #svn_depth_infinity, import
1960 * @a path and everything under it fully recursively.
1961 *
1962 * If @a no_ignore is @c FALSE, don't import any file or directory (or
1963 * recurse into any directory) that is found by recursion (as opposed to
1964 * being the explicit target @a path) and whose name matches the
1965 * global-ignores list in @a ctx->config. If @a no_ignore is @c TRUE, do
1966 * include such files and directories. (Note that svn:ignore properties are
1967 * not involved, as auto-props cannot set properties on directories and even
1968 * if the target is part of a WC the import ignores any existing
1969 * properties.)
1970 *
1971 * If @a no_autoprops is TRUE, don't set any autoprops on imported files. If
1972 * @a no_autoprops is FALSE then all imported files have autprops set as per
1973 * the auto-props list in @a ctx->config and the value of any
1974 * @c SVN_PROP_INHERITABLE_AUTO_PROPS properties inherited by and explicitly set
1975 * on @a url if @a url is already under versioned control, or the nearest parents
1976 * of @a path which are already under version control if not.
1977 *
1978 * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the
1979 * node type is unknown, such as device files and pipes.
1980 *
1981 * If @a filter_callback is non-NULL, call it for each node that isn't ignored
1982 * for other reasons with @a filter_baton, to allow third party to ignore
1983 * specific nodes during importing.
1984 *
1985 * If @a commit_callback is non-NULL, then for each successful commit, call
1986 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
1987 * the commit.
1988 *
1989 * @since New in 1.8.
1990 */
1991svn_error_t *
1992svn_client_import5(const char *path,
1993                   const char *url,
1994                   svn_depth_t depth,
1995                   svn_boolean_t no_ignore,
1996                   svn_boolean_t no_autoprops,
1997                   svn_boolean_t ignore_unknown_node_types,
1998                   const apr_hash_t *revprop_table,
1999                   svn_client_import_filter_func_t filter_callback,
2000                   void *filter_baton,
2001                   svn_commit_callback2_t commit_callback,
2002                   void *commit_baton,
2003                   svn_client_ctx_t *ctx,
2004                   apr_pool_t *scratch_pool);
2005
2006/**
2007 * Similar to svn_client_import5(), but without support for an optional
2008 * @a filter_callback and @a no_autoprops always set to FALSE.
2009 *
2010 * @since New in 1.7.
2011 * @deprecated Provided for backward compatibility with the 1.7 API.
2012 */
2013SVN_DEPRECATED
2014svn_error_t *
2015svn_client_import4(const char *path,
2016                   const char *url,
2017                   svn_depth_t depth,
2018                   svn_boolean_t no_ignore,
2019                   svn_boolean_t ignore_unknown_node_types,
2020                   const apr_hash_t *revprop_table,
2021                   svn_commit_callback2_t commit_callback,
2022                   void *commit_baton,
2023                   svn_client_ctx_t *ctx,
2024                   apr_pool_t *pool);
2025
2026/**
2027 * Similar to svn_client_import4(), but returns the commit info in
2028 * @a *commit_info_p rather than through a callback function.
2029 *
2030 * @since New in 1.5.
2031 * @deprecated Provided for backward compatibility with the 1.6 API.
2032 */
2033SVN_DEPRECATED
2034svn_error_t *
2035svn_client_import3(svn_commit_info_t **commit_info_p,
2036                   const char *path,
2037                   const char *url,
2038                   svn_depth_t depth,
2039                   svn_boolean_t no_ignore,
2040                   svn_boolean_t ignore_unknown_node_types,
2041                   const apr_hash_t *revprop_table,
2042                   svn_client_ctx_t *ctx,
2043                   apr_pool_t *pool);
2044
2045/**
2046 * Similar to svn_client_import3(), but with @a ignore_unknown_node_types
2047 * always set to @c FALSE, @a revprop_table passed as NULL, and @a
2048 * depth set according to @a nonrecursive: if TRUE, then @a depth is
2049 * #svn_depth_files, else #svn_depth_infinity.
2050 *
2051 * @since New in 1.3.
2052 *
2053 * @deprecated Provided for backward compatibility with the 1.4 API
2054 */
2055SVN_DEPRECATED
2056svn_error_t *
2057svn_client_import2(svn_commit_info_t **commit_info_p,
2058                   const char *path,
2059                   const char *url,
2060                   svn_boolean_t nonrecursive,
2061                   svn_boolean_t no_ignore,
2062                   svn_client_ctx_t *ctx,
2063                   apr_pool_t *pool);
2064
2065/**
2066 * Similar to svn_client_import2(), but with @a no_ignore always set
2067 * to FALSE and using the #svn_client_commit_info_t type for
2068 * @a commit_info_p.
2069 *
2070 * @deprecated Provided for backward compatibility with the 1.2 API.
2071 */
2072SVN_DEPRECATED
2073svn_error_t *
2074svn_client_import(svn_client_commit_info_t **commit_info_p,
2075                  const char *path,
2076                  const char *url,
2077                  svn_boolean_t nonrecursive,
2078                  svn_client_ctx_t *ctx,
2079                  apr_pool_t *pool);
2080
2081/** @} */
2082
2083/**
2084 * @defgroup Commit Commit local modifications to the repository.
2085 *
2086 * @{
2087 */
2088
2089/**
2090 * Commit files or directories into repository, authenticating with
2091 * the authentication baton cached in @a ctx, and using
2092 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message.
2093 * Set @a *commit_info_p to the results of the commit, allocated in @a pool.
2094 *
2095 * @a targets is an array of <tt>const char *</tt> paths to commit.  They
2096 * need not be canonicalized nor condensed; this function will take care of
2097 * that.  If @a targets has zero elements, then do nothing and return
2098 * immediately without error.
2099 *
2100 * If non-NULL, @a revprop_table is a hash table holding additional,
2101 * custom revision properties (<tt>const char *</tt> names mapped to
2102 * <tt>svn_string_t *</tt> values) to be set on the new revision.
2103 * This table cannot contain any standard Subversion properties.
2104 *
2105 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
2106 * @a ctx->notify_baton2 as the commit progresses, with any of the following
2107 * actions: #svn_wc_notify_commit_modified, #svn_wc_notify_commit_added,
2108 * #svn_wc_notify_commit_deleted, #svn_wc_notify_commit_replaced,
2109 * #svn_wc_notify_commit_copied, #svn_wc_notify_commit_copied_replaced,
2110 * #svn_wc_notify_commit_postfix_txdelta.
2111 *
2112 * If @a depth is #svn_depth_infinity, commit all changes to and
2113 * below named targets.  If @a depth is #svn_depth_empty, commit
2114 * only named targets (that is, only property changes on named
2115 * directory targets, and property and content changes for named file
2116 * targets).  If @a depth is #svn_depth_files, behave as above for
2117 * named file targets, and for named directory targets, commit
2118 * property changes on a named directory and all changes to files
2119 * directly inside that directory.  If #svn_depth_immediates, behave
2120 * as for #svn_depth_files, and for subdirectories of any named
2121 * directory target commit as though for #svn_depth_empty.
2122 *
2123 * Unlock paths in the repository, unless @a keep_locks is TRUE.
2124 *
2125 * @a changelists is an array of <tt>const char *</tt> changelist
2126 * names, used as a restrictive filter on items that are committed;
2127 * that is, don't commit anything unless it's a member of one of those
2128 * changelists.  After the commit completes successfully, remove
2129 * changelist associations from the targets, unless @a
2130 * keep_changelists is set.  If @a changelists is
2131 * empty (or altogether @c NULL), no changelist filtering occurs.
2132 *
2133 * If @a commit_as_operations is set to FALSE, when a copy is committed
2134 * all changes below the copy are always committed at the same time
2135 * (independent of the value of @a depth). If @a commit_as_operations is
2136 * #TRUE, changes to descendants are only committed if they are itself
2137 * included via @a depth and targets.
2138 *
2139 * If @a include_file_externals and/or @a include_dir_externals are #TRUE,
2140 * also commit all file and/or dir externals (respectively) that are reached
2141 * by recursion, except for those externals which:
2142 *     - have a fixed revision, or
2143 *     - come from a different repository root URL (dir externals).
2144 * These flags affect only recursion; externals that directly appear in @a
2145 * targets are always included in the commit.
2146 *
2147 * ### TODO: currently, file externals hidden inside an unversioned dir are
2148 *     skipped deliberately, because we can't commit those yet.
2149 *     See STMT_SELECT_COMMITTABLE_EXTERNALS_BELOW.
2150 *
2151 * ### TODO: With @c depth_immediates, this function acts as if
2152 *     @a include_dir_externals was passed #FALSE, but caller expects
2153 *     immediate child dir externals to be included @c depth_empty.
2154 *
2155 * When @a commit_as_operations is #TRUE it is possible to delete a node and
2156 * all its descendants by selecting just the root of the deletion. If it is
2157 * set to #FALSE this will raise an error.
2158 *
2159 * If @a commit_callback is non-NULL, then for each successful commit, call
2160 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
2161 * the commit.
2162 *
2163 * @note #svn_depth_unknown and #svn_depth_exclude must not be passed
2164 * for @a depth.
2165 *
2166 * Use @a pool for any temporary allocations.
2167 *
2168 * @since New in 1.8.
2169 */
2170svn_error_t *
2171svn_client_commit6(const apr_array_header_t *targets,
2172                   svn_depth_t depth,
2173                   svn_boolean_t keep_locks,
2174                   svn_boolean_t keep_changelists,
2175                   svn_boolean_t commit_as_operations,
2176                   svn_boolean_t include_file_externals,
2177                   svn_boolean_t include_dir_externals,
2178                   const apr_array_header_t *changelists,
2179                   const apr_hash_t *revprop_table,
2180                   svn_commit_callback2_t commit_callback,
2181                   void *commit_baton,
2182                   svn_client_ctx_t *ctx,
2183                   apr_pool_t *pool);
2184
2185/**
2186 * Similar to svn_client_commit6(), but passes @a include_file_externals as
2187 * FALSE and @a include_dir_externals as FALSE.
2188 *
2189 * @since New in 1.7.
2190 * @deprecated Provided for backward compatibility with the 1.7 API.
2191 */
2192SVN_DEPRECATED
2193svn_error_t *
2194svn_client_commit5(const apr_array_header_t *targets,
2195                   svn_depth_t depth,
2196                   svn_boolean_t keep_locks,
2197                   svn_boolean_t keep_changelists,
2198                   svn_boolean_t commit_as_operations,
2199                   const apr_array_header_t *changelists,
2200                   const apr_hash_t *revprop_table,
2201                   svn_commit_callback2_t commit_callback,
2202                   void *commit_baton,
2203                   svn_client_ctx_t *ctx,
2204                   apr_pool_t *pool);
2205
2206/**
2207 * Similar to svn_client_commit5(), but returns the commit info in
2208 * @a *commit_info_p rather than through a callback function.  Does not use
2209 * #svn_wc_notify_commit_copied or #svn_wc_notify_commit_copied_replaced
2210 * (preferring #svn_wc_notify_commit_added and
2211 * #svn_wc_notify_commit_replaced, respectively, instead).
2212 *
2213 * Also, if no error is returned and @a (*commit_info_p)->revision is set to
2214 * #SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to
2215 * be committed.
2216 *
2217 * Sets @a commit_as_operations to FALSE to match Subversion 1.6's behavior.
2218 *
2219 * @since New in 1.5.
2220 * @deprecated Provided for backward compatibility with the 1.6 API.
2221 */
2222SVN_DEPRECATED
2223svn_error_t *
2224svn_client_commit4(svn_commit_info_t **commit_info_p,
2225                   const apr_array_header_t *targets,
2226                   svn_depth_t depth,
2227                   svn_boolean_t keep_locks,
2228                   svn_boolean_t keep_changelists,
2229                   const apr_array_header_t *changelists,
2230                   const apr_hash_t *revprop_table,
2231                   svn_client_ctx_t *ctx,
2232                   apr_pool_t *pool);
2233
2234/**
2235 * Similar to svn_client_commit4(), but always with NULL for
2236 * @a changelist_name, FALSE for @a keep_changelist, NULL for @a
2237 * revprop_table, and @a depth set according to @a recurse: if @a
2238 * recurse is TRUE, use #svn_depth_infinity, else #svn_depth_empty.
2239 *
2240 * @deprecated Provided for backward compatibility with the 1.4 API.
2241 *
2242 * @since New in 1.3.
2243 */
2244SVN_DEPRECATED
2245svn_error_t *
2246svn_client_commit3(svn_commit_info_t **commit_info_p,
2247                   const apr_array_header_t *targets,
2248                   svn_boolean_t recurse,
2249                   svn_boolean_t keep_locks,
2250                   svn_client_ctx_t *ctx,
2251                   apr_pool_t *pool);
2252
2253/**
2254 * Similar to svn_client_commit3(), but uses #svn_client_commit_info_t
2255 * for @a commit_info_p.
2256 *
2257 * @deprecated Provided for backward compatibility with the 1.2 API.
2258 *
2259 * @since New in 1.2.
2260 */
2261SVN_DEPRECATED
2262svn_error_t *
2263svn_client_commit2(svn_client_commit_info_t **commit_info_p,
2264                   const apr_array_header_t *targets,
2265                   svn_boolean_t recurse,
2266                   svn_boolean_t keep_locks,
2267                   svn_client_ctx_t *ctx,
2268                   apr_pool_t *pool);
2269
2270/**
2271 * Similar to svn_client_commit2(), but with @a keep_locks set to
2272 * TRUE and @a nonrecursive instead of @a recurse.
2273 *
2274 * @deprecated Provided for backward compatibility with the 1.1 API.
2275 */
2276SVN_DEPRECATED
2277svn_error_t *
2278svn_client_commit(svn_client_commit_info_t **commit_info_p,
2279                  const apr_array_header_t *targets,
2280                  svn_boolean_t nonrecursive,
2281                  svn_client_ctx_t *ctx,
2282                  apr_pool_t *pool);
2283
2284/** @} */
2285
2286/**
2287 * @defgroup Status Report interesting information about paths in the \
2288 *                  working copy.
2289 *
2290 * @{
2291 */
2292
2293/**
2294 * Structure for holding the "status" of a working copy item.
2295 *
2296 * @note Fields may be added to the end of this structure in future
2297 * versions.  Therefore, to preserve binary compatibility, users
2298 * should not directly allocate structures of this type.
2299 *
2300 * @since New in 1.7.
2301 */
2302typedef struct svn_client_status_t
2303{
2304  /** The kind of node as recorded in the working copy */
2305  svn_node_kind_t kind;
2306
2307  /** The absolute path to the node */
2308  const char *local_abspath;
2309
2310  /** The actual size of the working file on disk, or SVN_INVALID_FILESIZE
2311   * if unknown (or if the item isn't a file at all). */
2312  svn_filesize_t filesize;
2313
2314  /** If the path is under version control, versioned is TRUE, otherwise
2315   * FALSE. */
2316  svn_boolean_t versioned;
2317
2318  /** Set to TRUE if the node is the victim of some kind of conflict. */
2319  svn_boolean_t conflicted;
2320
2321  /** The status of the node, based on the restructuring changes and if the
2322   * node has no restructuring changes the text and prop status. */
2323  enum svn_wc_status_kind node_status;
2324
2325  /** The status of the text of the node, not including restructuring changes.
2326   * Valid values are: svn_wc_status_none, svn_wc_status_normal,
2327   * svn_wc_status_modified and svn_wc_status_conflicted. */
2328  enum svn_wc_status_kind text_status;
2329
2330  /** The status of the node's properties.
2331   * Valid values are: svn_wc_status_none, svn_wc_status_normal,
2332   * svn_wc_status_modified and svn_wc_status_conflicted. */
2333  enum svn_wc_status_kind prop_status;
2334
2335  /** A node can be 'locked' if a working copy update is in progress or
2336   * was interrupted. */
2337  svn_boolean_t wc_is_locked;
2338
2339  /** A file or directory can be 'copied' if it's scheduled for
2340   * addition-with-history (or part of a subtree that is scheduled as such.).
2341   */
2342  svn_boolean_t copied;
2343
2344  /** The URL of the repository root. */
2345  const char *repos_root_url;
2346
2347  /** The UUID of the repository */
2348  const char *repos_uuid;
2349
2350  /** The in-repository path relative to the repository root. */
2351  const char *repos_relpath;
2352
2353  /** Base revision. */
2354  svn_revnum_t revision;
2355
2356  /** Last revision this was changed */
2357  svn_revnum_t changed_rev;
2358
2359  /** Date of last commit. */
2360  apr_time_t changed_date;
2361
2362  /** Last commit author of this item */
2363  const char *changed_author;
2364
2365  /** A file or directory can be 'switched' if the switch command has been
2366   * used.  If this is TRUE, then file_external will be FALSE.
2367   */
2368  svn_boolean_t switched;
2369
2370  /** If the item is a file that was added to the working copy with an
2371   * svn:externals; if file_external is TRUE, then switched is always
2372   * FALSE.
2373   */
2374  svn_boolean_t file_external;
2375
2376  /** The locally present lock. (Values of path, token, owner, comment and
2377   * are available if a lock is present) */
2378  const svn_lock_t *lock;
2379
2380  /** Which changelist this item is part of, or NULL if not part of any. */
2381  const char *changelist;
2382
2383  /** The depth of the node as recorded in the working copy
2384   * (#svn_depth_unknown for files or when no depth is recorded) */
2385  svn_depth_t depth;
2386
2387  /**
2388   * @defgroup svn_wc_status_ood WC out-of-date info from the repository
2389   * @{
2390   *
2391   * When the working copy item is out-of-date compared to the
2392   * repository, the following fields represent the state of the
2393   * youngest revision of the item in the repository.  If the working
2394   * copy is not out of date, the fields are initialized as described
2395   * below.
2396   */
2397
2398  /** Set to the node kind of the youngest commit, or #svn_node_none
2399   * if not out of date. */
2400  svn_node_kind_t ood_kind;
2401
2402  /** The status of the node, based on the text status if the node has no
2403   * restructuring changes */
2404  enum svn_wc_status_kind repos_node_status;
2405
2406  /** The node's text status in the repository. */
2407  enum svn_wc_status_kind repos_text_status;
2408
2409  /** The node's property status in the repository. */
2410  enum svn_wc_status_kind repos_prop_status;
2411
2412  /** The node's lock in the repository, if any. */
2413  const svn_lock_t *repos_lock;
2414
2415  /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM
2416   * if not out of date. */
2417  svn_revnum_t ood_changed_rev;
2418
2419  /** Set to the most recent commit date, or @c 0 if not out of date. */
2420  apr_time_t ood_changed_date;
2421
2422  /** Set to the user name of the youngest commit, or @c NULL if not
2423   * out of date or non-existent.  Because a non-existent @c
2424   * svn:author property has the same behavior as an out-of-date
2425   * working copy, examine @c ood_changed_rev to determine whether
2426   * the working copy is out of date. */
2427  const char *ood_changed_author;
2428
2429  /** @} */
2430
2431  /** Reserved for libsvn_client's internal use; this value is only to be used
2432   * for libsvn_client backwards compatibility wrappers. This value may be NULL
2433   * or to other data in future versions. */
2434  const void *backwards_compatibility_baton;
2435
2436  /** Set to the local absolute path that this node was moved from, if this
2437   * file or directory has been moved here locally and is the root of that
2438   * move. Otherwise set to NULL.
2439   *
2440   * This will be NULL for moved-here nodes that are just part of a subtree
2441   * that was moved along (and are not themselves a root of a different move
2442   * operation).
2443   *
2444   * @since New in 1.8. */
2445  const char *moved_from_abspath;
2446
2447  /** Set to the local absolute path that this node was moved to, if this file
2448   * or directory has been moved away locally and corresponds to the root
2449   * of the destination side of the move. Otherwise set to NULL.
2450   *
2451   * Note: Saying just "root" here could be misleading. For example:
2452   *   svn mv A AA;
2453   *   svn mv AA/B BB;
2454   * creates a situation where A/B is moved-to BB, but one could argue that
2455   * the move source's root actually was AA/B. Note that, as far as the
2456   * working copy is concerned, above case is exactly identical to:
2457   *   svn mv A/B BB;
2458   *   svn mv A AA;
2459   * In both situations, @a moved_to_abspath would be set for nodes A (moved
2460   * to AA) and A/B (moved to BB), only.
2461   *
2462   * This will be NULL for moved-away nodes that were just part of a subtree
2463   * that was moved along (and are not themselves a root of a different move
2464   * operation).
2465   *
2466   * @since New in 1.8. */
2467  const char *moved_to_abspath;
2468
2469  /* NOTE! Please update svn_client_status_dup() when adding new fields here. */
2470} svn_client_status_t;
2471
2472/**
2473 * Return a duplicate of @a status, allocated in @a result_pool. No part of the new
2474 * structure will be shared with @a status.
2475 *
2476 * @since New in 1.7.
2477 */
2478svn_client_status_t *
2479svn_client_status_dup(const svn_client_status_t *status,
2480                      apr_pool_t *result_pool);
2481
2482/**
2483 * A callback for reporting a @a status about @a path (which may be an
2484 * absolute or relative path).
2485 *
2486 * @a baton is a closure object; it should be provided by the
2487 * implementation, and passed by the caller.
2488 *
2489 * @a scratch_pool will be cleared between invocations to the callback.
2490 *
2491 * @since New in 1.7.
2492 */
2493typedef svn_error_t *(*svn_client_status_func_t)(
2494                                            void *baton,
2495                                            const char *path,
2496                                            const svn_client_status_t *status,
2497                                            apr_pool_t *scratch_pool);
2498
2499/**
2500 * Given @a path to a working copy directory (or single file), call
2501 * @a status_func/status_baton with a set of #svn_wc_status_t *
2502 * structures which describe the status of @a path, and its children
2503 * (recursing according to @a depth).
2504 *
2505 *    - If @a get_all is set, retrieve all entries; otherwise,
2506 *      retrieve only "interesting" entries (local mods and/or
2507 *      out of date).
2508 *
2509 *    - If @a check_out_of_date is set, contact the repository and
2510 *      augment the status structures with information about
2511 *      out-of-dateness (with respect to @a revision).  Also, if @a
2512 *      result_rev is not @c NULL, set @a *result_rev to the actual
2513 *      revision against which the working copy was compared (@a
2514 *      *result_rev is not meaningful unless @a check_out_of_date is
2515 *      set).
2516 *
2517 *    - If @a check_working_copy is not set, do not scan the working
2518 *      copy for local modifications. This parameter will be ignored
2519 *      unless @a check_out_of_date is set.  When set, the status
2520 *      report will not contain any information about local changes in
2521 *      the working copy; this includes local deletions and
2522 *      replacements.
2523 *
2524 * If @a no_ignore is @c FALSE, don't report any file or directory (or
2525 * recurse into any directory) that is found by recursion (as opposed to
2526 * being the explicit target @a path) and whose name matches the
2527 * svn:ignore property on its parent directory or the global-ignores
2528 * list in @a ctx->config. If @a no_ignore is @c TRUE, report each such
2529 * file or directory with the status code #svn_wc_status_ignored.
2530 *
2531 * If @a ignore_externals is not set, then recurse into externals
2532 * definitions (if any exist) after handling the main target.  This
2533 * calls the client notification function (in @a ctx) with the
2534 * #svn_wc_notify_status_external action before handling each externals
2535 * definition, and with #svn_wc_notify_status_completed
2536 * after each.
2537 *
2538 * If @a depth_as_sticky is set and @a depth is not
2539 * #svn_depth_unknown, then the status is calculated as if depth_is_sticky
2540 * was passed to an equivalent update command.
2541 *
2542 * @a changelists is an array of <tt>const char *</tt> changelist
2543 * names, used as a restrictive filter on items whose statuses are
2544 * reported; that is, don't report status about any item unless
2545 * it's a member of one of those changelists.  If @a changelists is
2546 * empty (or altogether @c NULL), no changelist filtering occurs.
2547 *
2548 * If @a path is an absolute path then the @c path parameter passed in each
2549 * call to @a status_func will be an absolute path.
2550 *
2551 * All temporary allocations are performed in @a scratch_pool.
2552 *
2553 * @since New in 1.9.
2554 */
2555svn_error_t *
2556svn_client_status6(svn_revnum_t *result_rev,
2557                   svn_client_ctx_t *ctx,
2558                   const char *path,
2559                   const svn_opt_revision_t *revision,
2560                   svn_depth_t depth,
2561                   svn_boolean_t get_all,
2562                   svn_boolean_t check_out_of_date,
2563                   svn_boolean_t check_working_copy,
2564                   svn_boolean_t no_ignore,
2565                   svn_boolean_t ignore_externals,
2566                   svn_boolean_t depth_as_sticky,
2567                   const apr_array_header_t *changelists,
2568                   svn_client_status_func_t status_func,
2569                   void *status_baton,
2570                   apr_pool_t *scratch_pool);
2571
2572
2573/**
2574 * Same as svn_client_status6(), but with @a check_out_of_date set to
2575 * @a update and @a check_working_copy set to @c TRUE.
2576 *
2577 * @since New in 1.7.
2578 * @deprecated Provided for backward compatibility with the 1.8 API.
2579 */
2580SVN_DEPRECATED
2581svn_error_t *
2582svn_client_status5(svn_revnum_t *result_rev,
2583                   svn_client_ctx_t *ctx,
2584                   const char *path,
2585                   const svn_opt_revision_t *revision,
2586                   svn_depth_t depth,
2587                   svn_boolean_t get_all,
2588                   svn_boolean_t update,
2589                   svn_boolean_t no_ignore,
2590                   svn_boolean_t ignore_externals,
2591                   svn_boolean_t depth_as_sticky,
2592                   const apr_array_header_t *changelists,
2593                   svn_client_status_func_t status_func,
2594                   void *status_baton,
2595                   apr_pool_t *scratch_pool);
2596
2597/**
2598 * Same as svn_client_status5(), but using #svn_wc_status_func3_t
2599 * instead of #svn_client_status_func_t and depth_as_sticky set to TRUE.
2600 *
2601 * @since New in 1.6.
2602 * @deprecated Provided for backward compatibility with the 1.6 API.
2603 */
2604SVN_DEPRECATED
2605svn_error_t *
2606svn_client_status4(svn_revnum_t *result_rev,
2607                   const char *path,
2608                   const svn_opt_revision_t *revision,
2609                   svn_wc_status_func3_t status_func,
2610                   void *status_baton,
2611                   svn_depth_t depth,
2612                   svn_boolean_t get_all,
2613                   svn_boolean_t update,
2614                   svn_boolean_t no_ignore,
2615                   svn_boolean_t ignore_externals,
2616                   const apr_array_header_t *changelists,
2617                   svn_client_ctx_t *ctx,
2618                   apr_pool_t *pool);
2619
2620/**
2621 * Same as svn_client_status4(), but using an #svn_wc_status_func2_t
2622 * instead of an #svn_wc_status_func3_t.
2623 *
2624 * @since New in 1.5.
2625 * @deprecated Provided for backward compatibility with the 1.5 API.
2626 */
2627SVN_DEPRECATED
2628svn_error_t *
2629svn_client_status3(svn_revnum_t *result_rev,
2630                   const char *path,
2631                   const svn_opt_revision_t *revision,
2632                   svn_wc_status_func2_t status_func,
2633                   void *status_baton,
2634                   svn_depth_t depth,
2635                   svn_boolean_t get_all,
2636                   svn_boolean_t update,
2637                   svn_boolean_t no_ignore,
2638                   svn_boolean_t ignore_externals,
2639                   const apr_array_header_t *changelists,
2640                   svn_client_ctx_t *ctx,
2641                   apr_pool_t *pool);
2642
2643/**
2644 * Like svn_client_status3(), except with @a changelists passed as @c
2645 * NULL, and with @a recurse instead of @a depth.  If @a recurse is
2646 * TRUE, behave as if for #svn_depth_infinity; else if @a recurse is
2647 * FALSE, behave as if for #svn_depth_immediates.
2648 *
2649 * @since New in 1.2.
2650 * @deprecated Provided for backward compatibility with the 1.4 API.
2651 */
2652SVN_DEPRECATED
2653svn_error_t *
2654svn_client_status2(svn_revnum_t *result_rev,
2655                   const char *path,
2656                   const svn_opt_revision_t *revision,
2657                   svn_wc_status_func2_t status_func,
2658                   void *status_baton,
2659                   svn_boolean_t recurse,
2660                   svn_boolean_t get_all,
2661                   svn_boolean_t update,
2662                   svn_boolean_t no_ignore,
2663                   svn_boolean_t ignore_externals,
2664                   svn_client_ctx_t *ctx,
2665                   apr_pool_t *pool);
2666
2667
2668/**
2669 * Similar to svn_client_status2(), but with @a ignore_externals
2670 * always set to FALSE, taking the #svn_wc_status_func_t type
2671 * instead of the #svn_wc_status_func2_t type for @a status_func,
2672 * and requiring @a *revision to be non-const even though it is
2673 * treated as constant.
2674 *
2675 * @deprecated Provided for backward compatibility with the 1.1 API.
2676 */
2677SVN_DEPRECATED
2678svn_error_t *
2679svn_client_status(svn_revnum_t *result_rev,
2680                  const char *path,
2681                  svn_opt_revision_t *revision,
2682                  svn_wc_status_func_t status_func,
2683                  void *status_baton,
2684                  svn_boolean_t recurse,
2685                  svn_boolean_t get_all,
2686                  svn_boolean_t update,
2687                  svn_boolean_t no_ignore,
2688                  svn_client_ctx_t *ctx,
2689                  apr_pool_t *pool);
2690
2691/** @} */
2692
2693/**
2694 * @defgroup Log View information about previous revisions of an object.
2695 *
2696 * @{
2697 */
2698
2699/**
2700 * Invoke @a receiver with @a receiver_baton on each log message from
2701 * each (#svn_opt_revision_range_t *) range in @a revision_ranges in turn,
2702 * inclusive (but never invoke @a receiver on a given log message more
2703 * than once).
2704 *
2705 * @a targets contains either a URL followed by zero or more relative
2706 * paths, or 1 working copy path, as <tt>const char *</tt>, for which log
2707 * messages are desired.  @a receiver is invoked only on messages whose
2708 * revisions involved a change to some path in @a targets.  @a peg_revision
2709 * indicates in which revision @a targets are valid.  If @a peg_revision is
2710 * #svn_opt_revision_unspecified, it defaults to #svn_opt_revision_head
2711 * for URLs or #svn_opt_revision_working for WC paths.
2712 *
2713 * If @a limit is greater than zero only invoke @a receiver on the first
2714 * @a limit logs.
2715 *
2716 * If @a discover_changed_paths is set, then the @c changed_paths and @c
2717 * changed_paths2 fields in the @c log_entry argument to @a receiver will be
2718 * populated on each invocation.  @note The @c text_modified and @c
2719 * props_modified fields of the changed paths structure may have the value
2720 * #svn_tristate_unknown if the repository does not report that information.
2721 *
2722 * If @a strict_node_history is set, copy history (if any exists) will
2723 * not be traversed while harvesting revision logs for each target.
2724 *
2725 * If @a include_merged_revisions is set, log information for revisions
2726 * which have been merged to @a targets will also be returned.
2727 *
2728 * If @a revprops is NULL, retrieve all revision properties; else, retrieve
2729 * only the revision properties named by the (const char *) array elements
2730 * (i.e. retrieve none if the array is empty).
2731 *
2732 * Use @a pool for any temporary allocation.
2733 *
2734 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2
2735 * with a 'skip' signal on any unversioned targets.
2736 *
2737 * @since New in 1.6.
2738 */
2739svn_error_t *
2740svn_client_log5(const apr_array_header_t *targets,
2741                const svn_opt_revision_t *peg_revision,
2742                const apr_array_header_t *revision_ranges,
2743                int limit,
2744                svn_boolean_t discover_changed_paths,
2745                svn_boolean_t strict_node_history,
2746                svn_boolean_t include_merged_revisions,
2747                const apr_array_header_t *revprops,
2748                svn_log_entry_receiver_t receiver,
2749                void *receiver_baton,
2750                svn_client_ctx_t *ctx,
2751                apr_pool_t *pool);
2752
2753/**
2754 * Similar to svn_client_log5(), but takes explicit start and end parameters
2755 * instead of an array of revision ranges.
2756 *
2757 * @deprecated Provided for compatibility with the 1.5 API.
2758 * @since New in 1.5.
2759 */
2760SVN_DEPRECATED
2761svn_error_t *
2762svn_client_log4(const apr_array_header_t *targets,
2763                const svn_opt_revision_t *peg_revision,
2764                const svn_opt_revision_t *start,
2765                const svn_opt_revision_t *end,
2766                int limit,
2767                svn_boolean_t discover_changed_paths,
2768                svn_boolean_t strict_node_history,
2769                svn_boolean_t include_merged_revisions,
2770                const apr_array_header_t *revprops,
2771                svn_log_entry_receiver_t receiver,
2772                void *receiver_baton,
2773                svn_client_ctx_t *ctx,
2774                apr_pool_t *pool);
2775
2776/**
2777 * Similar to svn_client_log4(), but using #svn_log_message_receiver_t
2778 * instead of #svn_log_entry_receiver_t.  Also, @a
2779 * include_merged_revisions is set to @c FALSE and @a revprops is
2780 * svn:author, svn:date, and svn:log.
2781 *
2782 * @deprecated Provided for compatibility with the 1.4 API.
2783 * @since New in 1.4.
2784 */
2785SVN_DEPRECATED
2786svn_error_t *
2787svn_client_log3(const apr_array_header_t *targets,
2788                const svn_opt_revision_t *peg_revision,
2789                const svn_opt_revision_t *start,
2790                const svn_opt_revision_t *end,
2791                int limit,
2792                svn_boolean_t discover_changed_paths,
2793                svn_boolean_t strict_node_history,
2794                svn_log_message_receiver_t receiver,
2795                void *receiver_baton,
2796                svn_client_ctx_t *ctx,
2797                apr_pool_t *pool);
2798
2799
2800/**
2801 * Similar to svn_client_log3(), but with the @c kind field of
2802 * @a peg_revision set to #svn_opt_revision_unspecified.
2803 *
2804 * @par Important:
2805 * A special case for the revision range HEAD:1, which was present
2806 * in svn_client_log(), has been removed from svn_client_log2().  Instead, it
2807 * is expected that callers will specify the range HEAD:0, to avoid a
2808 * #SVN_ERR_FS_NO_SUCH_REVISION error when invoked against an empty repository
2809 * (i.e. one not containing a revision 1).
2810 *
2811 * @deprecated Provided for compatibility with the 1.3 API.
2812 * @since New in 1.2.
2813 */
2814SVN_DEPRECATED
2815svn_error_t *
2816svn_client_log2(const apr_array_header_t *targets,
2817                const svn_opt_revision_t *start,
2818                const svn_opt_revision_t *end,
2819                int limit,
2820                svn_boolean_t discover_changed_paths,
2821                svn_boolean_t strict_node_history,
2822                svn_log_message_receiver_t receiver,
2823                void *receiver_baton,
2824                svn_client_ctx_t *ctx,
2825                apr_pool_t *pool);
2826
2827
2828/**
2829 * Similar to svn_client_log2(), but with @a limit set to 0, and the
2830 * following special case:
2831 *
2832 * Special case for repositories at revision 0:
2833 *
2834 * If @a start->kind is #svn_opt_revision_head, and @a end->kind is
2835 * #svn_opt_revision_number && @a end->number is @c 1, then handle an
2836 * empty (no revisions) repository specially: instead of erroring
2837 * because requested revision 1 when the highest revision is 0, just
2838 * invoke @a receiver on revision 0, passing @c NULL for changed paths and
2839 * empty strings for the author and date.  This is because that
2840 * particular combination of @a start and @a end usually indicates the
2841 * common case of log invocation -- the user wants to see all log
2842 * messages from youngest to oldest, where the oldest commit is
2843 * revision 1.  That works fine, except when there are no commits in
2844 * the repository, hence this special case.
2845 *
2846 * @deprecated Provided for backward compatibility with the 1.1 API.
2847 */
2848SVN_DEPRECATED
2849svn_error_t *
2850svn_client_log(const apr_array_header_t *targets,
2851               const svn_opt_revision_t *start,
2852               const svn_opt_revision_t *end,
2853               svn_boolean_t discover_changed_paths,
2854               svn_boolean_t strict_node_history,
2855               svn_log_message_receiver_t receiver,
2856               void *receiver_baton,
2857               svn_client_ctx_t *ctx,
2858               apr_pool_t *pool);
2859
2860/** @} */
2861
2862/**
2863 * @defgroup Blame Show modification information about lines in a file.
2864 *
2865 * @{
2866 */
2867
2868/**
2869 * Invoke @a receiver with @a receiver_baton on each line-blame item
2870 * associated with revision @a end of @a path_or_url, using @a start
2871 * as the default source of all blame.  @a peg_revision indicates in
2872 * which revision @a path_or_url is valid.  If @a peg_revision->kind
2873 * is #svn_opt_revision_unspecified, then it defaults to
2874 * #svn_opt_revision_head for URLs or #svn_opt_revision_working for
2875 * WC targets.
2876 *
2877 * If @a start->kind or @a end->kind is #svn_opt_revision_unspecified,
2878 * return the error #SVN_ERR_CLIENT_BAD_REVISION.  If either are
2879 * #svn_opt_revision_working, return the error
2880 * #SVN_ERR_UNSUPPORTED_FEATURE.  If any of the revisions of @a
2881 * path_or_url have a binary mime-type, return the error
2882 * #SVN_ERR_CLIENT_IS_BINARY_FILE, unless @a ignore_mime_type is TRUE,
2883 * in which case blame information will be generated regardless of the
2884 * MIME types of the revisions.
2885 *
2886 * @a start may resolve to a revision number greater (younger) than @a end
2887 * only if the server is 1.8.0 or greater (supports
2888 * #SVN_RA_CAPABILITY_GET_FILE_REVS_REVERSE) and the client is 1.9.0 or
2889 * newer.
2890 *
2891 * Use @a diff_options to determine how to compare different revisions of the
2892 * target.
2893 *
2894 * If @a include_merged_revisions is TRUE, also return data based upon
2895 * revisions which have been merged to @a path_or_url.
2896 *
2897 * Use @a pool for any temporary allocation.
2898 *
2899 * @since New in 1.7.
2900 */
2901svn_error_t *
2902svn_client_blame5(const char *path_or_url,
2903                  const svn_opt_revision_t *peg_revision,
2904                  const svn_opt_revision_t *start,
2905                  const svn_opt_revision_t *end,
2906                  const svn_diff_file_options_t *diff_options,
2907                  svn_boolean_t ignore_mime_type,
2908                  svn_boolean_t include_merged_revisions,
2909                  svn_client_blame_receiver3_t receiver,
2910                  void *receiver_baton,
2911                  svn_client_ctx_t *ctx,
2912                  apr_pool_t *pool);
2913
2914
2915/**
2916 * Similar to svn_client_blame5(), but with #svn_client_blame_receiver3_t
2917 * as the receiver.
2918 *
2919 * @deprecated Provided for backwards compatibility with the 1.6 API.
2920 *
2921 * @since New in 1.5.
2922 */
2923SVN_DEPRECATED
2924svn_error_t *
2925svn_client_blame4(const char *path_or_url,
2926                  const svn_opt_revision_t *peg_revision,
2927                  const svn_opt_revision_t *start,
2928                  const svn_opt_revision_t *end,
2929                  const svn_diff_file_options_t *diff_options,
2930                  svn_boolean_t ignore_mime_type,
2931                  svn_boolean_t include_merged_revisions,
2932                  svn_client_blame_receiver2_t receiver,
2933                  void *receiver_baton,
2934                  svn_client_ctx_t *ctx,
2935                  apr_pool_t *pool);
2936
2937/**
2938 * Similar to svn_client_blame4(), but with @a include_merged_revisions set
2939 * to FALSE, and using a #svn_client_blame_receiver2_t as the receiver.
2940 *
2941 * @deprecated Provided for backwards compatibility with the 1.4 API.
2942 *
2943 * @since New in 1.4.
2944 */
2945SVN_DEPRECATED
2946svn_error_t *
2947svn_client_blame3(const char *path_or_url,
2948                  const svn_opt_revision_t *peg_revision,
2949                  const svn_opt_revision_t *start,
2950                  const svn_opt_revision_t *end,
2951                  const svn_diff_file_options_t *diff_options,
2952                  svn_boolean_t ignore_mime_type,
2953                  svn_client_blame_receiver_t receiver,
2954                  void *receiver_baton,
2955                  svn_client_ctx_t *ctx,
2956                  apr_pool_t *pool);
2957
2958/**
2959 * Similar to svn_client_blame3(), but with @a diff_options set to
2960 * default options as returned by svn_diff_file_options_parse() and
2961 * @a ignore_mime_type set to FALSE.
2962 *
2963 * @deprecated Provided for backwards compatibility with the 1.3 API.
2964 *
2965 * @since New in 1.2.
2966 */
2967SVN_DEPRECATED
2968svn_error_t *
2969svn_client_blame2(const char *path_or_url,
2970                  const svn_opt_revision_t *peg_revision,
2971                  const svn_opt_revision_t *start,
2972                  const svn_opt_revision_t *end,
2973                  svn_client_blame_receiver_t receiver,
2974                  void *receiver_baton,
2975                  svn_client_ctx_t *ctx,
2976                  apr_pool_t *pool);
2977
2978/**
2979 * Similar to svn_client_blame2() except that @a peg_revision is always
2980 * the same as @a end.
2981 *
2982 * @deprecated Provided for backward compatibility with the 1.1 API.
2983 */
2984SVN_DEPRECATED
2985svn_error_t *
2986svn_client_blame(const char *path_or_url,
2987                 const svn_opt_revision_t *start,
2988                 const svn_opt_revision_t *end,
2989                 svn_client_blame_receiver_t receiver,
2990                 void *receiver_baton,
2991                 svn_client_ctx_t *ctx,
2992                 apr_pool_t *pool);
2993
2994/** @} */
2995
2996/**
2997 * @defgroup Diff Generate differences between paths.
2998 *
2999 * @{
3000 */
3001
3002/**
3003 * Produce diff output which describes the delta between
3004 * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2.  Print
3005 * the output of the diff to @a outstream, and any errors to @a
3006 * errstream.  @a path_or_url1 and @a path_or_url2 can be either
3007 * working-copy paths or URLs.
3008 *
3009 * If @a relative_to_dir is not @c NULL, the original path and
3010 * modified path will have the @a relative_to_dir stripped from the
3011 * front of the respective paths.  If @a relative_to_dir is @c NULL,
3012 * paths will not be modified.  If @a relative_to_dir is not
3013 * @c NULL but @a relative_to_dir is not a parent path of the target,
3014 * an error is returned. Finally, if @a relative_to_dir is a URL, an
3015 * error will be returned.
3016 *
3017 * If either @a revision1 or @a revision2 has an `unspecified' or
3018 * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
3019 *
3020 * @a path_or_url1 and @a path_or_url2 must both represent the same node
3021 * kind -- that is, if @a path_or_url1 is a directory, @a path_or_url2
3022 * must also be, and if @a path_or_url1 is a file, @a path_or_url2 must
3023 * also be.
3024 *
3025 * If @a depth is #svn_depth_infinity, diff fully recursively.
3026 * Else if it is #svn_depth_immediates, diff the named paths and
3027 * their file children (if any), and diff properties of
3028 * subdirectories, but do not descend further into the subdirectories.
3029 * Else if #svn_depth_files, behave as if for #svn_depth_immediates
3030 * except don't diff properties of subdirectories.  If
3031 * #svn_depth_empty, diff exactly the named paths but nothing
3032 * underneath them.
3033 *
3034 * Use @a ignore_ancestry to control whether or not items being
3035 * diffed will be checked for relatedness first.  Unrelated items
3036 * are typically transmitted to the editor as a deletion of one thing
3037 * and the addition of another, but if this flag is TRUE, unrelated
3038 * items will be diffed as if they were related.
3039 *
3040 * If @a no_diff_added is TRUE, then no diff output will be generated
3041 * on added files.
3042 *
3043 * If @a no_diff_deleted is TRUE, then no diff output will be
3044 * generated on deleted files.
3045 *
3046 * If @a show_copies_as_adds is TRUE, then copied files will not be diffed
3047 * against their copyfrom source, and will appear in the diff output
3048 * in their entirety, as if they were newly added.
3049 * ### BUGS: For a repos-repos diff, this is ignored. Instead, a file is
3050 *     diffed against its copyfrom source iff the file is the diff target
3051 *     and not if some parent directory is the diff target. For a repos-WC
3052 *     diff, this is ignored if the file is the diff target.
3053 *
3054 * If @a use_git_diff_format is TRUE, then the git's extended diff format
3055 * will be used.
3056 * ### Do we need to say more about the format? A reference perhaps?
3057 *
3058 * If @a ignore_properties is TRUE, do not show property differences.
3059 * If @a properties_only is TRUE, show only property changes.
3060 * The above two options are mutually exclusive. It is an error to set
3061 * both to TRUE.
3062 *
3063 * Generated headers are encoded using @a header_encoding.
3064 *
3065 * Diff output will not be generated for binary files, unless @a
3066 * ignore_content_type is TRUE, in which case diffs will be shown
3067 * regardless of the content types.
3068 *
3069 * @a diff_options (an array of <tt>const char *</tt>) is used to pass
3070 * additional command line options to the diff processes invoked to compare
3071 * files. @a diff_options is allowed to be @c NULL, in which case a value
3072 * for this option might still be obtained from the Subversion configuration
3073 * file via client context @a ctx.
3074 *
3075 * The authentication baton cached in @a ctx is used to communicate with
3076 * the repository.
3077 *
3078 * @a changelists is an array of <tt>const char *</tt> changelist
3079 * names, used as a restrictive filter on items whose differences are
3080 * reported; that is, don't generate diffs about any item unless
3081 * it's a member of one of those changelists.  If @a changelists is
3082 * empty (or altogether @c NULL), no changelist filtering occurs.
3083 *
3084 * @note Changelist filtering only applies to diffs in which at least
3085 * one side of the diff represents working copy data.
3086 *
3087 * @note @a header_encoding doesn't affect headers generated by external
3088 * diff programs.
3089 *
3090 * @note @a relative_to_dir doesn't affect the path index generated by
3091 * external diff programs.
3092 *
3093 * @since New in 1.8.
3094 */
3095svn_error_t *
3096svn_client_diff6(const apr_array_header_t *diff_options,
3097                 const char *path_or_url1,
3098                 const svn_opt_revision_t *revision1,
3099                 const char *path_or_url2,
3100                 const svn_opt_revision_t *revision2,
3101                 const char *relative_to_dir,
3102                 svn_depth_t depth,
3103                 svn_boolean_t ignore_ancestry,
3104                 svn_boolean_t no_diff_added,
3105                 svn_boolean_t no_diff_deleted,
3106                 svn_boolean_t show_copies_as_adds,
3107                 svn_boolean_t ignore_content_type,
3108                 svn_boolean_t ignore_properties,
3109                 svn_boolean_t properties_only,
3110                 svn_boolean_t use_git_diff_format,
3111                 const char *header_encoding,
3112                 svn_stream_t *outstream,
3113                 svn_stream_t *errstream,
3114                 const apr_array_header_t *changelists,
3115                 svn_client_ctx_t *ctx,
3116                 apr_pool_t *pool);
3117
3118/** Similar to svn_client_diff6(), but with @a outfile and @a errfile,
3119 * instead of @a outstream and @a errstream, and with @a
3120 * no_diff_added, @a ignore_properties, and @a properties_only always
3121 * passed as @c FALSE (which means that additions and property changes
3122 * are always transmitted).
3123 *
3124 * @deprecated Provided for backward compatibility with the 1.7 API.
3125 * @since New in 1.7.
3126 */
3127SVN_DEPRECATED
3128svn_error_t *
3129svn_client_diff5(const apr_array_header_t *diff_options,
3130                 const char *path1,
3131                 const svn_opt_revision_t *revision1,
3132                 const char *path2,
3133                 const svn_opt_revision_t *revision2,
3134                 const char *relative_to_dir,
3135                 svn_depth_t depth,
3136                 svn_boolean_t ignore_ancestry,
3137                 svn_boolean_t no_diff_deleted,
3138                 svn_boolean_t show_copies_as_adds,
3139                 svn_boolean_t ignore_content_type,
3140                 svn_boolean_t use_git_diff_format,
3141                 const char *header_encoding,
3142                 apr_file_t *outfile,
3143                 apr_file_t *errfile,
3144                 const apr_array_header_t *changelists,
3145                 svn_client_ctx_t *ctx,
3146                 apr_pool_t *pool);
3147
3148/**
3149 * Similar to svn_client_diff5(), but with @a show_copies_as_adds set to
3150 * @c FALSE and @a use_git_diff_format set to @c FALSE.
3151 *
3152 * @deprecated Provided for backward compatibility with the 1.6 API.
3153 * @since New in 1.5.
3154 */
3155SVN_DEPRECATED
3156svn_error_t *
3157svn_client_diff4(const apr_array_header_t *diff_options,
3158                 const char *path1,
3159                 const svn_opt_revision_t *revision1,
3160                 const char *path2,
3161                 const svn_opt_revision_t *revision2,
3162                 const char *relative_to_dir,
3163                 svn_depth_t depth,
3164                 svn_boolean_t ignore_ancestry,
3165                 svn_boolean_t no_diff_deleted,
3166                 svn_boolean_t ignore_content_type,
3167                 const char *header_encoding,
3168                 apr_file_t *outfile,
3169                 apr_file_t *errfile,
3170                 const apr_array_header_t *changelists,
3171                 svn_client_ctx_t *ctx,
3172                 apr_pool_t *pool);
3173
3174/**
3175 * Similar to svn_client_diff4(), but with @a changelists passed as @c
3176 * NULL, and @a depth set according to @a recurse: if @a recurse is
3177 * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3178 * FALSE, set @a depth to #svn_depth_empty.
3179 *
3180 * @deprecated Provided for backward compatibility with the 1.4 API.
3181 * @since New in 1.3.
3182 */
3183SVN_DEPRECATED
3184svn_error_t *
3185svn_client_diff3(const apr_array_header_t *diff_options,
3186                 const char *path1,
3187                 const svn_opt_revision_t *revision1,
3188                 const char *path2,
3189                 const svn_opt_revision_t *revision2,
3190                 svn_boolean_t recurse,
3191                 svn_boolean_t ignore_ancestry,
3192                 svn_boolean_t no_diff_deleted,
3193                 svn_boolean_t ignore_content_type,
3194                 const char *header_encoding,
3195                 apr_file_t *outfile,
3196                 apr_file_t *errfile,
3197                 svn_client_ctx_t *ctx,
3198                 apr_pool_t *pool);
3199
3200
3201/**
3202 * Similar to svn_client_diff3(), but with @a header_encoding set to
3203 * @c APR_LOCALE_CHARSET.
3204 *
3205 * @deprecated Provided for backward compatibility with the 1.2 API.
3206 * @since New in 1.2.
3207 */
3208SVN_DEPRECATED
3209svn_error_t *
3210svn_client_diff2(const apr_array_header_t *diff_options,
3211                 const char *path1,
3212                 const svn_opt_revision_t *revision1,
3213                 const char *path2,
3214                 const svn_opt_revision_t *revision2,
3215                 svn_boolean_t recurse,
3216                 svn_boolean_t ignore_ancestry,
3217                 svn_boolean_t no_diff_deleted,
3218                 svn_boolean_t ignore_content_type,
3219                 apr_file_t *outfile,
3220                 apr_file_t *errfile,
3221                 svn_client_ctx_t *ctx,
3222                 apr_pool_t *pool);
3223
3224/**
3225 * Similar to svn_client_diff2(), but with @a ignore_content_type
3226 * always set to FALSE.
3227 *
3228 * @deprecated Provided for backward compatibility with the 1.1 API.
3229 */
3230SVN_DEPRECATED
3231svn_error_t *
3232svn_client_diff(const apr_array_header_t *diff_options,
3233                const char *path1,
3234                const svn_opt_revision_t *revision1,
3235                const char *path2,
3236                const svn_opt_revision_t *revision2,
3237                svn_boolean_t recurse,
3238                svn_boolean_t ignore_ancestry,
3239                svn_boolean_t no_diff_deleted,
3240                apr_file_t *outfile,
3241                apr_file_t *errfile,
3242                svn_client_ctx_t *ctx,
3243                apr_pool_t *pool);
3244
3245/**
3246 * Produce diff output which describes the delta between the filesystem
3247 * object @a path_or_url in peg revision @a peg_revision, as it changed
3248 * between @a start_revision and @a end_revision.  @a path_or_url can
3249 * be either a working-copy path or URL.
3250 *
3251 * If @a peg_revision is #svn_opt_revision_unspecified, behave
3252 * identically to svn_client_diff6(), using @a path_or_url for both of that
3253 * function's @a path_or_url1 and @a path_or_url2 arguments.
3254 *
3255 * All other options are handled identically to svn_client_diff6().
3256 *
3257 * @since New in 1.8.
3258 */
3259svn_error_t *
3260svn_client_diff_peg6(const apr_array_header_t *diff_options,
3261                     const char *path_or_url,
3262                     const svn_opt_revision_t *peg_revision,
3263                     const svn_opt_revision_t *start_revision,
3264                     const svn_opt_revision_t *end_revision,
3265                     const char *relative_to_dir,
3266                     svn_depth_t depth,
3267                     svn_boolean_t ignore_ancestry,
3268                     svn_boolean_t no_diff_added,
3269                     svn_boolean_t no_diff_deleted,
3270                     svn_boolean_t show_copies_as_adds,
3271                     svn_boolean_t ignore_content_type,
3272                     svn_boolean_t ignore_properties,
3273                     svn_boolean_t properties_only,
3274                     svn_boolean_t use_git_diff_format,
3275                     const char *header_encoding,
3276                     svn_stream_t *outstream,
3277                     svn_stream_t *errstream,
3278                     const apr_array_header_t *changelists,
3279                     svn_client_ctx_t *ctx,
3280                     apr_pool_t *pool);
3281
3282/** Similar to svn_client_diff6_peg6(), but with @a outfile and @a errfile,
3283 * instead of @a outstream and @a errstream, and with @a
3284 * no_diff_added, @a ignore_properties, and @a properties_only always
3285 * passed as @c FALSE (which means that additions and property changes
3286 * are always transmitted).
3287 *
3288 * @deprecated Provided for backward compatibility with the 1.7 API.
3289 * @since New in 1.7.
3290 */
3291SVN_DEPRECATED
3292svn_error_t *
3293svn_client_diff_peg5(const apr_array_header_t *diff_options,
3294                     const char *path,
3295                     const svn_opt_revision_t *peg_revision,
3296                     const svn_opt_revision_t *start_revision,
3297                     const svn_opt_revision_t *end_revision,
3298                     const char *relative_to_dir,
3299                     svn_depth_t depth,
3300                     svn_boolean_t ignore_ancestry,
3301                     svn_boolean_t no_diff_deleted,
3302                     svn_boolean_t show_copies_as_adds,
3303                     svn_boolean_t ignore_content_type,
3304                     svn_boolean_t use_git_diff_format,
3305                     const char *header_encoding,
3306                     apr_file_t *outfile,
3307                     apr_file_t *errfile,
3308                     const apr_array_header_t *changelists,
3309                     svn_client_ctx_t *ctx,
3310                     apr_pool_t *pool);
3311
3312/**
3313 * Similar to svn_client_diff_peg5(), but with @a show_copies_as_adds set to
3314 * @c FALSE and @a use_git_diff_format set to @c FALSE.
3315 *
3316 * @since New in 1.5.
3317 * @deprecated Provided for backward compatibility with the 1.6 API.
3318 */
3319SVN_DEPRECATED
3320svn_error_t *
3321svn_client_diff_peg4(const apr_array_header_t *diff_options,
3322                     const char *path,
3323                     const svn_opt_revision_t *peg_revision,
3324                     const svn_opt_revision_t *start_revision,
3325                     const svn_opt_revision_t *end_revision,
3326                     const char *relative_to_dir,
3327                     svn_depth_t depth,
3328                     svn_boolean_t ignore_ancestry,
3329                     svn_boolean_t no_diff_deleted,
3330                     svn_boolean_t ignore_content_type,
3331                     const char *header_encoding,
3332                     apr_file_t *outfile,
3333                     apr_file_t *errfile,
3334                     const apr_array_header_t *changelists,
3335                     svn_client_ctx_t *ctx,
3336                     apr_pool_t *pool);
3337
3338/**
3339 * Similar to svn_client_diff_peg4(), but with @a changelists passed
3340 * as @c NULL, and @a depth set according to @a recurse: if @a recurse
3341 * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3342 * FALSE, set @a depth to #svn_depth_files.
3343 *
3344 * @deprecated Provided for backward compatibility with the 1.4 API.
3345 * @since New in 1.3.
3346 */
3347SVN_DEPRECATED
3348svn_error_t *
3349svn_client_diff_peg3(const apr_array_header_t *diff_options,
3350                     const char *path,
3351                     const svn_opt_revision_t *peg_revision,
3352                     const svn_opt_revision_t *start_revision,
3353                     const svn_opt_revision_t *end_revision,
3354                     svn_boolean_t recurse,
3355                     svn_boolean_t ignore_ancestry,
3356                     svn_boolean_t no_diff_deleted,
3357                     svn_boolean_t ignore_content_type,
3358                     const char *header_encoding,
3359                     apr_file_t *outfile,
3360                     apr_file_t *errfile,
3361                     svn_client_ctx_t *ctx,
3362                     apr_pool_t *pool);
3363
3364/**
3365 * Similar to svn_client_diff_peg3(), but with @a header_encoding set to
3366 * @c APR_LOCALE_CHARSET.
3367 *
3368 * @deprecated Provided for backward compatibility with the 1.2 API.
3369 * @since New in 1.2.
3370 */
3371SVN_DEPRECATED
3372svn_error_t *
3373svn_client_diff_peg2(const apr_array_header_t *diff_options,
3374                     const char *path,
3375                     const svn_opt_revision_t *peg_revision,
3376                     const svn_opt_revision_t *start_revision,
3377                     const svn_opt_revision_t *end_revision,
3378                     svn_boolean_t recurse,
3379                     svn_boolean_t ignore_ancestry,
3380                     svn_boolean_t no_diff_deleted,
3381                     svn_boolean_t ignore_content_type,
3382                     apr_file_t *outfile,
3383                     apr_file_t *errfile,
3384                     svn_client_ctx_t *ctx,
3385                     apr_pool_t *pool);
3386
3387/**
3388 * Similar to svn_client_diff_peg2(), but with @a ignore_content_type
3389 * always set to FALSE.
3390 *
3391 * @since New in 1.1.
3392 * @deprecated Provided for backward compatibility with the 1.1 API.
3393 */
3394SVN_DEPRECATED
3395svn_error_t *
3396svn_client_diff_peg(const apr_array_header_t *diff_options,
3397                    const char *path,
3398                    const svn_opt_revision_t *peg_revision,
3399                    const svn_opt_revision_t *start_revision,
3400                    const svn_opt_revision_t *end_revision,
3401                    svn_boolean_t recurse,
3402                    svn_boolean_t ignore_ancestry,
3403                    svn_boolean_t no_diff_deleted,
3404                    apr_file_t *outfile,
3405                    apr_file_t *errfile,
3406                    svn_client_ctx_t *ctx,
3407                    apr_pool_t *pool);
3408
3409/**
3410 * Produce a diff summary which lists the changed items between
3411 * @a path_or_url1/@a revision1 and @a path_or_url2/@a revision2 without
3412 * creating text deltas. @a path_or_url1 and @a path_or_url2 can be
3413 * either working-copy paths or URLs.
3414 *
3415 * The function may report false positives if @a ignore_ancestry is false,
3416 * since a file might have been modified between two revisions, but still
3417 * have the same contents.
3418 *
3419 * Calls @a summarize_func with @a summarize_baton for each difference
3420 * with a #svn_client_diff_summarize_t structure describing the difference.
3421 *
3422 * See svn_client_diff6() for a description of the other parameters.
3423 *
3424 * @since New in 1.5.
3425 */
3426svn_error_t *
3427svn_client_diff_summarize2(const char *path_or_url1,
3428                           const svn_opt_revision_t *revision1,
3429                           const char *path_or_url2,
3430                           const svn_opt_revision_t *revision2,
3431                           svn_depth_t depth,
3432                           svn_boolean_t ignore_ancestry,
3433                           const apr_array_header_t *changelists,
3434                           svn_client_diff_summarize_func_t summarize_func,
3435                           void *summarize_baton,
3436                           svn_client_ctx_t *ctx,
3437                           apr_pool_t *pool);
3438
3439/**
3440 * Similar to svn_client_diff_summarize2(), but with @a changelists
3441 * passed as @c NULL, and @a depth set according to @a recurse: if @a
3442 * recurse is TRUE, set @a depth to #svn_depth_infinity, if @a
3443 * recurse is FALSE, set @a depth to #svn_depth_files.
3444 *
3445 * @deprecated Provided for backward compatibility with the 1.4 API.
3446 *
3447 * @since New in 1.4.
3448 */
3449SVN_DEPRECATED
3450svn_error_t *
3451svn_client_diff_summarize(const char *path1,
3452                          const svn_opt_revision_t *revision1,
3453                          const char *path2,
3454                          const svn_opt_revision_t *revision2,
3455                          svn_boolean_t recurse,
3456                          svn_boolean_t ignore_ancestry,
3457                          svn_client_diff_summarize_func_t summarize_func,
3458                          void *summarize_baton,
3459                          svn_client_ctx_t *ctx,
3460                          apr_pool_t *pool);
3461
3462/**
3463 * Produce a diff summary which lists the changed items between the
3464 * filesystem object @a path_or_url in peg revision @a peg_revision, as it
3465 * changed between @a start_revision and @a end_revision. @a path_or_url can
3466 * be either a working-copy path or URL.
3467 *
3468 * If @a peg_revision is #svn_opt_revision_unspecified, behave
3469 * identically to svn_client_diff_summarize2(), using @a path_or_url for
3470 * both of that function's @a path_or_url1 and @a path_or_url2 arguments.
3471 *
3472 * The function may report false positives if @a ignore_ancestry is false,
3473 * as described in the documentation for svn_client_diff_summarize2().
3474 *
3475 * Call @a summarize_func with @a summarize_baton for each difference
3476 * with a #svn_client_diff_summarize_t structure describing the difference.
3477 *
3478 * See svn_client_diff_peg5() for a description of the other parameters.
3479 *
3480 * @since New in 1.5.
3481 */
3482svn_error_t *
3483svn_client_diff_summarize_peg2(const char *path_or_url,
3484                               const svn_opt_revision_t *peg_revision,
3485                               const svn_opt_revision_t *start_revision,
3486                               const svn_opt_revision_t *end_revision,
3487                               svn_depth_t depth,
3488                               svn_boolean_t ignore_ancestry,
3489                               const apr_array_header_t *changelists,
3490                               svn_client_diff_summarize_func_t summarize_func,
3491                               void *summarize_baton,
3492                               svn_client_ctx_t *ctx,
3493                               apr_pool_t *pool);
3494
3495/**
3496 * Similar to svn_client_diff_summarize_peg2(), but with @a
3497 * changelists passed as @c NULL, and @a depth set according to @a
3498 * recurse: if @a recurse is TRUE, set @a depth to
3499 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
3500 * #svn_depth_files.
3501 *
3502 * @deprecated Provided for backward compatibility with the 1.4 API.
3503 *
3504 * @since New in 1.4.
3505 */
3506SVN_DEPRECATED
3507svn_error_t *
3508svn_client_diff_summarize_peg(const char *path,
3509                              const svn_opt_revision_t *peg_revision,
3510                              const svn_opt_revision_t *start_revision,
3511                              const svn_opt_revision_t *end_revision,
3512                              svn_boolean_t recurse,
3513                              svn_boolean_t ignore_ancestry,
3514                              svn_client_diff_summarize_func_t summarize_func,
3515                              void *summarize_baton,
3516                              svn_client_ctx_t *ctx,
3517                              apr_pool_t *pool);
3518
3519/** @} */
3520
3521/**
3522 * @defgroup Merge Merge changes between branches.
3523 *
3524 * @{
3525 */
3526
3527/** Get information about the state of merging between two branches.
3528 *
3529 * The source is specified by @a source_path_or_url at @a source_revision.
3530 * The target is specified by @a target_path_or_url at @a target_revision,
3531 * which refers to either a WC or a repository location.
3532 *
3533 * Set @a *needs_reintegration to true if an automatic merge from source
3534 * to target would be a reintegration merge: that is, if the last automatic
3535 * merge was in the opposite direction; or to false otherwise.
3536 *
3537 * Set @a *yca_url, @a *yca_rev, @a *base_url, @a *base_rev, @a *right_url,
3538 * @a *right_rev, @a *target_url, @a *target_rev to the repository locations
3539 * of, respectively: the youngest common ancestor of the branches, the base
3540 * chosen for 3-way merge, the right-hand side of the source diff, and the
3541 * target.
3542 *
3543 * Set @a repos_root_url to the URL of the repository root.  This is a
3544 * common prefix of all four URL outputs.
3545 *
3546 * Allocate the results in @a result_pool.  Any of the output pointers may
3547 * be NULL if not wanted.
3548 *
3549 * @since New in 1.8.
3550 */
3551svn_error_t *
3552svn_client_get_merging_summary(svn_boolean_t *needs_reintegration,
3553                               const char **yca_url, svn_revnum_t *yca_rev,
3554                               const char **base_url, svn_revnum_t *base_rev,
3555                               const char **right_url, svn_revnum_t *right_rev,
3556                               const char **target_url, svn_revnum_t *target_rev,
3557                               const char **repos_root_url,
3558                               const char *source_path_or_url,
3559                               const svn_opt_revision_t *source_revision,
3560                               const char *target_path_or_url,
3561                               const svn_opt_revision_t *target_revision,
3562                               svn_client_ctx_t *ctx,
3563                               apr_pool_t *result_pool,
3564                               apr_pool_t *scratch_pool);
3565
3566
3567/** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into
3568 * the working-copy path @a target_wcpath.
3569 *
3570 * @a source1 and @a source2 are either URLs that refer to entries in the
3571 * repository, or paths to entries in the working copy.
3572 *
3573 * By "merging", we mean:  apply file differences using
3574 * svn_wc_merge(), and schedule additions & deletions when appropriate.
3575 *
3576 * @a source1 and @a source2 must both represent the same node kind -- that
3577 * is, if @a source1 is a directory, @a source2 must also be, and if @a source1
3578 * is a file, @a source2 must also be.
3579 *
3580 * If either @a revision1 or @a revision2 has an `unspecified' or
3581 * unrecognized `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
3582 *
3583 * If @a depth is #svn_depth_infinity, merge fully recursively.
3584 * Else if #svn_depth_immediates, merge changes at most to files
3585 * that are immediate children of @a target_wcpath and to directory
3586 * properties of @a target_wcpath and its immediate subdirectory children.
3587 * Else if #svn_depth_files, merge at most to immediate file
3588 * children of @a target_wcpath and to @a target_wcpath itself.
3589 * Else if #svn_depth_empty, apply changes only to @a target_wcpath
3590 * (i.e., directory property changes only)
3591 *
3592 * If @a depth is #svn_depth_unknown, use the depth of @a target_wcpath.
3593 *
3594 * If @a ignore_mergeinfo is true, disable merge tracking, by treating the
3595 * two sources as unrelated even if they actually have a common ancestor.
3596 *
3597 * If @a diff_ignore_ancestry is true, diff unrelated nodes as if related:
3598 * that is, diff the 'left' and 'right' versions of a node as if they were
3599 * related (if they are the same kind) even if they are not related.
3600 * Otherwise, diff unrelated items as a deletion of one thing and the
3601 * addition of another.
3602 *
3603 * If @a force_delete is false and the merge involves deleting a file whose
3604 * content differs from the source-left version, or a locally modified
3605 * directory, or an unversioned item, then the operation will fail.  If
3606 * @a force_delete is true then all such items will be deleted.
3607 *
3608 * @a merge_options (an array of <tt>const char *</tt>), if non-NULL,
3609 * is used to pass additional command line arguments to the merge
3610 * processes (internal or external).  @see
3611 * svn_diff_file_options_parse().
3612 *
3613 * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with @a
3614 * ctx->notify_baton2 once for each merged target, passing the target's local
3615 * path.
3616 *
3617 * If @a record_only is TRUE, the merge is performed, but is limited only to
3618 * mergeinfo property changes on existing paths in @a target_wcpath.
3619 *
3620 * If @a dry_run is TRUE, the merge is carried out, and full notification
3621 * feedback is provided, but the working copy is not modified.
3622 *
3623 * If allow_mixed_rev is @c FALSE, and @a merge_target is a mixed-revision
3624 * working copy, raise @c SVN_ERR_CLIENT_MERGE_UPDATE_REQUIRED.
3625 * Because users rarely intend to merge into mixed-revision working copies,
3626 * it is recommended to set this parameter to FALSE by default unless the
3627 * user has explicitly requested a merge into a mixed-revision working copy.
3628 *
3629 * The authentication baton cached in @a ctx is used to communicate with the
3630 * repository.
3631 *
3632 * @since New in 1.8.
3633 */
3634svn_error_t *
3635svn_client_merge5(const char *source1,
3636                  const svn_opt_revision_t *revision1,
3637                  const char *source2,
3638                  const svn_opt_revision_t *revision2,
3639                  const char *target_wcpath,
3640                  svn_depth_t depth,
3641                  svn_boolean_t ignore_mergeinfo,
3642                  svn_boolean_t diff_ignore_ancestry,
3643                  svn_boolean_t force_delete,
3644                  svn_boolean_t record_only,
3645                  svn_boolean_t dry_run,
3646                  svn_boolean_t allow_mixed_rev,
3647                  const apr_array_header_t *merge_options,
3648                  svn_client_ctx_t *ctx,
3649                  apr_pool_t *pool);
3650
3651/**
3652 * Similar to svn_client_merge5(), but the single @a ignore_ancestry
3653 * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry.
3654 *
3655 * @deprecated Provided for backward compatibility with the 1.7 API.
3656 * @since New in 1.7.
3657 */
3658SVN_DEPRECATED
3659svn_error_t *
3660svn_client_merge4(const char *source1,
3661                  const svn_opt_revision_t *revision1,
3662                  const char *source2,
3663                  const svn_opt_revision_t *revision2,
3664                  const char *target_wcpath,
3665                  svn_depth_t depth,
3666                  svn_boolean_t ignore_ancestry,
3667                  svn_boolean_t force_delete,
3668                  svn_boolean_t record_only,
3669                  svn_boolean_t dry_run,
3670                  svn_boolean_t allow_mixed_rev,
3671                  const apr_array_header_t *merge_options,
3672                  svn_client_ctx_t *ctx,
3673                  apr_pool_t *pool);
3674
3675/**
3676 * Similar to svn_client_merge4(), but with @a allow_mixed_rev set to
3677 * @c TRUE.  The @a force parameter maps to the @c force_delete parameter
3678 * of svn_client_merge4().
3679 *
3680 * @deprecated Provided for backward compatibility with the 1.6 API.
3681 *
3682 * @since New in 1.5.
3683 */
3684SVN_DEPRECATED
3685svn_error_t *
3686svn_client_merge3(const char *source1,
3687                  const svn_opt_revision_t *revision1,
3688                  const char *source2,
3689                  const svn_opt_revision_t *revision2,
3690                  const char *target_wcpath,
3691                  svn_depth_t depth,
3692                  svn_boolean_t ignore_ancestry,
3693                  svn_boolean_t force,
3694                  svn_boolean_t record_only,
3695                  svn_boolean_t dry_run,
3696                  const apr_array_header_t *merge_options,
3697                  svn_client_ctx_t *ctx,
3698                  apr_pool_t *pool);
3699
3700/**
3701 * Similar to svn_client_merge3(), but with @a record_only set to @c
3702 * FALSE, and @a depth set according to @a recurse: if @a recurse is
3703 * TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3704 * FALSE, set @a depth to #svn_depth_files.
3705 *
3706 * @deprecated Provided for backward compatibility with the 1.4 API.
3707 *
3708 * @since New in 1.4.
3709 */
3710SVN_DEPRECATED
3711svn_error_t *
3712svn_client_merge2(const char *source1,
3713                  const svn_opt_revision_t *revision1,
3714                  const char *source2,
3715                  const svn_opt_revision_t *revision2,
3716                  const char *target_wcpath,
3717                  svn_boolean_t recurse,
3718                  svn_boolean_t ignore_ancestry,
3719                  svn_boolean_t force,
3720                  svn_boolean_t dry_run,
3721                  const apr_array_header_t *merge_options,
3722                  svn_client_ctx_t *ctx,
3723                  apr_pool_t *pool);
3724
3725
3726/**
3727 * Similar to svn_client_merge2(), but with @a merge_options set to NULL.
3728 *
3729 * @deprecated Provided for backwards compatibility with the 1.3 API.
3730 */
3731SVN_DEPRECATED
3732svn_error_t *
3733svn_client_merge(const char *source1,
3734                 const svn_opt_revision_t *revision1,
3735                 const char *source2,
3736                 const svn_opt_revision_t *revision2,
3737                 const char *target_wcpath,
3738                 svn_boolean_t recurse,
3739                 svn_boolean_t ignore_ancestry,
3740                 svn_boolean_t force,
3741                 svn_boolean_t dry_run,
3742                 svn_client_ctx_t *ctx,
3743                 apr_pool_t *pool);
3744
3745
3746/**
3747 * Perform a reintegration merge of @a source_path_or_url at @a source_peg_revision
3748 * into @a target_wcpath.
3749 * @a target_wcpath must be a single-revision, #svn_depth_infinity,
3750 * pristine, unswitched working copy -- in other words, it must
3751 * reflect a single revision tree, the "target".  The mergeinfo on @a
3752 * source_path_or_url must reflect that all of the target has been merged into it.
3753 * Then this behaves like a merge with svn_client_merge5() from the
3754 * target's URL to the source.
3755 *
3756 * All other options are handled identically to svn_client_merge5().
3757 * The depth of the merge is always #svn_depth_infinity.
3758 *
3759 * @since New in 1.5.
3760 * @deprecated Provided for backwards compatibility with the 1.7 API.
3761 */
3762SVN_DEPRECATED
3763svn_error_t *
3764svn_client_merge_reintegrate(const char *source_path_or_url,
3765                             const svn_opt_revision_t *source_peg_revision,
3766                             const char *target_wcpath,
3767                             svn_boolean_t dry_run,
3768                             const apr_array_header_t *merge_options,
3769                             svn_client_ctx_t *ctx,
3770                             apr_pool_t *pool);
3771
3772/**
3773 * Merge changes from the source branch identified by
3774 * @a source_path_or_url in peg revision @a source_peg_revision,
3775 * into the target branch working copy at @a target_wcpath.
3776 *
3777 * If @a ranges_to_merge is NULL then perform an automatic merge of
3778 * all the eligible changes up to @a source_peg_revision.  If the merge
3779 * required is a reintegrate merge, then return an error if the WC has
3780 * mixed revisions, local modifications and/or switched subtrees; if
3781 * the merge is determined to be of the non-reintegrate kind, then
3782 * return an error if @a allow_mixed_rev is false and the WC contains
3783 * mixed revisions.
3784 *
3785 * If @a ranges_to_merge is not NULL then merge the changes specified
3786 * by the revision ranges in @a ranges_to_merge, or, when honouring
3787 * mergeinfo, only the eligible parts of those revision ranges.
3788 * @a ranges_to_merge is an array of <tt>svn_opt_revision_range_t
3789 * *</tt> ranges.  These ranges may describe additive and/or
3790 * subtractive merge ranges, they may overlap fully or partially,
3791 * and/or they may partially or fully negate each other.  This
3792 * rangelist is not required to be sorted.  If any revision in the
3793 * list of provided ranges has an `unspecified' or unrecognized
3794 * `kind', return #SVN_ERR_CLIENT_BAD_REVISION.
3795 *
3796 * If @a ranges_to_merge is an empty array, then do nothing.
3797 *
3798 * All other options are handled identically to svn_client_merge5().
3799 *
3800 * @since New in 1.8.
3801 */
3802svn_error_t *
3803svn_client_merge_peg5(const char *source_path_or_url,
3804                      const apr_array_header_t *ranges_to_merge,
3805                      const svn_opt_revision_t *source_peg_revision,
3806                      const char *target_wcpath,
3807                      svn_depth_t depth,
3808                      svn_boolean_t ignore_mergeinfo,
3809                      svn_boolean_t diff_ignore_ancestry,
3810                      svn_boolean_t force_delete,
3811                      svn_boolean_t record_only,
3812                      svn_boolean_t dry_run,
3813                      svn_boolean_t allow_mixed_rev,
3814                      const apr_array_header_t *merge_options,
3815                      svn_client_ctx_t *ctx,
3816                      apr_pool_t *pool);
3817
3818/**
3819 * Similar to svn_client_merge_peg5(), but automatic merge is not available
3820 * (@a ranges_to_merge must not be NULL), and the single @a ignore_ancestry
3821 * parameter maps to both @c ignore_mergeinfo and @c diff_ignore_ancestry.
3822 *
3823 * @deprecated Provided for backward compatibility with the 1.7 API.
3824 * @since New in 1.7.
3825 */
3826SVN_DEPRECATED
3827svn_error_t *
3828svn_client_merge_peg4(const char *source_path_or_url,
3829                      const apr_array_header_t *ranges_to_merge,
3830                      const svn_opt_revision_t *source_peg_revision,
3831                      const char *target_wcpath,
3832                      svn_depth_t depth,
3833                      svn_boolean_t ignore_ancestry,
3834                      svn_boolean_t force_delete,
3835                      svn_boolean_t record_only,
3836                      svn_boolean_t dry_run,
3837                      svn_boolean_t allow_mixed_rev,
3838                      const apr_array_header_t *merge_options,
3839                      svn_client_ctx_t *ctx,
3840                      apr_pool_t *pool);
3841
3842/**
3843 * Similar to svn_client_merge_peg4(), but with @a allow_mixed_rev set to
3844 * @c TRUE.  The @a force parameter maps to the @c force_delete parameter
3845 * of svn_client_merge_peg4().
3846 *
3847 * @deprecated Provided for backward compatibility with the 1.6 API.
3848 *
3849 * @since New in 1.5.
3850 */
3851SVN_DEPRECATED
3852svn_error_t *
3853svn_client_merge_peg3(const char *source,
3854                      const apr_array_header_t *ranges_to_merge,
3855                      const svn_opt_revision_t *peg_revision,
3856                      const char *target_wcpath,
3857                      svn_depth_t depth,
3858                      svn_boolean_t ignore_ancestry,
3859                      svn_boolean_t force,
3860                      svn_boolean_t record_only,
3861                      svn_boolean_t dry_run,
3862                      const apr_array_header_t *merge_options,
3863                      svn_client_ctx_t *ctx,
3864                      apr_pool_t *pool);
3865
3866/**
3867 * Similar to svn_client_merge_peg3(), but with @a record_only set to
3868 * @c FALSE, and @a depth set according to @a recurse: if @a recurse
3869 * is TRUE, set @a depth to #svn_depth_infinity, if @a recurse is
3870 * FALSE, set @a depth to #svn_depth_files.
3871 *
3872 * @deprecated Provided for backwards compatibility with the 1.4 API.
3873 *
3874 * @since New in 1.4.
3875 */
3876SVN_DEPRECATED
3877svn_error_t *
3878svn_client_merge_peg2(const char *source,
3879                      const svn_opt_revision_t *revision1,
3880                      const svn_opt_revision_t *revision2,
3881                      const svn_opt_revision_t *peg_revision,
3882                      const char *target_wcpath,
3883                      svn_boolean_t recurse,
3884                      svn_boolean_t ignore_ancestry,
3885                      svn_boolean_t force,
3886                      svn_boolean_t dry_run,
3887                      const apr_array_header_t *merge_options,
3888                      svn_client_ctx_t *ctx,
3889                      apr_pool_t *pool);
3890
3891/**
3892 * Similar to svn_client_merge_peg2(), but with @a merge_options set to
3893 * NULL.
3894 *
3895 * @deprecated Provided for backwards compatibility with the 1.3 API.
3896 *
3897 * @since New in 1.1.
3898 */
3899SVN_DEPRECATED
3900svn_error_t *
3901svn_client_merge_peg(const char *source,
3902                     const svn_opt_revision_t *revision1,
3903                     const svn_opt_revision_t *revision2,
3904                     const svn_opt_revision_t *peg_revision,
3905                     const char *target_wcpath,
3906                     svn_boolean_t recurse,
3907                     svn_boolean_t ignore_ancestry,
3908                     svn_boolean_t force,
3909                     svn_boolean_t dry_run,
3910                     svn_client_ctx_t *ctx,
3911                     apr_pool_t *pool);
3912
3913
3914/** Set @a suggestions to an ordered array of @c const char *
3915 * potential merge sources (expressed as full repository URLs) for @a
3916 * path_or_url at @a peg_revision.  @a path_or_url is a working copy
3917 * path or repository URL.  @a ctx is a context used for
3918 * authentication in the repository case.  Use @a pool for all
3919 * allocations.
3920 *
3921 * @since New in 1.5.
3922 */
3923svn_error_t *
3924svn_client_suggest_merge_sources(apr_array_header_t **suggestions,
3925                                 const char *path_or_url,
3926                                 const svn_opt_revision_t *peg_revision,
3927                                 svn_client_ctx_t *ctx,
3928                                 apr_pool_t *pool);
3929
3930
3931/**
3932 * Get the mergeinfo for a single target node (ignoring any subtrees).
3933 *
3934 * Set @a *mergeinfo to a hash mapping <tt>const char *</tt> merge source
3935 * URLs to <tt>svn_rangelist_t *</tt> rangelists describing the ranges which
3936 * have been merged into @a path_or_url as of @a peg_revision, per
3937 * @a path_or_url's explicit mergeinfo or inherited mergeinfo if no
3938 * explicit mergeinfo if found.  If no explicit or inherited mergeinfo
3939 * is found, then set @a *mergeinfo to NULL.
3940 *
3941 * Use @a pool for all necessary allocations.
3942 *
3943 * If the server doesn't support retrieval of mergeinfo (which will
3944 * never happen for file:// URLs), return an
3945 * #SVN_ERR_UNSUPPORTED_FEATURE error.
3946 *
3947 * @note Unlike most APIs which deal with mergeinfo, this one returns
3948 * data where the keys of the hash are absolute repository URLs rather
3949 * than repository filesystem paths.
3950 *
3951 * @since New in 1.5.
3952 */
3953svn_error_t *
3954svn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo,
3955                                const char *path_or_url,
3956                                const svn_opt_revision_t *peg_revision,
3957                                svn_client_ctx_t *ctx,
3958                                apr_pool_t *pool);
3959
3960
3961/**
3962 * Describe the revisions that either have or have not been merged from
3963 * one source branch (or subtree) into another.
3964 *
3965 * If @a finding_merged is TRUE, then drive log entry callbacks
3966 * @a receiver / @a receiver_baton with the revisions merged from
3967 * @a source_path_or_url (as of @a source_peg_revision) into
3968 * @a target_path_or_url (as of @a target_peg_revision).  If @a
3969 * finding_merged is FALSE then find the revisions eligible for merging.
3970 *
3971 * If both @a source_start_revision and @a source_end_revision are
3972 * unspecified (that is, of kind @c svn_opt_revision_unspecified),
3973 * @a receiver will be called the requested revisions from 0 to
3974 * @a source_peg_revision and in that order (that is, oldest to
3975 * youngest).  Otherwise, both @a source_start_revision and
3976 * @a source_end_revision must be specified, which has two effects:
3977 *
3978 *   - @a receiver will be called only with revisions which fall
3979 *     within range of @a source_start_revision to
3980 *     @a source_end_revision, inclusive, and
3981 *
3982 *   - those revisions will be ordered in the same "direction" as the
3983 *     walk from @a source_start_revision to @a source_end_revision.
3984 *     (If @a source_start_revision is the younger of the two, @a
3985 *     receiver will be called with revisions in youngest-to-oldest
3986 *     order; otherwise, the reverse occurs.)
3987 *
3988 * If @a depth is #svn_depth_empty consider only the explicit or
3989 * inherited mergeinfo on @a target_path_or_url when calculating merged
3990 * revisions from @a source_path_or_url.  If @a depth is #svn_depth_infinity
3991 * then also consider the explicit subtree mergeinfo under @a
3992 * target_path_or_url.
3993 * If a depth other than #svn_depth_empty or #svn_depth_infinity is
3994 * requested then return a #SVN_ERR_UNSUPPORTED_FEATURE error.
3995 *
3996 * In addition to the behavior of @a discover_changed_paths described in
3997 * svn_client_log5(), if set to TRUE it enables detection of sub-tree
3998 * merges that are complete but can't be detected as complete without
3999 * access to the changed paths.  Sub-tree merges detected as complete will
4000 * be included if @a finding_merged is TRUE or filtered if @a finding_merged
4001 * is FALSE.
4002 *
4003 * @a revprops is the same as for svn_client_log5().  Use @a scratch_pool for
4004 * all temporary allocations.
4005 *
4006 * @a ctx is a context used for authentication.
4007 *
4008 * If the server doesn't support retrieval of mergeinfo, return an
4009 * #SVN_ERR_UNSUPPORTED_FEATURE error.
4010 *
4011 * @since New in 1.8.
4012 */
4013svn_error_t *
4014svn_client_mergeinfo_log2(svn_boolean_t finding_merged,
4015                          const char *target_path_or_url,
4016                          const svn_opt_revision_t *target_peg_revision,
4017                          const char *source_path_or_url,
4018                          const svn_opt_revision_t *source_peg_revision,
4019                          const svn_opt_revision_t *source_start_revision,
4020                          const svn_opt_revision_t *source_end_revision,
4021                          svn_log_entry_receiver_t receiver,
4022                          void *receiver_baton,
4023                          svn_boolean_t discover_changed_paths,
4024                          svn_depth_t depth,
4025                          const apr_array_header_t *revprops,
4026                          svn_client_ctx_t *ctx,
4027                          apr_pool_t *scratch_pool);
4028
4029/**
4030 * Similar to svn_client_mergeinfo_log2(), but with @a source_start_revision
4031 * and @a source_end_revision always of kind @c svn_opt_revision_unspecified;
4032 *
4033 * @deprecated Provided for backwards compatibility with the 1.7 API.
4034 * @since New in 1.7.
4035 */
4036SVN_DEPRECATED
4037svn_error_t *
4038svn_client_mergeinfo_log(svn_boolean_t finding_merged,
4039                         const char *target_path_or_url,
4040                         const svn_opt_revision_t *target_peg_revision,
4041                         const char *source_path_or_url,
4042                         const svn_opt_revision_t *source_peg_revision,
4043                         svn_log_entry_receiver_t receiver,
4044                         void *receiver_baton,
4045                         svn_boolean_t discover_changed_paths,
4046                         svn_depth_t depth,
4047                         const apr_array_header_t *revprops,
4048                         svn_client_ctx_t *ctx,
4049                         apr_pool_t *scratch_pool);
4050
4051/**
4052 * Similar to svn_client_mergeinfo_log(), but finds only merged revisions
4053 * and always operates at @a depth #svn_depth_empty.
4054 *
4055 * @deprecated Provided for backwards compatibility with the 1.6 API. Use
4056 * svn_client_mergeinfo_log() instead.
4057 * @since New in 1.5.
4058 */
4059SVN_DEPRECATED
4060svn_error_t *
4061svn_client_mergeinfo_log_merged(const char *path_or_url,
4062                                const svn_opt_revision_t *peg_revision,
4063                                const char *merge_source_path_or_url,
4064                                const svn_opt_revision_t *src_peg_revision,
4065                                svn_log_entry_receiver_t receiver,
4066                                void *receiver_baton,
4067                                svn_boolean_t discover_changed_paths,
4068                                const apr_array_header_t *revprops,
4069                                svn_client_ctx_t *ctx,
4070                                apr_pool_t *pool);
4071
4072/**
4073 * Similar to svn_client_mergeinfo_log(), but finds only eligible revisions
4074 * and always operates at @a depth #svn_depth_empty.
4075 *
4076 * @deprecated Provided for backwards compatibility with the 1.6 API. Use
4077 * svn_client_mergeinfo_log() instead.
4078 * @since New in 1.5.
4079 */
4080SVN_DEPRECATED
4081svn_error_t *
4082svn_client_mergeinfo_log_eligible(const char *path_or_url,
4083                                  const svn_opt_revision_t *peg_revision,
4084                                  const char *merge_source_path_or_url,
4085                                  const svn_opt_revision_t *src_peg_revision,
4086                                  svn_log_entry_receiver_t receiver,
4087                                  void *receiver_baton,
4088                                  svn_boolean_t discover_changed_paths,
4089                                  const apr_array_header_t *revprops,
4090                                  svn_client_ctx_t *ctx,
4091                                  apr_pool_t *pool);
4092
4093/** @} */
4094
4095/**
4096 * @defgroup Cleanup Cleanup an abnormally terminated working copy.
4097 *
4098 * @{
4099 */
4100
4101/** Recursively vacuum a working copy directory @a dir_abspath,
4102 * removing unnecessary data.
4103 *
4104 * If @a include_externals is @c TRUE, recurse into externals and vacuum them
4105 * as well.
4106 *
4107 * If @a remove_unversioned_items is @c TRUE, remove unversioned items
4108 * in @a dir_abspath after successful working copy cleanup.
4109 * If @a remove_ignored_items is @c TRUE, remove ignored unversioned items
4110 * in @a dir_abspath after successful working copy cleanup.
4111 *
4112 * If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded
4113 * timestamps for unmodified files in the working copy, reducing comparision
4114 * time on future checks.
4115 *
4116 * If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working
4117 * copy root unreferenced files in the pristine store are removed.
4118 *
4119 * When asked to remove unversioned or ignored items, and the working copy
4120 * is already locked, return #SVN_ERR_WC_LOCKED. This prevents accidental
4121 * working copy corruption in case users run the cleanup operation to
4122 * remove unversioned items while another client is performing some other
4123 * operation on the working copy.
4124 *
4125 * If @a ctx->cancel_func is non-NULL, invoke it with @a
4126 * ctx->cancel_baton at various points during the operation.  If it
4127 * returns an error (typically #SVN_ERR_CANCELLED), return that error
4128 * immediately.
4129 *
4130 * Use @a scratch_pool for any temporary allocations.
4131 *
4132 * @since New in 1.9.
4133 */
4134svn_error_t *
4135svn_client_vacuum(const char *dir_abspath,
4136                  svn_boolean_t remove_unversioned_items,
4137                  svn_boolean_t remove_ignored_items,
4138                  svn_boolean_t fix_recorded_timestamps,
4139                  svn_boolean_t vacuum_pristines,
4140                  svn_boolean_t include_externals,
4141                  svn_client_ctx_t *ctx,
4142                  apr_pool_t *scratch_pool);
4143
4144
4145/** Recursively cleanup a working copy directory @a dir_abspath, finishing any
4146 * incomplete operations, removing lockfiles, etc.
4147 *
4148 * If @a break_locks is @c TRUE, existing working copy locks at or below @a
4149 * dir_abspath are broken, otherwise a normal write lock is obtained.
4150 *
4151 * If @a fix_recorded_timestamps is @c TRUE, this function fixes recorded
4152 * timestamps for unmodified files in the working copy, reducing comparision
4153 * time on future checks.
4154 *
4155 * If @a clear_dav_cache is @c TRUE, the caching of DAV information for older
4156 * mod_dav served repositories is cleared. This clearing invalidates some
4157 * cached information used for pre-HTTPv2 repositories.
4158 *
4159 * If @a vacuum_pristines is @c TRUE, and @a dir_abspath points to the working
4160 * copy root unreferenced files in the pristine store are removed.
4161 *
4162 * If @a include_externals is @c TRUE, recurse into externals and clean
4163 * them up as well.
4164 *
4165 * If @a ctx->cancel_func is non-NULL, invoke it with @a
4166 * ctx->cancel_baton at various points during the operation.  If it
4167 * returns an error (typically #SVN_ERR_CANCELLED), return that error
4168 * immediately.
4169 *
4170 * Use @a scratch_pool for any temporary allocations.
4171 *
4172 * @since New in 1.9.
4173 */
4174svn_error_t *
4175svn_client_cleanup2(const char *dir_abspath,
4176                    svn_boolean_t break_locks,
4177                    svn_boolean_t fix_recorded_timestamps,
4178                    svn_boolean_t clear_dav_cache,
4179                    svn_boolean_t vacuum_pristines,
4180                    svn_boolean_t include_externals,
4181                    svn_client_ctx_t *ctx,
4182                    apr_pool_t *scratch_pool);
4183
4184/** Like svn_client_cleanup2(), but no support for not breaking locks and
4185 * cleaning up externals and using a potentially non absolute path.
4186 *
4187 * @deprecated Provided for limited backwards compatibility with the 1.8 API.
4188 */
4189SVN_DEPRECATED
4190svn_error_t *
4191svn_client_cleanup(const char *dir,
4192                   svn_client_ctx_t *ctx,
4193                   apr_pool_t *scratch_pool);
4194
4195
4196/** @} */
4197
4198/**
4199 * @defgroup Upgrade Upgrade a working copy.
4200 *
4201 * @{
4202 */
4203
4204/** Recursively upgrade a working copy from any older format to the current
4205 * WC metadata storage format.  @a wcroot_dir is the path to the WC root.
4206 *
4207 * Use @a scratch_pool for any temporary allocations.
4208 *
4209 * @since New in 1.7.
4210 */
4211svn_error_t *
4212svn_client_upgrade(const char *wcroot_dir,
4213                   svn_client_ctx_t *ctx,
4214                   apr_pool_t *scratch_pool);
4215
4216
4217/** @} */
4218
4219/**
4220 * @defgroup Relocate Switch a working copy to a different repository.
4221 *
4222 * @{
4223 */
4224
4225/**
4226 * Recursively modify a working copy rooted at @a wcroot_dir, changing
4227 * any repository URLs that begin with @a from_prefix to begin with @a
4228 * to_prefix instead.
4229 *
4230 * @param wcroot_dir Working copy root directory
4231 * @param from_prefix Original URL
4232 * @param to_prefix New URL
4233 * @param ignore_externals If not set, recurse into external working
4234 *        copies after relocating the primary working copy
4235 * @param ctx svn_client_ctx_t
4236 * @param pool The pool from which to perform memory allocations
4237 *
4238 * @since New in 1.7
4239 */
4240svn_error_t *
4241svn_client_relocate2(const char *wcroot_dir,
4242                     const char *from_prefix,
4243                     const char *to_prefix,
4244                     svn_boolean_t ignore_externals,
4245                     svn_client_ctx_t *ctx,
4246                     apr_pool_t *pool);
4247
4248/**
4249 * Similar to svn_client_relocate2(), but with @a ignore_externals
4250 * always TRUE.
4251 *
4252 * @note As of the 1.7 API, @a dir is required to be a working copy
4253 * root directory, and @a recurse is required to be TRUE.
4254 *
4255 * @deprecated Provided for limited backwards compatibility with the
4256 * 1.6 API.
4257 */
4258SVN_DEPRECATED
4259svn_error_t *
4260svn_client_relocate(const char *dir,
4261                    const char *from_prefix,
4262                    const char *to_prefix,
4263                    svn_boolean_t recurse,
4264                    svn_client_ctx_t *ctx,
4265                    apr_pool_t *pool);
4266
4267/** @} */
4268
4269/**
4270 * @defgroup Revert Remove local changes in a repository.
4271 *
4272 * @{
4273 */
4274
4275/**
4276 * Restore the pristine version of working copy @a paths,
4277 * effectively undoing any local mods.  For each path in @a paths,
4278 * revert it if it is a file.  Else if it is a directory, revert
4279 * according to @a depth:
4280 *
4281 * @a paths is an array of (const char *) local WC paths.
4282 *
4283 * If @a depth is #svn_depth_empty, revert just the properties on
4284 * the directory; else if #svn_depth_files, revert the properties
4285 * and any files immediately under the directory; else if
4286 * #svn_depth_immediates, revert all of the preceding plus
4287 * properties on immediate subdirectories; else if #svn_depth_infinity,
4288 * revert path and everything under it fully recursively.
4289 *
4290 * @a changelists is an array of <tt>const char *</tt> changelist
4291 * names, used as a restrictive filter on items reverted; that is,
4292 * don't revert any item unless it's a member of one of those
4293 * changelists.  If @a changelists is empty (or altogether @c NULL),
4294 * no changelist filtering occurs.
4295 *
4296 * If @a clear_changelists is TRUE, then changelist information for the
4297 * paths is cleared while reverting.
4298 *
4299 * If @a metadata_only is TRUE, the files and directories aren't changed
4300 * by the operation. If there are conflict marker files attached to the
4301 * targets these are removed.
4302 *
4303 * If @a ctx->notify_func2 is non-NULL, then for each item reverted,
4304 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of
4305 * the reverted item.
4306 *
4307 * If an item specified for reversion is not under version control,
4308 * then do not error, just invoke @a ctx->notify_func2 with @a
4309 * ctx->notify_baton2, using notification code #svn_wc_notify_skip.
4310 *
4311 * @since New in 1.9.
4312 */
4313svn_error_t *
4314svn_client_revert3(const apr_array_header_t *paths,
4315                   svn_depth_t depth,
4316                   const apr_array_header_t *changelists,
4317                   svn_boolean_t clear_changelists,
4318                   svn_boolean_t metadata_only,
4319                   svn_client_ctx_t *ctx,
4320                   apr_pool_t *pool);
4321
4322/** Similar to svn_client_revert2, but with @a clear_changelists set to
4323 * FALSE and @a metadata_only set to FALSE.
4324 *
4325 * @since New in 1.5.
4326 * @deprecated Provided for backwards compatibility with the 1.8 API.
4327 */
4328SVN_DEPRECATED
4329svn_error_t *
4330svn_client_revert2(const apr_array_header_t *paths,
4331                   svn_depth_t depth,
4332                   const apr_array_header_t *changelists,
4333                   svn_client_ctx_t *ctx,
4334                   apr_pool_t *pool);
4335
4336
4337/**
4338 * Similar to svn_client_revert2(), but with @a changelists passed as
4339 * @c NULL, and @a depth set according to @a recurse: if @a recurse is
4340 * TRUE, @a depth is #svn_depth_infinity, else if @a recurse is
4341 * FALSE, @a depth is #svn_depth_empty.
4342 *
4343 * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files;
4344 * revert is deliberately different.
4345 *
4346 * @deprecated Provided for backwards compatibility with the 1.4 API.
4347 */
4348SVN_DEPRECATED
4349svn_error_t *
4350svn_client_revert(const apr_array_header_t *paths,
4351                  svn_boolean_t recursive,
4352                  svn_client_ctx_t *ctx,
4353                  apr_pool_t *pool);
4354
4355
4356/** @} */
4357
4358/**
4359 * @defgroup Resolved Mark conflicted paths as resolved.
4360 *
4361 * @{
4362 */
4363
4364/**
4365 * Similar to svn_client_resolve(), but without automatic conflict
4366 * resolution support.
4367 *
4368 * @deprecated Provided for backward compatibility with the 1.4 API.
4369 * Use svn_client_resolve() with @a conflict_choice == @c
4370 * svn_wc_conflict_choose_merged instead.
4371 */
4372SVN_DEPRECATED
4373svn_error_t *
4374svn_client_resolved(const char *path,
4375                    svn_boolean_t recursive,
4376                    svn_client_ctx_t *ctx,
4377                    apr_pool_t *pool);
4378
4379/** Perform automatic conflict resolution on a working copy @a path.
4380 *
4381 * If @a conflict_choice is
4382 *
4383 *   - #svn_wc_conflict_choose_base:
4384 *     resolve the conflict with the old file contents
4385 *
4386 *   - #svn_wc_conflict_choose_mine_full:
4387 *     use the original working contents
4388 *
4389 *   - #svn_wc_conflict_choose_theirs_full:
4390 *     use the new contents
4391 *
4392 *   - #svn_wc_conflict_choose_merged:
4393 *     don't change the contents at all, just remove the conflict
4394 *     status, which is the pre-1.5 behavior.
4395 *
4396 *   - #svn_wc_conflict_choose_theirs_conflict
4397 *     ###...
4398 *
4399 *   - #svn_wc_conflict_choose_mine_conflict
4400 *     ###...
4401 *
4402 *   - svn_wc_conflict_choose_unspecified
4403 *     invoke @a ctx->conflict_func2 with @a ctx->conflict_baton2 to obtain
4404 *     a resolution decision for each conflict.  This can be used to
4405 *     implement interactive conflict resolution.
4406 *
4407 * #svn_wc_conflict_choose_theirs_conflict and
4408 * #svn_wc_conflict_choose_mine_conflict are not legal for binary
4409 * files or properties.
4410 *
4411 * If @a path is not in a state of conflict to begin with, do nothing.
4412 * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL,
4413 * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path.
4414 * ### with what notification parameters?
4415 *
4416 * If @a depth is #svn_depth_empty, act only on @a path; if
4417 * #svn_depth_files, resolve @a path and its conflicted file
4418 * children (if any); if #svn_depth_immediates, resolve @a path and
4419 * all its immediate conflicted children (both files and directories,
4420 * if any); if #svn_depth_infinity, resolve @a path and every
4421 * conflicted file or directory anywhere beneath it.
4422 *
4423 * Note that this operation will try to lock the parent directory of
4424 * @a path in order to be able to resolve tree-conflicts on @a path.
4425 *
4426 * @since New in 1.5.
4427 */
4428svn_error_t *
4429svn_client_resolve(const char *path,
4430                   svn_depth_t depth,
4431                   svn_wc_conflict_choice_t conflict_choice,
4432                   svn_client_ctx_t *ctx,
4433                   apr_pool_t *pool);
4434
4435
4436/** @} */
4437
4438/**
4439 * @defgroup Copy Copy paths in the working copy and repository.
4440 *
4441 * @{
4442 */
4443
4444/**
4445 * A structure which describes the source of a copy operation--its path,
4446 * revision, and peg revision.
4447 *
4448 * @since New in 1.5.
4449 */
4450typedef struct svn_client_copy_source_t
4451{
4452    /** The source path or URL. */
4453    const char *path;
4454
4455    /** The source operational revision. */
4456    const svn_opt_revision_t *revision;
4457
4458    /** The source peg revision. */
4459    const svn_opt_revision_t *peg_revision;
4460} svn_client_copy_source_t;
4461
4462/** Copy each source in @a sources to @a dst_path.
4463 *
4464 * If multiple @a sources are given, @a dst_path must be a directory,
4465 * and @a sources will be copied as children of @a dst_path.
4466 *
4467 * @a sources is an array of <tt>svn_client_copy_source_t *</tt> elements,
4468 * either all referring to local WC items or all referring to versioned
4469 * items in the repository.
4470 *
4471 * If @a sources has only one item, attempt to copy it to @a dst_path.  If
4472 * @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the
4473 * item as a child of @a dst_path.  If @a copy_as_child is FALSE and
4474 * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path
4475 * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
4476 * URL.
4477 *
4478 * If @a sources has multiple items, and @a copy_as_child is TRUE, all
4479 * @a sources are copied as children of @a dst_path.  If any child of
4480 * @a dst_path already exists with the same name any item in @a sources,
4481 * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
4482 * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
4483 *
4484 * If @a sources has multiple items, and @a copy_as_child is FALSE, fail
4485 * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
4486 *
4487 * If @a dst_path is a URL, use the authentication baton
4488 * in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately
4489 * attempt to commit the copy action in the repository.
4490 *
4491 * If @a dst_path is not a URL, then this is just a variant of
4492 * svn_client_add(), where the @a sources are scheduled for addition
4493 * as copies.  No changes will happen to the repository until a commit occurs.
4494 * This scheduling can be removed with svn_client_revert2().
4495 *
4496 * If @a make_parents is TRUE, create any non-existent parent directories
4497 * also.  Otherwise the parent of @a dst_path must already exist.
4498 *
4499 * If @a ignore_externals is set, don't process externals definitions
4500 * as part of this operation.
4501 *
4502 * If @a metadata_only is @c TRUE and copying a file in a working copy,
4503 * everything in the metadata is updated as if the node is moved, but the
4504 * actual disk copy operation is not performed. This feature is useful for
4505 * clients that want to keep the working copy in sync while the actual working
4506 * copy is updated by some other task.
4507 *
4508 * If @a pin_externals is set, pin URLs in copied externals definitions
4509 * to their current revision unless they were already pinned to a
4510 * particular revision. A pinned external uses a URL which points at a
4511 * fixed revision, rather than the HEAD revision. Externals in the copy
4512 * destination are pinned to either a working copy base revision or the
4513 * HEAD revision of a repository (as of the time the copy operation is
4514 * performed), depending on the type of the copy source:
4515 <pre>
4516    copy source: working copy (WC)       REPOS
4517   ------------+------------------------+---------------------------+
4518    copy    WC | external's WC BASE rev | external's repos HEAD rev |
4519    dest:      |------------------------+---------------------------+
4520         REPOS | external's WC BASE rev | external's repos HEAD rev |
4521   ------------+------------------------+---------------------------+
4522 </pre>
4523 * If the copy source is a working copy, then all externals must be checked
4524 * out, be at a single-revision, contain no local modifications, and contain
4525 * no switched subtrees. Else, #SVN_ERR_WC_PATH_UNEXPECTED_STATUS is returned.
4526 *
4527 * If non-NULL, @a externals_to_pin restricts pinning to a subset of externals.
4528 * It is a hash table keyed by either a local absolute path or a URL at which
4529 * an svn:externals property is set. The hash table contains apr_array_header_t*
4530 * elements as returned by svn_wc_parse_externals_description3(). These arrays
4531 * contain elements of type svn_wc_external_item2_t*, each of which corresponds
4532 * to a single line of an svn:externals definition. Externals corresponding to
4533 * these items will be pinned, other externals will not be pinned.
4534 * If @a externals_to_pin is @c NULL then all externals are pinned.
4535 * If @a pin_externals is @c FALSE then @a externals_to_pin is ignored.
4536 *
4537 * If non-NULL, @a revprop_table is a hash table holding additional,
4538 * custom revision properties (<tt>const char *</tt> names mapped to
4539 * <tt>svn_string_t *</tt> values) to be set on the new revision in
4540 * the event that this is a committing operation.  This table cannot
4541 * contain any standard Subversion properties.
4542 *
4543 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo
4544 * that this function can use to query for a commit log message when one is
4545 * needed.
4546 *
4547 * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2
4548 * for each item added at the new location, passing the new, relative path of
4549 * the added item.
4550 *
4551 * If @a commit_callback is non-NULL, then for each successful commit, call
4552 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
4553 * the commit.
4554 *
4555 * @since New in 1.9.
4556 */
4557svn_error_t *
4558svn_client_copy7(const apr_array_header_t *sources,
4559                 const char *dst_path,
4560                 svn_boolean_t copy_as_child,
4561                 svn_boolean_t make_parents,
4562                 svn_boolean_t ignore_externals,
4563                 svn_boolean_t metadata_only,
4564                 svn_boolean_t pin_externals,
4565                 const apr_hash_t *externals_to_pin,
4566                 const apr_hash_t *revprop_table,
4567                 svn_commit_callback2_t commit_callback,
4568                 void *commit_baton,
4569                 svn_client_ctx_t *ctx,
4570                 apr_pool_t *pool);
4571
4572/**
4573 * Similar to svn_client_copy7(), but doesn't support meta_data_only
4574 * and cannot pin externals.
4575 *
4576 *
4577 * @since New in 1.7.
4578 * @deprecated Provided for backward compatibility with the 1.8 API.
4579 */
4580SVN_DEPRECATED
4581svn_error_t *
4582svn_client_copy6(const apr_array_header_t *sources,
4583                 const char *dst_path,
4584                 svn_boolean_t copy_as_child,
4585                 svn_boolean_t make_parents,
4586                 svn_boolean_t ignore_externals,
4587                 const apr_hash_t *revprop_table,
4588                 svn_commit_callback2_t commit_callback,
4589                 void *commit_baton,
4590                 svn_client_ctx_t *ctx,
4591                 apr_pool_t *pool);
4592
4593/**
4594 * Similar to svn_client_copy6(), but returns the commit info in
4595 * @a *commit_info_p rather than through a callback function.
4596 *
4597 * @since New in 1.6.
4598 * @deprecated Provided for backward compatibility with the 1.6 API.
4599 */
4600SVN_DEPRECATED
4601svn_error_t *
4602svn_client_copy5(svn_commit_info_t **commit_info_p,
4603                 const apr_array_header_t *sources,
4604                 const char *dst_path,
4605                 svn_boolean_t copy_as_child,
4606                 svn_boolean_t make_parents,
4607                 svn_boolean_t ignore_externals,
4608                 const apr_hash_t *revprop_table,
4609                 svn_client_ctx_t *ctx,
4610                 apr_pool_t *pool);
4611
4612/**
4613 * Similar to svn_client_copy5(), with @a ignore_externals set to @c FALSE.
4614 *
4615 * @since New in 1.5.
4616 *
4617 * @deprecated Provided for backward compatibility with the 1.5 API.
4618 */
4619SVN_DEPRECATED
4620svn_error_t *
4621svn_client_copy4(svn_commit_info_t **commit_info_p,
4622                 const apr_array_header_t *sources,
4623                 const char *dst_path,
4624                 svn_boolean_t copy_as_child,
4625                 svn_boolean_t make_parents,
4626                 const apr_hash_t *revprop_table,
4627                 svn_client_ctx_t *ctx,
4628                 apr_pool_t *pool);
4629
4630/**
4631 * Similar to svn_client_copy4(), with only one @a src_path, @a
4632 * copy_as_child set to @c FALSE, @a revprop_table passed as NULL, and
4633 * @a make_parents set to @c FALSE.  Also, use @a src_revision as both
4634 * the operational and peg revision.
4635 *
4636 * @since New in 1.4.
4637 *
4638 * @deprecated Provided for backward compatibility with the 1.4 API.
4639 */
4640SVN_DEPRECATED
4641svn_error_t *
4642svn_client_copy3(svn_commit_info_t **commit_info_p,
4643                 const char *src_path,
4644                 const svn_opt_revision_t *src_revision,
4645                 const char *dst_path,
4646                 svn_client_ctx_t *ctx,
4647                 apr_pool_t *pool);
4648
4649
4650/**
4651 * Similar to svn_client_copy3(), with the difference that if @a dst_path
4652 * already exists and is a directory, copy the item into that directory,
4653 * keeping its name (the last component of @a src_path).
4654 *
4655 * @since New in 1.3.
4656 *
4657 * @deprecated Provided for backward compatibility with the 1.3 API.
4658 */
4659SVN_DEPRECATED
4660svn_error_t *
4661svn_client_copy2(svn_commit_info_t **commit_info_p,
4662                 const char *src_path,
4663                 const svn_opt_revision_t *src_revision,
4664                 const char *dst_path,
4665                 svn_client_ctx_t *ctx,
4666                 apr_pool_t *pool);
4667
4668
4669/**
4670 * Similar to svn_client_copy2(), but uses #svn_client_commit_info_t
4671 * for @a commit_info_p.
4672 *
4673 * @deprecated Provided for backward compatibility with the 1.2 API.
4674 */
4675SVN_DEPRECATED
4676svn_error_t *
4677svn_client_copy(svn_client_commit_info_t **commit_info_p,
4678                const char *src_path,
4679                const svn_opt_revision_t *src_revision,
4680                const char *dst_path,
4681                svn_client_ctx_t *ctx,
4682                apr_pool_t *pool);
4683
4684
4685/** @} */
4686
4687/**
4688 * @defgroup Move Move paths in the working copy or repository.
4689 *
4690 * @{
4691 */
4692
4693/**
4694 * Move @a src_paths to @a dst_path.
4695 *
4696 * @a src_paths is an array of (const char *) paths -- either all WC paths
4697 * or all URLs -- of versioned items.  If multiple @a src_paths are given,
4698 * @a dst_path must be a directory and @a src_paths will be moved as
4699 * children of @a dst_path.
4700 *
4701 * If @a src_paths are repository URLs:
4702 *
4703 *   - @a dst_path must also be a repository URL.
4704 *
4705 *   - The authentication baton in @a ctx and @a ctx->log_msg_func/@a
4706 *     ctx->log_msg_baton are used to commit the move.
4707 *
4708 *   - The move operation will be immediately committed.
4709 *
4710 * If @a src_paths are working copy paths:
4711 *
4712 *   - @a dst_path must also be a working copy path.
4713 *
4714 *   - @a ctx->log_msg_func3 and @a ctx->log_msg_baton3 are ignored.
4715 *
4716 *   - This is a scheduling operation.  No changes will happen to the
4717 *     repository until a commit occurs.  This scheduling can be removed
4718 *     with svn_client_revert2().  If one of @a src_paths is a file it is
4719 *     removed from the working copy immediately.  If one of @a src_path
4720 *     is a directory it will remain in the working copy but all the files,
4721 *     and unversioned items, it contains will be removed.
4722 *
4723 * If @a src_paths has only one item, attempt to move it to @a dst_path.  If
4724 * @a move_as_child is TRUE and @a dst_path already exists, attempt to move the
4725 * item as a child of @a dst_path.  If @a move_as_child is FALSE and
4726 * @a dst_path already exists, fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path
4727 * is a working copy path and #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
4728 * URL.
4729 *
4730 * If @a src_paths has multiple items, and @a move_as_child is TRUE, all
4731 * @a src_paths are moved as children of @a dst_path.  If any child of
4732 * @a dst_path already exists with the same name any item in @a src_paths,
4733 * fail with #SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
4734 * #SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
4735 *
4736 * If @a src_paths has multiple items, and @a move_as_child is FALSE, fail
4737 * with #SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
4738 *
4739 * If @a make_parents is TRUE, create any non-existent parent directories
4740 * also.  Otherwise, the parent of @a dst_path must already exist.
4741 *
4742 * If @a allow_mixed_revisions is @c FALSE, #SVN_ERR_WC_MIXED_REVISIONS
4743 * will be raised if the move source is a mixed-revision subtree.
4744 * If @a allow_mixed_revisions is TRUE, a mixed-revision move source is
4745 * allowed but the move will degrade to a copy and a delete without local
4746 * move tracking. This parameter should be set to FALSE except where backwards
4747 * compatibility to svn_client_move6() is required.
4748 *
4749 * If @a metadata_only is @c TRUE and moving a file in a working copy,
4750 * everything in the metadata is updated as if the node is moved, but the
4751 * actual disk move operation is not performed. This feature is useful for
4752 * clients that want to keep the working copy in sync while the actual working
4753 * copy is updated by some other task.
4754 *
4755 * If non-NULL, @a revprop_table is a hash table holding additional,
4756 * custom revision properties (<tt>const char *</tt> names mapped to
4757 * <tt>svn_string_t *</tt> values) to be set on the new revision in
4758 * the event that this is a committing operation.  This table cannot
4759 * contain any standard Subversion properties.
4760 *
4761 * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo that
4762 * this function can use to query for a commit log message when one is needed.
4763 *
4764 * If @a ctx->notify_func2 is non-NULL, then for each item moved, call
4765 * @a ctx->notify_func2 with the @a ctx->notify_baton2 twice, once to indicate
4766 * the deletion of the moved thing, and once to indicate the addition of
4767 * the new location of the thing.
4768 *
4769 * ### Is this really true?  What about svn_wc_notify_commit_replaced()? ###
4770 *
4771 * If @a commit_callback is non-NULL, then for each successful commit, call
4772 * @a commit_callback with @a commit_baton and a #svn_commit_info_t for
4773 * the commit.
4774 *
4775 * @since New in 1.8.
4776 */
4777svn_error_t *
4778svn_client_move7(const apr_array_header_t *src_paths,
4779                 const char *dst_path,
4780                 svn_boolean_t move_as_child,
4781                 svn_boolean_t make_parents,
4782                 svn_boolean_t allow_mixed_revisions,
4783                 svn_boolean_t metadata_only,
4784                 const apr_hash_t *revprop_table,
4785                 svn_commit_callback2_t commit_callback,
4786                 void *commit_baton,
4787                 svn_client_ctx_t *ctx,
4788                 apr_pool_t *pool);
4789
4790/**
4791 * Similar to svn_client_move7(), but with @a allow_mixed_revisions always
4792 * set to @c TRUE and @a metadata_only always to @c FALSE.
4793 *
4794 * @since New in 1.7.
4795 * @deprecated Provided for backward compatibility with the 1.7 API.
4796 */
4797SVN_DEPRECATED
4798svn_error_t *
4799svn_client_move6(const apr_array_header_t *src_paths,
4800                 const char *dst_path,
4801                 svn_boolean_t move_as_child,
4802                 svn_boolean_t make_parents,
4803                 const apr_hash_t *revprop_table,
4804                 svn_commit_callback2_t commit_callback,
4805                 void *commit_baton,
4806                 svn_client_ctx_t *ctx,
4807                 apr_pool_t *pool);
4808
4809/**
4810 * Similar to svn_client_move6(), but returns the commit info in
4811 * @a *commit_info_p rather than through a callback function.
4812 *
4813 * A WC-to-WC move will include any modified and/or unversioned children.
4814 * @a force is ignored.
4815 *
4816 * @since New in 1.5.
4817 * @deprecated Provided for backward compatibility with the 1.6 API.
4818 */
4819SVN_DEPRECATED
4820svn_error_t *
4821svn_client_move5(svn_commit_info_t **commit_info_p,
4822                 const apr_array_header_t *src_paths,
4823                 const char *dst_path,
4824                 svn_boolean_t force,
4825                 svn_boolean_t move_as_child,
4826                 svn_boolean_t make_parents,
4827                 const apr_hash_t *revprop_table,
4828                 svn_client_ctx_t *ctx,
4829                 apr_pool_t *pool);
4830
4831/**
4832 * Similar to svn_client_move5(), with only one @a src_path, @a
4833 * move_as_child set to @c FALSE, @a revprop_table passed as NULL, and
4834 * @a make_parents set to @c FALSE.
4835 *
4836 * Note: The behaviour of @a force changed in 1.5 (r860885 and r861421), when
4837 * the 'move' semantics were improved to just move the source including any
4838 * modified and/or unversioned items in it.  Before that, @a force
4839 * controlled what happened to such items, but now @a force is ignored.
4840 *
4841 * @since New in 1.4.
4842 *
4843 * @deprecated Provided for backward compatibility with the 1.4 API.
4844 */
4845SVN_DEPRECATED
4846svn_error_t *
4847svn_client_move4(svn_commit_info_t **commit_info_p,
4848                 const char *src_path,
4849                 const char *dst_path,
4850                 svn_boolean_t force,
4851                 svn_client_ctx_t *ctx,
4852                 apr_pool_t *pool);
4853
4854/**
4855 * Similar to svn_client_move4(), with the difference that if @a dst_path
4856 * already exists and is a directory, move the item into that directory,
4857 * keeping its name (the last component of @a src_path).
4858 *
4859 * @since New in 1.3.
4860 *
4861 * @deprecated Provided for backward compatibility with the 1.3 API.
4862 */
4863SVN_DEPRECATED
4864svn_error_t *
4865svn_client_move3(svn_commit_info_t **commit_info_p,
4866                 const char *src_path,
4867                 const char *dst_path,
4868                 svn_boolean_t force,
4869                 svn_client_ctx_t *ctx,
4870                 apr_pool_t *pool);
4871
4872/**
4873 * Similar to svn_client_move3(), but uses #svn_client_commit_info_t
4874 * for @a commit_info_p.
4875 *
4876 * @deprecated Provided for backward compatibility with the 1.2 API.
4877 *
4878 * @since New in 1.2.
4879 */
4880SVN_DEPRECATED
4881svn_error_t *
4882svn_client_move2(svn_client_commit_info_t **commit_info_p,
4883                 const char *src_path,
4884                 const char *dst_path,
4885                 svn_boolean_t force,
4886                 svn_client_ctx_t *ctx,
4887                 apr_pool_t *pool);
4888
4889/**
4890 * Similar to svn_client_move2(), but an extra argument @a src_revision
4891 * must be passed.  This has no effect, but must be of kind
4892 * #svn_opt_revision_unspecified or #svn_opt_revision_head,
4893 * otherwise error #SVN_ERR_UNSUPPORTED_FEATURE is returned.
4894 *
4895 * @deprecated Provided for backward compatibility with the 1.1 API.
4896 */
4897SVN_DEPRECATED
4898svn_error_t *
4899svn_client_move(svn_client_commit_info_t **commit_info_p,
4900                const char *src_path,
4901                const svn_opt_revision_t *src_revision,
4902                const char *dst_path,
4903                svn_boolean_t force,
4904                svn_client_ctx_t *ctx,
4905                apr_pool_t *pool);
4906
4907/** @} */
4908
4909
4910/** Properties
4911 *
4912 * Note that certain svn-controlled properties must always have their
4913 * values set and stored in UTF8 with LF line endings.  When
4914 * retrieving these properties, callers must convert the values back
4915 * to native locale and native line-endings before displaying them to
4916 * the user.  For help with this task, see
4917 * svn_prop_needs_translation(), svn_subst_translate_string(),  and
4918 * svn_subst_detranslate_string().
4919 *
4920 * @defgroup svn_client_prop_funcs Property functions
4921 * @{
4922 */
4923
4924
4925/**
4926 * Set @a propname to @a propval on @a url.  A @a propval of @c NULL will
4927 * delete the property.
4928 *
4929 * Immediately attempt to commit the property change in the repository,
4930 * using the authentication baton in @a ctx and @a
4931 * ctx->log_msg_func3/@a ctx->log_msg_baton3.
4932 *
4933 * If the property has changed on @a url since revision
4934 * @a base_revision_for_url (which must not be #SVN_INVALID_REVNUM), no
4935 * change will be made and an error will be returned.
4936 *
4937 * If non-NULL, @a revprop_table is a hash table holding additional,
4938 * custom revision properties (<tt>const char *</tt> names mapped to
4939 * <tt>svn_string_t *</tt> values) to be set on the new revision.  This
4940 * table cannot contain any standard Subversion properties.
4941 *
4942 * If @a commit_callback is non-NULL, then call @a commit_callback with
4943 * @a commit_baton and a #svn_commit_info_t for the commit.
4944 *
4945 * If @a propname is an svn-controlled property (i.e. prefixed with
4946 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
4947 * the value is UTF8-encoded and uses LF line-endings.
4948 *
4949 * If @a skip_checks is TRUE, do no validity checking.  But if @a
4950 * skip_checks is FALSE, and @a propname is not a valid property for @a
4951 * url, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the property is
4952 * not appropriate for @a url), or * #SVN_ERR_BAD_MIME_TYPE (if @a propname
4953 * is "svn:mime-type", but @a propval is not a valid mime-type).
4954 *
4955 * Use @a scratch_pool for all memory allocation.
4956 *
4957 * @since New in 1.7.
4958 */
4959svn_error_t *
4960svn_client_propset_remote(const char *propname,
4961                          const svn_string_t *propval,
4962                          const char *url,
4963                          svn_boolean_t skip_checks,
4964                          svn_revnum_t base_revision_for_url,
4965                          const apr_hash_t *revprop_table,
4966                          svn_commit_callback2_t commit_callback,
4967                          void *commit_baton,
4968                          svn_client_ctx_t *ctx,
4969                          apr_pool_t *scratch_pool);
4970
4971/**
4972 * Set @a propname to @a propval on each (const char *) target in @a
4973 * targets.  The targets must be all working copy paths.  A @a propval
4974 * of @c NULL will delete the property.
4975 *
4976 * If @a depth is #svn_depth_empty, set the property on each member of
4977 * @a targets only; if #svn_depth_files, set it on @a targets and their
4978 * file children (if any); if #svn_depth_immediates, on @a targets and all
4979 * of their immediate children (both files and directories); if
4980 * #svn_depth_infinity, on @a targets and everything beneath them.
4981 *
4982 * @a changelists is an array of <tt>const char *</tt> changelist
4983 * names, used as a restrictive filter on items whose properties are
4984 * set; that is, don't set properties on any item unless it's a member
4985 * of one of those changelists.  If @a changelists is empty (or
4986 * altogether @c NULL), no changelist filtering occurs.
4987 *
4988 * If @a propname is an svn-controlled property (i.e. prefixed with
4989 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
4990 * the value is UTF8-encoded and uses LF line-endings.
4991 *
4992 * If @a skip_checks is TRUE, do no validity checking.  But if @a
4993 * skip_checks is FALSE, and @a propname is not a valid property for @a
4994 * targets, return an error, either #SVN_ERR_ILLEGAL_TARGET (if the
4995 * property is not appropriate for @a targets), or
4996 * #SVN_ERR_BAD_MIME_TYPE (if @a propname is "svn:mime-type", but @a
4997 * propval is not a valid mime-type).
4998 *
4999 * If @a ctx->cancel_func is non-NULL, invoke it passing @a
5000 * ctx->cancel_baton at various places during the operation.
5001 *
5002 * Use @a scratch_pool for all memory allocation.
5003 *
5004 * @since New in 1.7.
5005 */
5006svn_error_t *
5007svn_client_propset_local(const char *propname,
5008                         const svn_string_t *propval,
5009                         const apr_array_header_t *targets,
5010                         svn_depth_t depth,
5011                         svn_boolean_t skip_checks,
5012                         const apr_array_header_t *changelists,
5013                         svn_client_ctx_t *ctx,
5014                         apr_pool_t *scratch_pool);
5015
5016/**
5017 * An amalgamation of svn_client_propset_local() and
5018 * svn_client_propset_remote() that takes only a single target, and
5019 * returns the commit info in @a *commit_info_p rather than through a
5020 * callback function.
5021 *
5022 * @since New in 1.5.
5023 * @deprecated Provided for backward compatibility with the 1.6 API.
5024 */
5025SVN_DEPRECATED
5026svn_error_t *
5027svn_client_propset3(svn_commit_info_t **commit_info_p,
5028                    const char *propname,
5029                    const svn_string_t *propval,
5030                    const char *target,
5031                    svn_depth_t depth,
5032                    svn_boolean_t skip_checks,
5033                    svn_revnum_t base_revision_for_url,
5034                    const apr_array_header_t *changelists,
5035                    const apr_hash_t *revprop_table,
5036                    svn_client_ctx_t *ctx,
5037                    apr_pool_t *pool);
5038
5039/**
5040 * Like svn_client_propset3(), but with @a base_revision_for_url
5041 * always #SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a
5042 * changelists always @c NULL; @a revprop_table always @c NULL; and @a
5043 * depth set according to @a recurse: if @a recurse is TRUE, @a depth
5044 * is #svn_depth_infinity, else #svn_depth_empty.
5045 *
5046 * @deprecated Provided for backward compatibility with the 1.4 API.
5047 */
5048SVN_DEPRECATED
5049svn_error_t *
5050svn_client_propset2(const char *propname,
5051                    const svn_string_t *propval,
5052                    const char *target,
5053                    svn_boolean_t recurse,
5054                    svn_boolean_t skip_checks,
5055                    svn_client_ctx_t *ctx,
5056                    apr_pool_t *pool);
5057
5058/**
5059 * Like svn_client_propset2(), but with @a skip_checks always FALSE and a
5060 * newly created @a ctx.
5061 *
5062 * @deprecated Provided for backward compatibility with the 1.1 API.
5063 */
5064SVN_DEPRECATED
5065svn_error_t *
5066svn_client_propset(const char *propname,
5067                   const svn_string_t *propval,
5068                   const char *target,
5069                   svn_boolean_t recurse,
5070                   apr_pool_t *pool);
5071
5072/** Set @a propname to @a propval on revision @a revision in the repository
5073 * represented by @a URL.  Use the authentication baton in @a ctx for
5074 * authentication, and @a pool for all memory allocation.  Return the actual
5075 * rev affected in @a *set_rev.  A @a propval of @c NULL will delete the
5076 * property.
5077 *
5078 * If @a original_propval is non-NULL, then just before setting the
5079 * new value, check that the old value matches @a original_propval;
5080 * if they do not match, return the error #SVN_ERR_RA_OUT_OF_DATE.
5081 * This is to help clients support interactive editing of revprops:
5082 * without this check, the window during which the property may change
5083 * underneath the user is as wide as the amount of time the user
5084 * spends editing the property.  With this check, the window is
5085 * reduced to a small, constant amount of time right before we set the
5086 * new value.  (To check that an old value is still non-existent, set
5087 * @a original_propval->data to NULL, and @a original_propval->len is
5088 * ignored.)
5089 * If the server advertises #SVN_RA_CAPABILITY_ATOMIC_REVPROPS, the
5090 * check of @a original_propval is done atomically.
5091 *
5092 * Note: the representation of "property is not set" in @a
5093 * original_propval differs from the representation in other APIs
5094 * (such as svn_fs_change_rev_prop2() and svn_ra_change_rev_prop2()).
5095 *
5096 * If @a force is TRUE, allow newlines in the author property.
5097 *
5098 * If @a propname is an svn-controlled property (i.e. prefixed with
5099 * #SVN_PROP_PREFIX), then the caller is responsible for ensuring that
5100 * the value UTF8-encoded and uses LF line-endings.
5101 *
5102 * Note that unlike its cousin svn_client_propset3(), this routine
5103 * doesn't affect the working copy at all;  it's a pure network
5104 * operation that changes an *unversioned* property attached to a
5105 * revision.  This can be used to tweak log messages, dates, authors,
5106 * and the like.  Be careful:  it's a lossy operation.
5107
5108 * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
5109 * functions and baton which are called upon successful setting of the
5110 * property.
5111 *
5112 * Also note that unless the administrator creates a
5113 * pre-revprop-change hook in the repository, this feature will fail.
5114 *
5115 * @since New in 1.6.
5116 */
5117svn_error_t *
5118svn_client_revprop_set2(const char *propname,
5119                        const svn_string_t *propval,
5120                        const svn_string_t *original_propval,
5121                        const char *URL,
5122                        const svn_opt_revision_t *revision,
5123                        svn_revnum_t *set_rev,
5124                        svn_boolean_t force,
5125                        svn_client_ctx_t *ctx,
5126                        apr_pool_t *pool);
5127
5128/**
5129 * Similar to svn_client_revprop_set2(), but with @a original_propval
5130 * always @c NULL.
5131 *
5132 * @deprecated Provided for backward compatibility with the 1.5 API.
5133 */
5134SVN_DEPRECATED
5135svn_error_t *
5136svn_client_revprop_set(const char *propname,
5137                       const svn_string_t *propval,
5138                       const char *URL,
5139                       const svn_opt_revision_t *revision,
5140                       svn_revnum_t *set_rev,
5141                       svn_boolean_t force,
5142                       svn_client_ctx_t *ctx,
5143                       apr_pool_t *pool);
5144
5145/**
5146 * Set @a *props to a hash table whose keys are absolute paths or URLs
5147 * of items on which property @a propname is explicitly set, and whose
5148 * values are <tt>svn_string_t *</tt> representing the property value for
5149 * @a propname at that path.
5150 *
5151 * If @a inherited_props is not @c NULL, then set @a *inherited_props to a
5152 * depth-first ordered array of #svn_prop_inherited_item_t * structures
5153 * representing the properties inherited by @a target.  If @a target is a
5154 * working copy path, then properties inherited by @a target as far as the
5155 * root of the working copy are obtained from the working copy's actual
5156 * property values.  Properties inherited from above the working copy root
5157 * come from the inherited properties cache.  If @a target is a URL, then
5158 * the inherited properties come from the repository.  If @a inherited_props
5159 * is not @c NULL and no inheritable properties are found, then set
5160 * @a *inherited_props to an empty array.
5161 *
5162 * The #svn_prop_inherited_item_t->path_or_url members of the
5163 * #svn_prop_inherited_item_t * structures in @a *inherited_props are
5164 * URLs if @a target is a URL or if @a target is a working copy path but the
5165 * property represented by the structure is above the working copy root (i.e.
5166 * the inherited property is from the cache).  In all other cases the
5167 * #svn_prop_inherited_item_t->path_or_url members are absolute working copy
5168 * paths.
5169 *
5170 * Allocate @a *props (including keys and values) and @a *inherited_props
5171 * (including its elements) in @a result_pool, use @a scratch_pool for
5172 * temporary allocations.
5173 *
5174 * @a target is a WC absolute path or a URL.
5175 *
5176 * Don't store any path, not even @a target, if it does not have a
5177 * property named @a propname.
5178 *
5179 * If @a revision->kind is #svn_opt_revision_unspecified, then: get
5180 * properties from the working copy if @a target is a working copy
5181 * path, or from the repository head if @a target is a URL.  Else get
5182 * the properties as of @a revision.  The actual node revision
5183 * selected is determined by the path as it exists in @a peg_revision.
5184 * If @a peg_revision->kind is #svn_opt_revision_unspecified, then
5185 * it defaults to #svn_opt_revision_head for URLs or
5186 * #svn_opt_revision_working for WC targets.  Use the authentication
5187 * baton in @a ctx for authentication if contacting the repository.
5188 * If @a actual_revnum is not @c NULL, the actual revision number used
5189 * for the fetch is stored in @a *actual_revnum.
5190 *
5191 * If @a depth is #svn_depth_empty, fetch the property from
5192 * @a target only; if #svn_depth_files, fetch from @a target and its
5193 * file children (if any); if #svn_depth_immediates, from @a target
5194 * and all of its immediate children (both files and directories); if
5195 * #svn_depth_infinity, from @a target and everything beneath it.
5196 *
5197 * @a changelists is an array of <tt>const char *</tt> changelist
5198 * names, used as a restrictive filter on items whose properties are
5199 * gotten; that is, don't get @a propname on any item unless it's a member
5200 * of one of those changelists.  If @a changelists is empty (or
5201 * altogether @c NULL), no changelist filtering occurs.
5202 *
5203 * If error, don't touch @a *props, otherwise @a *props is a hash table
5204 * even if empty.
5205 *
5206 * This function returns SVN_ERR_UNVERSIONED_RESOURCE when it is called on
5207 * unversioned nodes.
5208 *
5209 * @since New in 1.8.
5210 */
5211svn_error_t *
5212svn_client_propget5(apr_hash_t **props,
5213                    apr_array_header_t **inherited_props,
5214                    const char *propname,
5215                    const char *target,  /* abspath or URL */
5216                    const svn_opt_revision_t *peg_revision,
5217                    const svn_opt_revision_t *revision,
5218                    svn_revnum_t *actual_revnum,
5219                    svn_depth_t depth,
5220                    const apr_array_header_t *changelists,
5221                    svn_client_ctx_t *ctx,
5222                    apr_pool_t *result_pool,
5223                    apr_pool_t *scratch_pool);
5224
5225/**
5226 * Similar to svn_client_propget5 but with @a inherited_props always
5227 * passed as NULL.
5228 *
5229 * @since New in 1.7.
5230 * @deprecated Provided for backward compatibility with the 1.7 API.
5231 */
5232SVN_DEPRECATED
5233svn_error_t *
5234svn_client_propget4(apr_hash_t **props,
5235                    const char *propname,
5236                    const char *target,  /* abspath or URL */
5237                    const svn_opt_revision_t *peg_revision,
5238                    const svn_opt_revision_t *revision,
5239                    svn_revnum_t *actual_revnum,
5240                    svn_depth_t depth,
5241                    const apr_array_header_t *changelists,
5242                    svn_client_ctx_t *ctx,
5243                    apr_pool_t *result_pool,
5244                    apr_pool_t *scratch_pool);
5245
5246/**
5247 * Similar to svn_client_propget4(), but with the following change to the
5248 * output hash keys:  keys are `<tt>char *</tt>' paths, prefixed by
5249 * @a target, which is a working copy path or a URL.
5250 *
5251 * This function returns SVN_ERR_ENTRY_NOT_FOUND where svn_client_propget4
5252 * would return SVN_ERR_UNVERSIONED_RESOURCE.
5253 *
5254 * @since New in 1.5.
5255 * @deprecated Provided for backward compatibility with the 1.6 API.
5256 */
5257SVN_DEPRECATED
5258svn_error_t *
5259svn_client_propget3(apr_hash_t **props,
5260                    const char *propname,
5261                    const char *target,
5262                    const svn_opt_revision_t *peg_revision,
5263                    const svn_opt_revision_t *revision,
5264                    svn_revnum_t *actual_revnum,
5265                    svn_depth_t depth,
5266                    const apr_array_header_t *changelists,
5267                    svn_client_ctx_t *ctx,
5268                    apr_pool_t *pool);
5269
5270/**
5271 * Similar to svn_client_propget3(), except that @a actual_revnum and
5272 * @a changelists are always @c NULL, and @a depth is set according to
5273 * @a recurse: if @a recurse is TRUE, then @a depth is
5274 * #svn_depth_infinity, else #svn_depth_empty.
5275 *
5276 * @deprecated Provided for backward compatibility with the 1.4 API.
5277 */
5278SVN_DEPRECATED
5279svn_error_t *
5280svn_client_propget2(apr_hash_t **props,
5281                    const char *propname,
5282                    const char *target,
5283                    const svn_opt_revision_t *peg_revision,
5284                    const svn_opt_revision_t *revision,
5285                    svn_boolean_t recurse,
5286                    svn_client_ctx_t *ctx,
5287                    apr_pool_t *pool);
5288
5289/**
5290 * Similar to svn_client_propget2(), except that @a peg_revision is
5291 * always the same as @a revision.
5292 *
5293 * @deprecated Provided for backward compatibility with the 1.1 API.
5294 */
5295SVN_DEPRECATED
5296svn_error_t *
5297svn_client_propget(apr_hash_t **props,
5298                   const char *propname,
5299                   const char *target,
5300                   const svn_opt_revision_t *revision,
5301                   svn_boolean_t recurse,
5302                   svn_client_ctx_t *ctx,
5303                   apr_pool_t *pool);
5304
5305/** Set @a *propval to the value of @a propname on revision @a revision
5306 * in the repository represented by @a URL.  Use the authentication baton
5307 * in @a ctx for authentication, and @a pool for all memory allocation.
5308 * Return the actual rev queried in @a *set_rev.
5309 *
5310 * If @a propname does not exist on @a revision, set @a *propval to @c NULL.
5311 *
5312 * Note that unlike its cousin svn_client_propget(), this routine
5313 * doesn't affect the working copy at all; it's a pure network
5314 * operation that queries an *unversioned* property attached to a
5315 * revision.  This can query log messages, dates, authors, and the
5316 * like.
5317 */
5318svn_error_t *
5319svn_client_revprop_get(const char *propname,
5320                       svn_string_t **propval,
5321                       const char *URL,
5322                       const svn_opt_revision_t *revision,
5323                       svn_revnum_t *set_rev,
5324                       svn_client_ctx_t *ctx,
5325                       apr_pool_t *pool);
5326
5327/**
5328 * Invoke @a receiver with @a receiver_baton to return the regular explicit, and
5329 * possibly the inherited, properties of @a target, a URL or working copy path.
5330 * @a receiver will be called for each path encountered.
5331 *
5332 * @a target is a WC path or a URL.
5333 *
5334 * If @a revision->kind is #svn_opt_revision_unspecified, then get the
5335 * explicit (and possibly the inherited) properties from the working copy,
5336 * if @a target is a working copy path, or from the repository head if
5337 * @a target is a URL.  Else get the properties as of @a revision.
5338 * The actual node revision selected is determined by the path as it exists
5339 * in @a peg_revision.  If @a peg_revision->kind is
5340 * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head
5341 * for URLs or #svn_opt_revision_working for WC targets.  Use the
5342 * authentication baton cached in @a ctx for authentication if contacting
5343 * the repository.
5344 *
5345 * If @a depth is #svn_depth_empty, list only the properties of
5346 * @a target itself.  If @a depth is #svn_depth_files, and
5347 * @a target is a directory, list the properties of @a target
5348 * and its file entries.  If #svn_depth_immediates, list the properties
5349 * of its immediate file and directory entries.  If #svn_depth_infinity,
5350 * list the properties of its file entries and recurse (with
5351 * #svn_depth_infinity) on directory entries.  #svn_depth_unknown is
5352 * equivalent to #svn_depth_empty.  All other values produce undefined
5353 * results.
5354 *
5355 * @a changelists is an array of <tt>const char *</tt> changelist
5356 * names, used as a restrictive filter on items whose properties are
5357 * listed; that is, don't list properties on any item unless it's a member
5358 * of one of those changelists.  If @a changelists is empty (or
5359 * altogether @c NULL), no changelist filtering occurs.
5360 *
5361 * If @a get_target_inherited_props is true, then also return any inherited
5362 * properties when @a receiver is called for @a target.  If @a target is a
5363 * working copy path, then properties inherited by @a target as far as the
5364 * root of the working copy are obtained from the working copy's actual
5365 * property values.  Properties inherited from above the working copy
5366 * root come from the inherited properties cache.  If @a target is a URL,
5367 * then the inherited properties come from the repository.
5368 * If @a get_target_inherited_props is false, then no inherited properties
5369 * are returned to @a receiver.
5370 *
5371 * If @a target is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND.
5372 *
5373 * @since New in 1.8.
5374 */
5375svn_error_t *
5376svn_client_proplist4(const char *target,
5377                     const svn_opt_revision_t *peg_revision,
5378                     const svn_opt_revision_t *revision,
5379                     svn_depth_t depth,
5380                     const apr_array_header_t *changelists,
5381                     svn_boolean_t get_target_inherited_props,
5382                     svn_proplist_receiver2_t receiver,
5383                     void *receiver_baton,
5384                     svn_client_ctx_t *ctx,
5385                     apr_pool_t *scratch_pool);
5386
5387/**
5388 * Similar to svn_client_proplist4(), except that the @a receiver type
5389 * is a #svn_proplist_receiver_t, @a get_target_inherited_props is
5390 * always passed NULL, and there is no separate scratch pool.
5391 *
5392 * @since New in 1.5.
5393 * @deprecated Provided for backward compatibility with the 1.7 API.
5394 */
5395SVN_DEPRECATED
5396svn_error_t *
5397svn_client_proplist3(const char *target,
5398                     const svn_opt_revision_t *peg_revision,
5399                     const svn_opt_revision_t *revision,
5400                     svn_depth_t depth,
5401                     const apr_array_header_t *changelists,
5402                     svn_proplist_receiver_t receiver,
5403                     void *receiver_baton,
5404                     svn_client_ctx_t *ctx,
5405                     apr_pool_t *pool);
5406
5407/**
5408 * Similar to svn_client_proplist3(), except the properties are
5409 * returned as an array of #svn_client_proplist_item_t * structures
5410 * instead of by invoking the receiver function, there's no support
5411 * for @a changelists filtering, and @a recurse is used instead of a
5412 * #svn_depth_t parameter (FALSE corresponds to #svn_depth_empty,
5413 * and TRUE to #svn_depth_infinity).
5414 *
5415 * @since New in 1.2.
5416 *
5417 * @deprecated Provided for backward compatibility with the 1.4 API.
5418 */
5419SVN_DEPRECATED
5420svn_error_t *
5421svn_client_proplist2(apr_array_header_t **props,
5422                     const char *target,
5423                     const svn_opt_revision_t *peg_revision,
5424                     const svn_opt_revision_t *revision,
5425                     svn_boolean_t recurse,
5426                     svn_client_ctx_t *ctx,
5427                     apr_pool_t *pool);
5428
5429/**
5430 * Similar to svn_client_proplist2(), except that @a peg_revision is
5431 * always the same as @a revision.
5432 *
5433 * @deprecated Provided for backward compatibility with the 1.1 API.
5434 */
5435SVN_DEPRECATED
5436svn_error_t *
5437svn_client_proplist(apr_array_header_t **props,
5438                    const char *target,
5439                    const svn_opt_revision_t *revision,
5440                    svn_boolean_t recurse,
5441                    svn_client_ctx_t *ctx,
5442                    apr_pool_t *pool);
5443
5444/** Set @a *props to a hash of the revision props attached to @a revision in
5445 * the repository represented by @a URL.  Use the authentication baton cached
5446 * in @a ctx for authentication, and @a pool for all memory allocation.
5447 * Return the actual rev queried in @a *set_rev.
5448 *
5449 * The allocated hash maps (<tt>const char *</tt>) property names to
5450 * (#svn_string_t *) property values.
5451 *
5452 * Note that unlike its cousin svn_client_proplist(), this routine
5453 * doesn't read a working copy at all; it's a pure network operation
5454 * that reads *unversioned* properties attached to a revision.
5455 */
5456svn_error_t *
5457svn_client_revprop_list(apr_hash_t **props,
5458                        const char *URL,
5459                        const svn_opt_revision_t *revision,
5460                        svn_revnum_t *set_rev,
5461                        svn_client_ctx_t *ctx,
5462                        apr_pool_t *pool);
5463/** @} */
5464
5465
5466/**
5467 * @defgroup Export Export a tree from version control.
5468 *
5469 * @{
5470 */
5471
5472/**
5473 * Export the contents of either a subversion repository or a
5474 * subversion working copy into a 'clean' directory (meaning a
5475 * directory with no administrative directories).  If @a result_rev
5476 * is not @c NULL and the path being exported is a repository URL, set
5477 * @a *result_rev to the value of the revision actually exported (set
5478 * it to #SVN_INVALID_REVNUM for local exports).
5479 *
5480 * @a from_path_or_url is either the path the working copy on disk, or
5481 * a URL to the repository you wish to export.
5482 *
5483 * When exporting a directory, @a to_path is the path to the directory
5484 * where you wish to create the exported tree; when exporting a file, it
5485 * is the path of the file that will be created.  If @a to_path is the
5486 * empty path, then the basename of the export file/directory in the repository
5487 * will be used.  If @a to_path represents an existing directory, and a
5488 * file is being exported, then a file with the that basename will be
5489 * created under that directory (as with 'copy' operations).
5490 *
5491 * @a peg_revision is the revision where the path is first looked up
5492 * when exporting from a repository.  If @a peg_revision->kind is
5493 * #svn_opt_revision_unspecified, then it defaults to #svn_opt_revision_head
5494 * for URLs or #svn_opt_revision_working for WC targets.
5495 *
5496 * @a revision is the revision that should be exported, which is only used
5497 * when exporting from a repository.
5498 *
5499 * @a peg_revision and @a revision must not be @c NULL.
5500 *
5501 * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
5502 * functions and baton which are passed to svn_client_checkout() when
5503 * exporting from a repository.
5504 *
5505 * @a ctx is a context used for authentication in the repository case.
5506 *
5507 * @a overwrite if TRUE will cause the export to overwrite files or
5508 * directories.
5509 *
5510 * If @a ignore_externals is set, don't process externals definitions
5511 * as part of this operation.
5512 *
5513 * If @a ignore_keywords is set, don't expand keywords as part of this
5514 * operation.
5515 *
5516 * @a native_eol allows you to override the standard eol marker on the
5517 * platform you are running on.  Can be either "LF", "CR" or "CRLF" or
5518 * NULL.  If NULL will use the standard eol marker.  Any other value
5519 * will cause the #SVN_ERR_IO_UNKNOWN_EOL error to be returned.
5520 *
5521 * If @a depth is #svn_depth_infinity, export fully recursively.  Else
5522 * if it is #svn_depth_immediates, export @a from_path_or_url and its
5523 * immediate children (if any), but with subdirectories empty and at
5524 * #svn_depth_empty.  Else if #svn_depth_files, export @a
5525 * from_path_or_url and its immediate file children (if any) only.  If
5526 * @a depth is #svn_depth_empty, then export exactly @a
5527 * from_path_or_url and none of its children.
5528 *
5529 * All allocations are done in @a pool.
5530 *
5531 * @since New in 1.7.
5532 */
5533svn_error_t *
5534svn_client_export5(svn_revnum_t *result_rev,
5535                   const char *from_path_or_url,
5536                   const char *to_path,
5537                   const svn_opt_revision_t *peg_revision,
5538                   const svn_opt_revision_t *revision,
5539                   svn_boolean_t overwrite,
5540                   svn_boolean_t ignore_externals,
5541                   svn_boolean_t ignore_keywords,
5542                   svn_depth_t depth,
5543                   const char *native_eol,
5544                   svn_client_ctx_t *ctx,
5545                   apr_pool_t *pool);
5546
5547/**
5548 * Similar to svn_client_export5(), but with @a ignore_keywords set
5549 * to FALSE.
5550 *
5551 * @deprecated Provided for backward compatibility with the 1.6 API.
5552 * @since New in 1.5.
5553 */
5554SVN_DEPRECATED
5555svn_error_t *
5556svn_client_export4(svn_revnum_t *result_rev,
5557                   const char *from_path_or_url,
5558                   const char *to_path,
5559                   const svn_opt_revision_t *peg_revision,
5560                   const svn_opt_revision_t *revision,
5561                   svn_boolean_t overwrite,
5562                   svn_boolean_t ignore_externals,
5563                   svn_depth_t depth,
5564                   const char *native_eol,
5565                   svn_client_ctx_t *ctx,
5566                   apr_pool_t *pool);
5567
5568
5569/**
5570 * Similar to svn_client_export4(), but with @a depth set according to
5571 * @a recurse: if @a recurse is TRUE, set @a depth to
5572 * #svn_depth_infinity, if @a recurse is FALSE, set @a depth to
5573 * #svn_depth_files.
5574 *
5575 * @deprecated Provided for backward compatibility with the 1.4 API.
5576 *
5577 * @since New in 1.2.
5578 */
5579SVN_DEPRECATED
5580svn_error_t *
5581svn_client_export3(svn_revnum_t *result_rev,
5582                   const char *from_path_or_url,
5583                   const char *to_path,
5584                   const svn_opt_revision_t *peg_revision,
5585                   const svn_opt_revision_t *revision,
5586                   svn_boolean_t overwrite,
5587                   svn_boolean_t ignore_externals,
5588                   svn_boolean_t recurse,
5589                   const char *native_eol,
5590                   svn_client_ctx_t *ctx,
5591                   apr_pool_t *pool);
5592
5593
5594/**
5595 * Similar to svn_client_export3(), but with @a peg_revision
5596 * always set to #svn_opt_revision_unspecified, @a overwrite set to
5597 * the value of @a force, @a ignore_externals always FALSE, and
5598 * @a recurse always TRUE.
5599 *
5600 * @since New in 1.1.
5601 * @deprecated Provided for backward compatibility with the 1.1 API.
5602 */
5603SVN_DEPRECATED
5604svn_error_t *
5605svn_client_export2(svn_revnum_t *result_rev,
5606                   const char *from_path_or_url,
5607                   const char *to_path,
5608                   svn_opt_revision_t *revision,
5609                   svn_boolean_t force,
5610                   const char *native_eol,
5611                   svn_client_ctx_t *ctx,
5612                   apr_pool_t *pool);
5613
5614
5615/**
5616 * Similar to svn_client_export2(), but with @a native_eol always set
5617 * to NULL.
5618 *
5619 * @deprecated Provided for backward compatibility with the 1.0 API.
5620 */
5621SVN_DEPRECATED
5622svn_error_t *
5623svn_client_export(svn_revnum_t *result_rev,
5624                  const char *from_path_or_url,
5625                  const char *to_path,
5626                  svn_opt_revision_t *revision,
5627                  svn_boolean_t force,
5628                  svn_client_ctx_t *ctx,
5629                  apr_pool_t *pool);
5630
5631/** @} */
5632
5633/**
5634 * @defgroup List List / ls
5635 *
5636 * @{
5637 */
5638
5639/** The type of function invoked by svn_client_list3() to report the details
5640 * of each directory entry being listed.
5641 *
5642 * @a baton is the baton that was passed to the caller.  @a path is the
5643 * entry's path relative to @a abs_path; it is the empty path when reporting
5644 * the top node of the list operation.  @a dirent contains some or all of
5645 * the directory entry's details, as determined by the caller.  @a lock is
5646 * the entry's lock, if it is locked and if lock information is being
5647 * reported by the caller; otherwise @a lock is NULL.  @a abs_path is the
5648 * repository path of the top node of the list operation; it is relative to
5649 * the repository root and begins with "/".
5650 *
5651 * If svn_client_list3() was called with @a include_externals set to TRUE,
5652 * @a external_parent_url and @a external_target will be set.
5653 * @a external_parent_url is url of the directory which has the
5654 * externals definitions. @a external_target is the target subdirectory of
5655 * externals definitions which is relative to the parent directory that holds
5656 * the external item.
5657 *
5658 * If external_parent_url and external_target are defined, the item being
5659 * listed is part of the external described by external_parent_url and
5660 * external_target. Else, the item is not part of any external.
5661 * Moreover, we will never mix items which are part of separate
5662 * externals, and will always finish listing an external before listing
5663 * the next one.
5664 *
5665 * @a scratch_pool may be used for temporary allocations.
5666 *
5667 * @since New in 1.8.
5668 */
5669typedef svn_error_t *(*svn_client_list_func2_t)(
5670  void *baton,
5671  const char *path,
5672  const svn_dirent_t *dirent,
5673  const svn_lock_t *lock,
5674  const char *abs_path,
5675  const char *external_parent_url,
5676  const char *external_target,
5677  apr_pool_t *scratch_pool);
5678
5679/**
5680 * Similar to #svn_client_list_func2_t, but without any information about
5681 * externals definitions.
5682 *
5683 * @deprecated Provided for backward compatibility with the 1.7 API.
5684 *
5685 * @since New in 1.4
5686 *
5687 * */
5688typedef svn_error_t *(*svn_client_list_func_t)(void *baton,
5689                                               const char *path,
5690                                               const svn_dirent_t *dirent,
5691                                               const svn_lock_t *lock,
5692                                               const char *abs_path,
5693                                               apr_pool_t *pool);
5694
5695/**
5696 * Report the directory entry, and possibly children, for @a
5697 * path_or_url at @a revision.  The actual node revision selected is
5698 * determined by the path as it exists in @a peg_revision.  If @a
5699 * peg_revision->kind is #svn_opt_revision_unspecified, then it defaults
5700 * to #svn_opt_revision_head for URLs or #svn_opt_revision_working
5701 * for WC targets.
5702 *
5703 * Report directory entries by invoking @a list_func/@a baton with @a path
5704 * relative to @a path_or_url.  The dirent for @a path_or_url is reported
5705 * using an empty @a path.  If @a path_or_url is a directory, also report
5706 * its children.  If @a path_or_url is non-existent, return
5707 * #SVN_ERR_FS_NOT_FOUND.
5708 *
5709 * If @a fetch_locks is TRUE, include locks when reporting directory entries.
5710 *
5711 * If @a include_externals is TRUE, also list all external items
5712 * reached by recursion. @a depth value passed to the original list target
5713 * applies for the externals also.
5714 *
5715 * Use @a pool for temporary allocations.
5716 *
5717 * Use authentication baton cached in @a ctx to authenticate against the
5718 * repository.
5719 *
5720 * If @a depth is #svn_depth_empty, list just @a path_or_url itself.
5721 * If @a depth is #svn_depth_files, list @a path_or_url and its file
5722 * entries.  If #svn_depth_immediates, list its immediate file and
5723 * directory entries.  If #svn_depth_infinity, list file entries and
5724 * recurse (with #svn_depth_infinity) on directory entries.
5725 *
5726 * @a dirent_fields controls which fields in the #svn_dirent_t's are
5727 * filled in.  To have them totally filled in use #SVN_DIRENT_ALL,
5728 * otherwise simply bitwise OR together the combination of @c SVN_DIRENT_
5729 * fields you care about.
5730 *
5731 * @since New in 1.8.
5732 */
5733svn_error_t *
5734svn_client_list3(const char *path_or_url,
5735                 const svn_opt_revision_t *peg_revision,
5736                 const svn_opt_revision_t *revision,
5737                 svn_depth_t depth,
5738                 apr_uint32_t dirent_fields,
5739                 svn_boolean_t fetch_locks,
5740                 svn_boolean_t include_externals,
5741                 svn_client_list_func2_t list_func,
5742                 void *baton,
5743                 svn_client_ctx_t *ctx,
5744                 apr_pool_t *pool);
5745
5746
5747/** Similar to svn_client_list3(), but with @a include_externals set
5748 * to FALSE, and using a #svn_client_list_func_t as callback.
5749 *
5750 * @deprecated Provided for backwards compatibility with the 1.7 API.
5751 *
5752 * @since New in 1.5.
5753 */
5754SVN_DEPRECATED
5755svn_error_t *
5756svn_client_list2(const char *path_or_url,
5757                 const svn_opt_revision_t *peg_revision,
5758                 const svn_opt_revision_t *revision,
5759                 svn_depth_t depth,
5760                 apr_uint32_t dirent_fields,
5761                 svn_boolean_t fetch_locks,
5762                 svn_client_list_func_t list_func,
5763                 void *baton,
5764                 svn_client_ctx_t *ctx,
5765                 apr_pool_t *pool);
5766
5767/**
5768 * Similar to svn_client_list2(), but with @a recurse instead of @a depth.
5769 * If @a recurse is TRUE, pass #svn_depth_files for @a depth; else
5770 * pass #svn_depth_infinity.
5771 *
5772 * @since New in 1.4.
5773 *
5774 * @deprecated Provided for backward compatibility with the 1.4 API.
5775 */
5776SVN_DEPRECATED
5777svn_error_t *
5778svn_client_list(const char *path_or_url,
5779                const svn_opt_revision_t *peg_revision,
5780                const svn_opt_revision_t *revision,
5781                svn_boolean_t recurse,
5782                apr_uint32_t dirent_fields,
5783                svn_boolean_t fetch_locks,
5784                svn_client_list_func_t list_func,
5785                void *baton,
5786                svn_client_ctx_t *ctx,
5787                apr_pool_t *pool);
5788
5789/**
5790 * Same as svn_client_list(), but always passes #SVN_DIRENT_ALL for
5791 * the @a dirent_fields argument and returns all information in two
5792 * hash tables instead of invoking a callback.
5793 *
5794 * Set @a *dirents to a newly allocated hash of directory entries.
5795 * The @a dirents hash maps entry names (<tt>const char *</tt>) to
5796 * #svn_dirent_t *'s.
5797 *
5798 * If @a locks is not @c NULL, set @a *locks to a hash table mapping
5799 * entry names (<tt>const char *</tt>) to #svn_lock_t *'s.
5800 *
5801 * @since New in 1.3.
5802 *
5803 * @deprecated Provided for backward compatibility with the 1.3 API.
5804 * Use svn_client_list2() instead.
5805 */
5806SVN_DEPRECATED
5807svn_error_t *
5808svn_client_ls3(apr_hash_t **dirents,
5809               apr_hash_t **locks,
5810               const char *path_or_url,
5811               const svn_opt_revision_t *peg_revision,
5812               const svn_opt_revision_t *revision,
5813               svn_boolean_t recurse,
5814               svn_client_ctx_t *ctx,
5815               apr_pool_t *pool);
5816
5817/**
5818 * Same as svn_client_ls3(), but without the ability to get locks.
5819 *
5820 * @since New in 1.2.
5821 *
5822 * @deprecated Provided for backward compatibility with the 1.2 API.
5823 * Use svn_client_list2() instead.
5824 */
5825SVN_DEPRECATED
5826svn_error_t *
5827svn_client_ls2(apr_hash_t **dirents,
5828               const char *path_or_url,
5829               const svn_opt_revision_t *peg_revision,
5830               const svn_opt_revision_t *revision,
5831               svn_boolean_t recurse,
5832               svn_client_ctx_t *ctx,
5833               apr_pool_t *pool);
5834
5835/**
5836 * Similar to svn_client_ls2() except that @a peg_revision is always
5837 * the same as @a revision.
5838 *
5839 * @deprecated Provided for backward compatibility with the 1.1 API.
5840 * Use svn_client_list2() instead.
5841 */
5842SVN_DEPRECATED
5843svn_error_t *
5844svn_client_ls(apr_hash_t **dirents,
5845              const char *path_or_url,
5846              svn_opt_revision_t *revision,
5847              svn_boolean_t recurse,
5848              svn_client_ctx_t *ctx,
5849              apr_pool_t *pool);
5850
5851
5852/** @} */
5853
5854/**
5855 * @defgroup Cat View the contents of a file in the repository.
5856 *
5857 * @{
5858 */
5859
5860/**
5861 * Output the content of a file.
5862 *
5863 * @param[out] props           Optional output argument to obtain properties.
5864 * @param[in] out              The stream to which the content will be written.
5865 * @param[in] path_or_url      The path or URL of the file.
5866 * @param[in] peg_revision     The peg revision.
5867 * @param[in] revision         The operative revision.
5868 * @param[in] expand_keywords  When true, keywords (when set) are expanded.
5869 * @param[in] ctx   The standard client context, used for possible
5870 *                  authentication.
5871 *
5872 * @return A pointer to an #svn_error_t of the type (this list is not
5873 *         exhaustive): <br>
5874 *         An unspecified error if @a revision is of kind
5875 *         #svn_opt_revision_previous (or some other kind that requires
5876 *         a local path), because the desired revision cannot be
5877 *         determined. <br>
5878 *         If no error occurred, return #SVN_NO_ERROR.
5879 *
5880 * If @a *props is not NULL it is set to a hash of all the file's
5881 * non-inherited properties. If it is NULL, the properties are only
5882 * used for determining how and if the file should be translated.
5883 *
5884 * @see #svn_client_ctx_t <br> @ref clnt_revisions for
5885 *      a discussion of operative and peg revisions.
5886 *
5887 * @since New in 1.9.
5888 */
5889svn_error_t *
5890svn_client_cat3(apr_hash_t **props,
5891                svn_stream_t *out,
5892                const char *path_or_url,
5893                const svn_opt_revision_t *peg_revision,
5894                const svn_opt_revision_t *revision,
5895                svn_boolean_t expand_keywords,
5896                svn_client_ctx_t *ctx,
5897                apr_pool_t *result_pool,
5898                apr_pool_t *scratch_pool);
5899
5900/**
5901 * Similar to svn_client_cat3() except without the option of directly
5902 * reading the properties, and with @a expand_keywords always TRUE.
5903 *
5904 * @since New in 1.2.
5905 * @deprecated Provided for backward compatibility with the 1.8 API.
5906 */
5907SVN_DEPRECATED
5908svn_error_t *
5909svn_client_cat2(svn_stream_t *out,
5910                const char *path_or_url,
5911                const svn_opt_revision_t *peg_revision,
5912                const svn_opt_revision_t *revision,
5913                svn_client_ctx_t *ctx,
5914                apr_pool_t *pool);
5915
5916
5917/**
5918 * Similar to svn_client_cat2() except that the peg revision is always
5919 * the same as @a revision.
5920 *
5921 * @deprecated Provided for backward compatibility with the 1.1 API.
5922 */
5923SVN_DEPRECATED
5924svn_error_t *
5925svn_client_cat(svn_stream_t *out,
5926               const char *path_or_url,
5927               const svn_opt_revision_t *revision,
5928               svn_client_ctx_t *ctx,
5929               apr_pool_t *pool);
5930
5931/** @} end group: cat */
5932
5933
5934
5935/** Changelist commands
5936 *
5937 * @defgroup svn_client_changelist_funcs Client Changelist Functions
5938 * @{
5939 */
5940
5941/** Implementation note:
5942 *
5943 *  For now, changelists are implemented by scattering the
5944 *  associations across multiple .svn/entries files in a working copy.
5945 *  However, this client API was written so that we have the option of
5946 *  changing the underlying implementation -- we may someday want to
5947 *  store changelist definitions in a centralized database.
5948 */
5949
5950/**
5951 * Add each path in @a paths (recursing to @a depth as necessary) to
5952 * @a changelist.  If a path is already a member of another
5953 * changelist, then remove it from the other changelist and add it to
5954 * @a changelist.  (For now, a path cannot belong to two changelists
5955 * at once.)
5956 *
5957 * @a paths is an array of (const char *) local WC paths.
5958 *
5959 * @a changelists is an array of <tt>const char *</tt> changelist
5960 * names, used as a restrictive filter on items whose changelist
5961 * assignments are adjusted; that is, don't tweak the changeset of any
5962 * item unless it's currently a member of one of those changelists.
5963 * If @a changelists is empty (or altogether @c NULL), no changelist
5964 * filtering occurs.
5965 *
5966 * @note This metadata is purely a client-side "bookkeeping"
5967 * convenience, and is entirely managed by the working copy.
5968 *
5969 * @since New in 1.5.
5970 */
5971svn_error_t *
5972svn_client_add_to_changelist(const apr_array_header_t *paths,
5973                             const char *changelist,
5974                             svn_depth_t depth,
5975                             const apr_array_header_t *changelists,
5976                             svn_client_ctx_t *ctx,
5977                             apr_pool_t *pool);
5978
5979/**
5980 * Remove each path in @a paths (recursing to @a depth as necessary)
5981 * from changelists to which they are currently assigned.
5982 *
5983 * @a paths is an array of (const char *) local WC paths.
5984 *
5985 * @a changelists is an array of <tt>const char *</tt> changelist
5986 * names, used as a restrictive filter on items whose changelist
5987 * assignments are removed; that is, don't remove from a changeset any
5988 * item unless it's currently a member of one of those changelists.
5989 * If @a changelists is empty (or altogether @c NULL), all changelist
5990 * assignments in and under each path in @a paths (to @a depth) will
5991 * be removed.
5992 *
5993 * @note This metadata is purely a client-side "bookkeeping"
5994 * convenience, and is entirely managed by the working copy.
5995 *
5996 * @since New in 1.5.
5997 */
5998svn_error_t *
5999svn_client_remove_from_changelists(const apr_array_header_t *paths,
6000                                   svn_depth_t depth,
6001                                   const apr_array_header_t *changelists,
6002                                   svn_client_ctx_t *ctx,
6003                                   apr_pool_t *pool);
6004
6005
6006/**
6007 * Beginning at @a path, crawl to @a depth to discover every path in
6008 * or under @a path which belongs to one of the changelists in @a
6009 * changelists (an array of <tt>const char *</tt> changelist names).
6010 * If @a changelists is @c NULL, discover paths with any changelist.
6011 * Call @a callback_func (with @a callback_baton) each time a
6012 * changelist-having path is discovered.
6013 *
6014 * @a path is a local WC path.
6015 *
6016 * If @a ctx->cancel_func is not @c NULL, invoke it passing @a
6017 * ctx->cancel_baton during the recursive walk.
6018 *
6019 * @since New in 1.5.
6020 */
6021svn_error_t *
6022svn_client_get_changelists(const char *path,
6023                           const apr_array_header_t *changelists,
6024                           svn_depth_t depth,
6025                           svn_changelist_receiver_t callback_func,
6026                           void *callback_baton,
6027                           svn_client_ctx_t *ctx,
6028                           apr_pool_t *pool);
6029
6030/** @} */
6031
6032
6033
6034/** Locking commands
6035 *
6036 * @defgroup svn_client_locking_funcs Client Locking Functions
6037 * @{
6038 */
6039
6040/**
6041 * Lock @a targets in the repository.  @a targets is an array of
6042 * <tt>const char *</tt> paths - either all working copy paths or all URLs.
6043 * All targets must be in the same repository.
6044 *
6045 * If a target is already locked in the repository, no lock will be
6046 * acquired unless @a steal_lock is TRUE, in which case the locks are
6047 * stolen.  @a comment, if non-NULL, is an xml-escapable description
6048 * stored with each lock in the repository.  Each acquired lock will
6049 * be stored in the working copy if the targets are WC paths.
6050 *
6051 * For each target @a ctx->notify_func2/notify_baton2 will be used to indicate
6052 * whether it was locked.  An action of #svn_wc_notify_locked
6053 * means that the path was locked.  If the path was not locked because
6054 * it was out of date or there was already a lock in the repository,
6055 * the notification function will be called with
6056 * #svn_wc_notify_failed_lock, and the error passed in the notification
6057 * structure.
6058 *
6059 * Use @a pool for temporary allocations.
6060 *
6061 * @since New in 1.2.
6062 */
6063svn_error_t *
6064svn_client_lock(const apr_array_header_t *targets,
6065                const char *comment,
6066                svn_boolean_t steal_lock,
6067                svn_client_ctx_t *ctx,
6068                apr_pool_t *pool);
6069
6070/**
6071 * Unlock @a targets in the repository.  @a targets is an array of
6072 * <tt>const char *</tt> paths - either all working copy paths or all URLs.
6073 * All targets must be in the same repository.
6074 *
6075 * If the targets are WC paths, and @a break_lock is FALSE, the working
6076 * copy must contain a lock for each target.
6077 * If this is not the case, or the working copy lock doesn't match the
6078 * lock token in the repository, an error will be signaled.
6079 *
6080 * If the targets are URLs, the locks may be broken even if @a break_lock
6081 * is FALSE, but only if the lock owner is the same as the
6082 * authenticated user.
6083 *
6084 * If @a break_lock is TRUE, the locks will be broken in the
6085 * repository.  In both cases, the locks, if any, will be removed from
6086 * the working copy if the targets are WC paths.
6087 *
6088 * The notification functions in @a ctx will be called for each
6089 * target.  If the target was successfully unlocked,
6090 * #svn_wc_notify_unlocked will be used.  Else, if the error is
6091 * directly related to unlocking the path (see
6092 * #SVN_ERR_IS_UNLOCK_ERROR), #svn_wc_notify_failed_unlock will be
6093 * used and the error will be passed in the notification structure.
6094
6095 * Use @a pool for temporary allocations.
6096 *
6097 * @since New in 1.2.
6098 */
6099svn_error_t *
6100svn_client_unlock(const apr_array_header_t *targets,
6101                  svn_boolean_t break_lock,
6102                  svn_client_ctx_t *ctx,
6103                  apr_pool_t *pool);
6104
6105/** @} */
6106
6107/**
6108 * @defgroup Info Show repository information about a working copy.
6109 *
6110 * @{
6111 */
6112
6113/** The size of the file is unknown.
6114 * Used as value in fields of type @c apr_size_t in #svn_info_t.
6115 *
6116 * @since New in 1.5
6117 * @deprecated Provided for backward compatibility with the 1.6 API.
6118 */
6119#define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1)
6120
6121/**
6122 * A structure which describes various system-generated metadata about
6123 * a working-copy path or URL.
6124 *
6125 * @note Fields may be added to the end of this structure in future
6126 * versions.  Therefore, users shouldn't allocate structures of this
6127 * type, to preserve binary compatibility.
6128 *
6129 * @since New in 1.2.
6130 * @deprecated Provided for backward compatibility with the 1.6 API.  The new
6131 * API is #svn_client_info2_t.
6132 */
6133typedef struct svn_info_t
6134{
6135  /** Where the item lives in the repository. */
6136  const char *URL;
6137
6138  /** The revision of the object.  If path_or_url is a working-copy
6139   * path, then this is its current working revnum.  If path_or_url
6140   * is a URL, then this is the repos revision that path_or_url lives in. */
6141  svn_revnum_t rev;
6142
6143  /** The node's kind. */
6144  svn_node_kind_t kind;
6145
6146  /** The root URL of the repository. */
6147  const char *repos_root_URL;
6148
6149  /** The repository's UUID. */
6150  const char *repos_UUID;
6151
6152  /** The last revision in which this object changed. */
6153  svn_revnum_t last_changed_rev;
6154
6155  /** The date of the last_changed_rev. */
6156  apr_time_t last_changed_date;
6157
6158  /** The author of the last_changed_rev. */
6159  const char *last_changed_author;
6160
6161  /** An exclusive lock, if present.  Could be either local or remote. */
6162  svn_lock_t *lock;
6163
6164  /** Whether or not to ignore the next 10 wc-specific fields. */
6165  svn_boolean_t has_wc_info;
6166
6167  /**
6168   * @name Working-copy path fields
6169   * These things only apply to a working-copy path.
6170   * See svn_wc_entry_t for explanations.
6171   * @{
6172   */
6173  svn_wc_schedule_t schedule;
6174  const char *copyfrom_url;
6175  svn_revnum_t copyfrom_rev;
6176  apr_time_t text_time;
6177  apr_time_t prop_time;  /* will always be 0 for svn 1.4 and later */
6178  const char *checksum;
6179  const char *conflict_old;
6180  const char *conflict_new;
6181  const char *conflict_wrk;
6182  const char *prejfile;
6183  /** @since New in 1.5. */
6184  const char *changelist;
6185  /** @since New in 1.5. */
6186  svn_depth_t depth;
6187
6188  /**
6189   * Similar to working_size64, but will be #SVN_INFO_SIZE_UNKNOWN when
6190   * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte).
6191   *
6192   * @deprecated Provided for backward compatibility with the 1.5 API.
6193   */
6194  apr_size_t working_size;
6195
6196  /** @} */
6197
6198  /**
6199   * Similar to size64, but size will be #SVN_INFO_SIZE_UNKNOWN when
6200   * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte).
6201   *
6202   * @deprecated Provided for backward compatibility with the 1.5 API.
6203   */
6204  apr_size_t size;
6205
6206  /**
6207   * The size of the file in the repository (untranslated,
6208   * e.g. without adjustment of line endings and keyword
6209   * expansion). Only applicable for file -- not directory -- URLs.
6210   * For working copy paths, size64 will be #SVN_INVALID_FILESIZE.
6211   * @since New in 1.6.
6212   */
6213  svn_filesize_t size64;
6214
6215  /**
6216   * The size of the file after being translated into its local
6217   * representation, or #SVN_INVALID_FILESIZE if unknown.
6218   * Not applicable for directories.
6219   * @since New in 1.6.
6220   * @name Working-copy path fields
6221   * @{
6222   */
6223  svn_filesize_t working_size64;
6224
6225  /**
6226   * Info on any tree conflict of which this node is a victim. Otherwise NULL.
6227   * @since New in 1.6.
6228   */
6229  svn_wc_conflict_description_t *tree_conflict;
6230
6231  /** @} */
6232
6233} svn_info_t;
6234
6235
6236/**
6237 * The callback invoked by svn_client_info2().  Each invocation
6238 * describes @a path with the information present in @a info.  Note
6239 * that any fields within @a info may be NULL if information is
6240 * unavailable.  Use @a pool for all temporary allocation.
6241 *
6242 * @since New in 1.2.
6243 * @deprecated Provided for backward compatibility with the 1.6 API.  The new
6244 * API is #svn_client_info_receiver2_t.
6245 */
6246typedef svn_error_t *(*svn_info_receiver_t)(
6247  void *baton,
6248  const char *path,
6249  const svn_info_t *info,
6250  apr_pool_t *pool);
6251
6252/**
6253 * Return a duplicate of @a info, allocated in @a pool. No part of the new
6254 * structure will be shared with @a info.
6255 *
6256 * @since New in 1.3.
6257 * @deprecated Provided for backward compatibility with the 1.6 API.  The new
6258 * API is #svn_client_info2_dup().
6259 */
6260SVN_DEPRECATED
6261svn_info_t *
6262svn_info_dup(const svn_info_t *info,
6263             apr_pool_t *pool);
6264
6265/**
6266 * A structure which describes various system-generated metadata about
6267 * a working-copy path or URL.
6268 *
6269 * @note Fields may be added to the end of this structure in future
6270 * versions.  Therefore, users shouldn't allocate structures of this
6271 * type, to preserve binary compatibility.
6272 *
6273 * @since New in 1.7.
6274 */
6275typedef struct svn_client_info2_t
6276{
6277  /** Where the item lives in the repository. */
6278  const char *URL;
6279
6280  /** The revision of the object.  If the target is a working-copy
6281   * path, then this is its current working revnum.  If the target
6282   * is a URL, then this is the repos revision that it lives in. */
6283  svn_revnum_t rev;
6284
6285  /** The root URL of the repository. */
6286  const char *repos_root_URL;
6287
6288  /** The repository's UUID. */
6289  const char *repos_UUID;
6290
6291  /** The node's kind. */
6292  svn_node_kind_t kind;
6293
6294  /** The size of the file in the repository (untranslated,
6295   * e.g. without adjustment of line endings and keyword
6296   * expansion). Only applicable for file -- not directory -- URLs.
6297   * For working copy paths, @a size will be #SVN_INVALID_FILESIZE. */
6298  svn_filesize_t size;
6299
6300  /** The last revision in which this object changed. */
6301  svn_revnum_t last_changed_rev;
6302
6303  /** The date of the last_changed_rev. */
6304  apr_time_t last_changed_date;
6305
6306  /** The author of the last_changed_rev. */
6307  const char *last_changed_author;
6308
6309  /** An exclusive lock, if present.  Could be either local or remote. */
6310  const svn_lock_t *lock;
6311
6312  /** Possible information about the working copy, NULL if not valid. */
6313  const svn_wc_info_t *wc_info;
6314
6315} svn_client_info2_t;
6316
6317/**
6318 * Return a duplicate of @a info, allocated in @a pool. No part of the new
6319 * structure will be shared with @a info.
6320 *
6321 * @since New in 1.7.
6322 */
6323svn_client_info2_t *
6324svn_client_info2_dup(const svn_client_info2_t *info,
6325                     apr_pool_t *pool);
6326
6327/**
6328 * The callback invoked by info retrievers.  Each invocation
6329 * describes @a abspath_or_url with the information present in @a info.
6330 * Use @a scratch_pool for all temporary allocation.
6331 *
6332 * @since New in 1.7.
6333 */
6334typedef svn_error_t *(*svn_client_info_receiver2_t)(
6335                         void *baton,
6336                         const char *abspath_or_url,
6337                         const svn_client_info2_t *info,
6338                         apr_pool_t *scratch_pool);
6339
6340/**
6341 * Invoke @a receiver with @a receiver_baton to return information
6342 * about @a abspath_or_url in @a revision.  The information returned is
6343 * system-generated metadata, not the sort of "property" metadata
6344 * created by users.  See #svn_client_info2_t.
6345 *
6346 * If both revision arguments are either #svn_opt_revision_unspecified
6347 * or @c NULL, then information will be pulled solely from the working copy;
6348 * no network connections will be made.
6349 *
6350 * Otherwise, information will be pulled from a repository.  The
6351 * actual node revision selected is determined by the @a abspath_or_url
6352 * as it exists in @a peg_revision.  If @a peg_revision->kind is
6353 * #svn_opt_revision_unspecified, then it defaults to
6354 * #svn_opt_revision_head for URLs or #svn_opt_revision_working for
6355 * WC targets.
6356 *
6357 * If @a abspath_or_url is not a local path, then if @a revision is of
6358 * kind #svn_opt_revision_previous (or some other kind that requires
6359 * a local path), an error will be returned, because the desired
6360 * revision cannot be determined.
6361 *
6362 * Use the authentication baton cached in @a ctx to authenticate
6363 * against the repository.
6364 *
6365 * If @a abspath_or_url is a file, just invoke @a receiver on it.  If it
6366 * is a directory, then descend according to @a depth.  If @a depth is
6367 * #svn_depth_empty, invoke @a receiver on @a abspath_or_url and
6368 * nothing else; if #svn_depth_files, on @a abspath_or_url and its
6369 * immediate file children; if #svn_depth_immediates, the preceding
6370 * plus on each immediate subdirectory; if #svn_depth_infinity, then
6371 * recurse fully, invoking @a receiver on @a abspath_or_url and
6372 * everything beneath it.
6373 *
6374 * If @a fetch_excluded is TRUE, also also send excluded nodes in the working
6375 * copy to @a receiver, otherwise these are skipped. If @a fetch_actual_only
6376 * is TRUE also send nodes that don't exist as versioned but are still
6377 * tree conflicted.
6378 *
6379 * If @a include_externals is @c TRUE, recurse into externals and report about
6380 * them as well.
6381 *
6382 * @a changelists is an array of <tt>const char *</tt> changelist
6383 * names, used as a restrictive filter on items whose info is
6384 * reported; that is, don't report info about any item unless
6385 * it's a member of one of those changelists.  If @a changelists is
6386 * empty (or altogether @c NULL), no changelist filtering occurs.
6387 *
6388 * @since New in 1.9.
6389 */
6390svn_error_t *
6391svn_client_info4(const char *abspath_or_url,
6392                 const svn_opt_revision_t *peg_revision,
6393                 const svn_opt_revision_t *revision,
6394                 svn_depth_t depth,
6395                 svn_boolean_t fetch_excluded,
6396                 svn_boolean_t fetch_actual_only,
6397                 svn_boolean_t include_externals,
6398                 const apr_array_header_t *changelists,
6399                 svn_client_info_receiver2_t receiver,
6400                 void *receiver_baton,
6401                 svn_client_ctx_t *ctx,
6402                 apr_pool_t *scratch_pool);
6403
6404
6405/** Similar to svn_client_info4, but doesn't support walking externals.
6406 *
6407 * @since New in 1.7.
6408 * @deprecated Provided for backward compatibility with the 1.8 API.
6409 */
6410SVN_DEPRECATED
6411svn_error_t *
6412svn_client_info3(const char *abspath_or_url,
6413                 const svn_opt_revision_t *peg_revision,
6414                 const svn_opt_revision_t *revision,
6415                 svn_depth_t depth,
6416                 svn_boolean_t fetch_excluded,
6417                 svn_boolean_t fetch_actual_only,
6418                 const apr_array_header_t *changelists,
6419                 svn_client_info_receiver2_t receiver,
6420                 void *receiver_baton,
6421                 svn_client_ctx_t *ctx,
6422                 apr_pool_t *scratch_pool);
6423
6424/** Similar to svn_client_info3, but uses an svn_info_receiver_t instead of
6425 * a #svn_client_info_receiver2_t, and @a path_or_url may be a relative path.
6426 *
6427 * @since New in 1.5.
6428 * @deprecated Provided for backward compatibility with the 1.6 API.
6429 */
6430SVN_DEPRECATED
6431svn_error_t *
6432svn_client_info2(const char *path_or_url,
6433                 const svn_opt_revision_t *peg_revision,
6434                 const svn_opt_revision_t *revision,
6435                 svn_info_receiver_t receiver,
6436                 void *receiver_baton,
6437                 svn_depth_t depth,
6438                 const apr_array_header_t *changelists,
6439                 svn_client_ctx_t *ctx,
6440                 apr_pool_t *pool);
6441
6442/**
6443 * Similar to svn_client_info2() but with @a changelists passed as @c
6444 * NULL, and @a depth set according to @a recurse: if @a recurse is
6445 * TRUE, @a depth is #svn_depth_infinity, else #svn_depth_empty.
6446 *
6447 * @deprecated Provided for backward compatibility with the 1.4 API.
6448 */
6449SVN_DEPRECATED
6450svn_error_t *
6451svn_client_info(const char *path_or_url,
6452                const svn_opt_revision_t *peg_revision,
6453                const svn_opt_revision_t *revision,
6454                svn_info_receiver_t receiver,
6455                void *receiver_baton,
6456                svn_boolean_t recurse,
6457                svn_client_ctx_t *ctx,
6458                apr_pool_t *pool);
6459
6460/**
6461 * Set @a *wcroot_abspath to the local abspath of the root of the
6462 * working copy in which @a local_abspath resides.
6463 *
6464 * @since New in 1.7.
6465 */
6466svn_error_t *
6467svn_client_get_wc_root(const char **wcroot_abspath,
6468                       const char *local_abspath,
6469                       svn_client_ctx_t *ctx,
6470                       apr_pool_t *result_pool,
6471                       apr_pool_t *scratch_pool);
6472
6473/**
6474 * Set @a *min_revision and @a *max_revision to the lowest and highest
6475 * revision numbers found within @a local_abspath.  If @a committed is
6476 * TRUE, set @a *min_revision and @a *max_revision to the lowest and
6477 * highest comitted (i.e. "last changed") revision numbers,
6478 * respectively.  NULL may be passed for either of @a min_revision and
6479 * @a max_revision to indicate the caller's lack of interest in the
6480 * value.  Use @a scratch_pool for temporary allocations.
6481 *
6482 * @since New in 1.7.
6483 */
6484svn_error_t *
6485svn_client_min_max_revisions(svn_revnum_t *min_revision,
6486                             svn_revnum_t *max_revision,
6487                             const char *local_abspath,
6488                             svn_boolean_t committed,
6489                             svn_client_ctx_t *ctx,
6490                             apr_pool_t *scratch_pool);
6491
6492/** @} */
6493
6494
6495/**
6496 * @defgroup Patch Apply a patch to the working copy
6497 *
6498 * @{
6499 */
6500
6501/**
6502 * The callback invoked by svn_client_patch() before attempting to patch
6503 * the target file at @a canon_path_from_patchfile (the path as parsed from
6504 * the patch file, but in canonicalized form). The callback can set
6505 * @a *filtered to @c TRUE to prevent the file from being patched, or else
6506 * must set it to @c FALSE.
6507 *
6508 * The callback is also provided with @a patch_abspath, the path of a
6509 * temporary file containing the patched result, and with @a reject_abspath,
6510 * the path to a temporary file containing the diff text of any hunks
6511 * which were rejected during patching.
6512 *
6513 * Because the callback is invoked before the patching attempt is made,
6514 * there is no guarantee that the target file will actually be patched
6515 * successfully. Client implementations must pay attention to notification
6516 * feedback provided by svn_client_patch() to find out which paths were
6517 * patched successfully.
6518 *
6519 * Note also that the files at @a patch_abspath and @a reject_abspath are
6520 * guaranteed to remain on disk after patching only if the
6521 * @a remove_tempfiles parameter for svn_client_patch() is @c FALSE.
6522 *
6523 * The const char * parameters may be allocated in @a scratch_pool which
6524 * will be cleared after each invocation.
6525 *
6526 * @since New in 1.7.
6527 */
6528typedef svn_error_t *(*svn_client_patch_func_t)(
6529  void *baton,
6530  svn_boolean_t *filtered,
6531  const char *canon_path_from_patchfile,
6532  const char *patch_abspath,
6533  const char *reject_abspath,
6534  apr_pool_t *scratch_pool);
6535
6536/**
6537 * Apply a unidiff patch that's located at absolute path
6538 * @a patch_abspath to the working copy directory at @a wc_dir_abspath.
6539 *
6540 * This function makes a best-effort attempt at applying the patch.
6541 * It might skip patch targets which cannot be patched (e.g. targets
6542 * that are outside of the working copy). It will also reject hunks
6543 * which cannot be applied to a target in case the hunk's context
6544 * does not match anywhere in the patch target.
6545 *
6546 * If @a dry_run is TRUE, the patching process is carried out, and full
6547 * notification feedback is provided, but the working copy is not modified.
6548 *
6549 * @a strip_count specifies how many leading path components should be
6550 * stripped from paths obtained from the patch. It is an error if a
6551 * negative strip count is passed.
6552 *
6553 * If @a reverse is @c TRUE, apply patches in reverse, deleting lines
6554 * the patch would add and adding lines the patch would delete.
6555 *
6556 * If @a ignore_whitespace is TRUE, allow patches to be applied if they
6557 * only differ from the target by whitespace.
6558 *
6559 * If @a remove_tempfiles is TRUE, lifetimes of temporary files created
6560 * during patching will be managed internally. Otherwise, the caller should
6561 * take ownership of these files, the names of which can be obtained by
6562 * passing a @a patch_func callback.
6563 *
6564 * If @a patch_func is non-NULL, invoke @a patch_func with @a patch_baton
6565 * for each patch target processed.
6566 *
6567 * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
6568 * @a ctx->notify_baton2 as patching progresses.
6569 *
6570 * If @a ctx->cancel_func is non-NULL, invoke it passing @a
6571 * ctx->cancel_baton at various places during the operation.
6572 *
6573 * Use @a scratch_pool for temporary allocations.
6574 *
6575 * @since New in 1.7.
6576 */
6577svn_error_t *
6578svn_client_patch(const char *patch_abspath,
6579                 const char *wc_dir_abspath,
6580                 svn_boolean_t dry_run,
6581                 int strip_count,
6582                 svn_boolean_t reverse,
6583                 svn_boolean_t ignore_whitespace,
6584                 svn_boolean_t remove_tempfiles,
6585                 svn_client_patch_func_t patch_func,
6586                 void *patch_baton,
6587                 svn_client_ctx_t *ctx,
6588                 apr_pool_t *scratch_pool);
6589
6590/** @} */
6591
6592/** @} end group: Client working copy management */
6593
6594/**
6595 *
6596 * @defgroup clnt_sessions Client session related functions
6597 *
6598 * @{
6599 *
6600 */
6601
6602
6603/* Converting paths to URLs. */
6604
6605/** Set @a *url to the URL for @a path_or_url allocated in result_pool.
6606 *
6607 * If @a path_or_url is already a URL, set @a *url to @a path_or_url.
6608 *
6609 * If @a path_or_url is a versioned item, set @a *url to @a
6610 * path_or_url's entry URL.  If @a path_or_url is unversioned (has
6611 * no entry), set @a *url to NULL.
6612 *
6613 * Use @a ctx->wc_ctx to retrieve the information. Use
6614 ** @a scratch_pool for temporary allocations.
6615 *
6616 * @since New in 1.7.
6617 */
6618svn_error_t *
6619svn_client_url_from_path2(const char **url,
6620                          const char *path_or_url,
6621                          svn_client_ctx_t *ctx,
6622                          apr_pool_t *result_pool,
6623                          apr_pool_t *scratch_pool);
6624
6625/** Similar to svn_client_url_from_path2(), but without a context argument.
6626 *
6627 * @since New in 1.5.
6628 * @deprecated Provided for backward compatibility with the 1.6 API.
6629 */
6630SVN_DEPRECATED
6631svn_error_t *
6632svn_client_url_from_path(const char **url,
6633                         const char *path_or_url,
6634                         apr_pool_t *pool);
6635
6636
6637
6638/* Fetching a repository's root URL and UUID. */
6639
6640/** Set @a *repos_root_url and @a *repos_uuid, to the root URL and UUID of
6641 * the repository in which @a abspath_or_url is versioned. Use the
6642 * authentication baton and working copy context cached in @a ctx as
6643 * necessary. @a repos_root_url and/or @a repos_uuid may be NULL if not
6644 * wanted.
6645 *
6646 * This function will open a temporary RA session to the repository if
6647 * necessary to get the information.
6648 *
6649 * Allocate @a *repos_root_url and @a *repos_uuid in @a result_pool.
6650 * Use @a scratch_pool for temporary allocations.
6651 *
6652 * @since New in 1.8.
6653 */
6654svn_error_t *
6655svn_client_get_repos_root(const char **repos_root_url,
6656                          const char **repos_uuid,
6657                          const char *abspath_or_url,
6658                          svn_client_ctx_t *ctx,
6659                          apr_pool_t *result_pool,
6660                          apr_pool_t *scratch_pool);
6661
6662/** Set @a *url to the repository root URL of the repository in which
6663 * @a path_or_url is versioned (or scheduled to be versioned),
6664 * allocated in @a pool.  @a ctx is required for possible repository
6665 * authentication.
6666 *
6667 * @since New in 1.5.
6668 * @deprecated Provided for backward compatibility with the 1.7 API. Use
6669 * svn_client_get_repos_root() instead, with an absolute path.
6670 */
6671SVN_DEPRECATED
6672svn_error_t *
6673svn_client_root_url_from_path(const char **url,
6674                              const char *path_or_url,
6675                              svn_client_ctx_t *ctx,
6676                              apr_pool_t *pool);
6677
6678/** Get repository @a uuid for @a url.
6679 *
6680 * Use a @a pool to open a temporary RA session to @a url, discover the
6681 * repository uuid, and free the session.  Return the uuid in @a uuid,
6682 * allocated in @a pool.  @a ctx is required for possible repository
6683 * authentication.
6684 *
6685 * @deprecated Provided for backward compatibility with the 1.7 API. Use
6686 * svn_client_get_repos_root() instead.
6687 */
6688SVN_DEPRECATED
6689svn_error_t *
6690svn_client_uuid_from_url(const char **uuid,
6691                         const char *url,
6692                         svn_client_ctx_t *ctx,
6693                         apr_pool_t *pool);
6694
6695
6696/** Return the repository @a uuid for working-copy @a local_abspath,
6697 * allocated in @a result_pool.  Use @a ctx->wc_ctx to retrieve the
6698 * information.
6699 *
6700 * Use @a scratch_pool for temporary allocations.
6701 *
6702 * @since New in 1.7.
6703 * @deprecated Provided for backward compatibility with the 1.7 API. Use
6704 * svn_client_get_repos_root() instead.
6705 */
6706SVN_DEPRECATED
6707svn_error_t *
6708svn_client_uuid_from_path2(const char **uuid,
6709                           const char *local_abspath,
6710                           svn_client_ctx_t *ctx,
6711                           apr_pool_t *result_pool,
6712                           apr_pool_t *scratch_pool);
6713
6714/** Similar to svn_client_uuid_from_path2(), but with a relative path and
6715 * an access baton.
6716 *
6717 * @deprecated Provided for backward compatibility with the 1.6 API.
6718 */
6719SVN_DEPRECATED
6720svn_error_t *
6721svn_client_uuid_from_path(const char **uuid,
6722                          const char *path,
6723                          svn_wc_adm_access_t *adm_access,
6724                          svn_client_ctx_t *ctx,
6725                          apr_pool_t *pool);
6726
6727
6728/* Opening RA sessions. */
6729
6730/** Open an RA session rooted at @a url, and return it in @a *session.
6731 *
6732 * Use the authentication baton stored in @a ctx for authentication.
6733 * @a *session is allocated in @a result_pool.
6734 *
6735 * If @a wri_abspath is not NULL, use the working copy identified by @a
6736 * wri_abspath to potentially avoid transferring unneeded data.
6737 *
6738 * @note This function is similar to svn_ra_open4(), but the caller avoids
6739 * having to providing its own callback functions.
6740 * @since New in 1.8.
6741 */
6742svn_error_t *
6743svn_client_open_ra_session2(svn_ra_session_t **session,
6744                           const char *url,
6745                           const char *wri_abspath,
6746                           svn_client_ctx_t *ctx,
6747                           apr_pool_t *result_pool,
6748                           apr_pool_t *scratch_pool);
6749
6750/** Similar to svn_client_open_ra_session2(), but with @ wri_abspath
6751 * always passed as NULL, and with the same pool used as both @a
6752 * result_pool and @a scratch_pool.
6753 *
6754 * @since New in 1.3.
6755 * @deprecated Provided for backward compatibility with the 1.7 API.
6756 */
6757SVN_DEPRECATED
6758svn_error_t *
6759svn_client_open_ra_session(svn_ra_session_t **session,
6760                           const char *url,
6761                           svn_client_ctx_t *ctx,
6762                           apr_pool_t *pool);
6763
6764
6765/** @} end group: Client session related functions */
6766
6767/** @} */
6768
6769#ifdef __cplusplus
6770}
6771#endif /* __cplusplus */
6772
6773#endif  /* SVN_CLIENT_H */
6774