Subversion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
svn_client.h
Go to the documentation of this file.
1 /**
2  * @copyright
3  * ====================================================================
4  * Copyright (c) 2000-2008 CollabNet. All rights reserved.
5  *
6  * This software is licensed as described in the file COPYING, which
7  * you should have received as part of this distribution. The terms
8  * are also available at http://subversion.tigris.org/license-1.html.
9  * If newer versions of this license are posted there, you may use a
10  * newer version instead, at your option.
11  *
12  * This software consists of voluntary contributions made by many
13  * individuals. For exact contribution history, see the revision
14  * history and logs, available at http://subversion.tigris.org/.
15  * ====================================================================
16  * @endcopyright
17  *
18  * @file svn_client.h
19  * @brief Subversion's client library
20  *
21  * Requires: The working copy library and repository access library.
22  * Provides: Broad wrappers around working copy library functionality.
23  * Used By: Client programs.
24  */
25 
26 #ifndef SVN_CLIENT_H
27 #define SVN_CLIENT_H
28 
29 #include <apr.h>
30 #include <apr_pools.h>
31 #include <apr_hash.h>
32 #include <apr_tables.h>
33 #include <apr_getopt.h>
34 #include <apr_file_io.h>
35 #include <apr_time.h>
36 
37 #include "svn_types.h"
38 #include "svn_string.h"
39 #include "svn_wc.h"
40 #include "svn_opt.h"
41 #include "svn_version.h"
42 #include "svn_ra.h"
43 #include "svn_diff.h"
44 #include "svn_auth.h"
45 
46 #ifdef __cplusplus
47 extern "C" {
48 #endif /* __cplusplus */
49 
50 
51 /**
52  ### @todo Multiple Targets
53  - Up for debate: an update on multiple targets is *not* atomic.
54  Right now, svn_client_update only takes one path. What's
55  debatable is whether this should ever change. On the one hand,
56  it's kind of losing to have the client application loop over
57  targets and call svn_client_update() on each one; each call to
58  update initializes a whole new repository session (network
59  overhead, etc.) On the other hand, it's a very simple
60  implementation, and allows for the possibility that different
61  targets may come from different repositories. */
62 
63 
64 /**
65  * Get libsvn_client version information.
66  *
67  * @since New in 1.1.
68  */
69 const svn_version_t *
70 svn_client_version(void);
71 
72 /** Client supporting functions
73  *
74  * @defgroup clnt_support Client supporting subsystem
75  *
76  * @{
77  */
78 
79 
80 /*** Authentication stuff ***/
81 
82 /** The new authentication system allows the RA layer to "pull"
83  * information as needed from libsvn_client.
84  *
85  * @deprecated Replaced by the svn_auth_* functions.
86  * @see auth_fns
87  *
88  * @defgroup auth_fns_depr (deprecated) AuthZ client subsystem
89  *
90  * @{
91  */
92 
93 /** Create and return @a *provider, an authentication provider of type
94  * svn_auth_cred_simple_t that gets information by prompting the user
95  * with @a prompt_func and @a prompt_baton. Allocate @a *provider in
96  * @a pool.
97  *
98  * If both @c SVN_AUTH_PARAM_DEFAULT_USERNAME and
99  * @c SVN_AUTH_PARAM_DEFAULT_PASSWORD are defined as runtime
100  * parameters in the @c auth_baton, then @a *provider will return the
101  * default arguments when svn_auth_first_credentials() is called. If
102  * svn_auth_first_credentials() fails, then @a *provider will
103  * re-prompt @a retry_limit times (via svn_auth_next_credentials()).
104  * For infinite retries, set @a retry_limit to value less than 0.
105  *
106  * @deprecated Provided for backward compatibility with the 1.3 API.
107  * Use svn_auth_get_simple_prompt_provider() instead.
108  */
110 void
112  (svn_auth_provider_object_t **provider,
113  svn_auth_simple_prompt_func_t prompt_func,
114  void *prompt_baton,
115  int retry_limit,
116  apr_pool_t *pool);
117 
118 
119 /** Create and return @a *provider, an authentication provider of type @c
120  * svn_auth_cred_username_t that gets information by prompting the
121  * user with @a prompt_func and @a prompt_baton. Allocate @a *provider
122  * in @a pool.
123  *
124  * If @c SVN_AUTH_PARAM_DEFAULT_USERNAME is defined as a runtime
125  * parameter in the @c auth_baton, then @a *provider will return the
126  * default argument when svn_auth_first_credentials() is called. If
127  * svn_auth_first_credentials() fails, then @a *provider will
128  * re-prompt @a retry_limit times (via svn_auth_next_credentials()).
129  * For infinite retries, set @a retry_limit to value less than 0.
130  *
131  * @deprecated Provided for backward compatibility with the 1.3 API.
132  * Use svn_auth_get_username_prompt_provider() instead.
133  */
135 void
137  (svn_auth_provider_object_t **provider,
139  void *prompt_baton,
140  int retry_limit,
141  apr_pool_t *pool);
142 
143 
144 /** Create and return @a *provider, an authentication provider of type @c
145  * svn_auth_cred_simple_t that gets/sets information from the user's
146  * ~/.subversion configuration directory. Allocate @a *provider in
147  * @a pool.
148  *
149  * If a default username or password is available, @a *provider will
150  * honor them as well, and return them when
151  * svn_auth_first_credentials() is called. (see @c
152  * SVN_AUTH_PARAM_DEFAULT_USERNAME and @c
153  * SVN_AUTH_PARAM_DEFAULT_PASSWORD).
154  *
155  * @deprecated Provided for backward compatibility with the 1.3 API.
156  * Use svn_auth_get_simple_provider2() instead.
157  */
159 void
161  apr_pool_t *pool);
162 
163 
164 #if (defined(WIN32) && !defined(__MINGW32__)) || defined(DOXYGEN) || defined(CTYPESGEN) || defined(SWIG)
165 /**
166  * Create and return @a *provider, an authentication provider of type @c
167  * svn_auth_cred_simple_t that gets/sets information from the user's
168  * ~/.subversion configuration directory. Allocate @a *provider in
169  * @a pool.
170  *
171  * This is like svn_client_get_simple_provider(), except that, when
172  * running on Window 2000 or newer (or any other Windows version that
173  * includes the CryptoAPI), the provider encrypts the password before
174  * storing it to disk. On earlier versions of Windows, the provider
175  * does nothing.
176  *
177  * @since New in 1.2.
178  * @note This function is only available on Windows.
179  *
180  * @note An administrative password reset may invalidate the account's
181  * secret key. This function will detect that situation and behave as
182  * if the password were not cached at all.
183  *
184  * @deprecated Provided for backward compatibility with the 1.3 API.
185  * Use svn_auth_get_windows_simple_provider() instead.
186  */
188 void
190  apr_pool_t *pool);
191 #endif /* WIN32 && !__MINGW32__ || DOXYGEN || CTYPESGEN || SWIG */
192 
193 /** Create and return @a *provider, an authentication provider of type @c
194  * svn_auth_cred_username_t that gets/sets information from a user's
195  * ~/.subversion configuration directory. Allocate @a *provider in
196  * @a pool.
197  *
198  * If a default username is available, @a *provider will honor it,
199  * and return it when svn_auth_first_credentials() is called. (see
200  * @c SVN_AUTH_PARAM_DEFAULT_USERNAME).
201  *
202  * @deprecated Provided for backward compatibility with the 1.3 API.
203  * Use svn_auth_get_username_provider() instead.
204  */
206 void
208  apr_pool_t *pool);
209 
210 
211 /** Create and return @a *provider, an authentication provider of type @c
212  * svn_auth_cred_ssl_server_trust_t, allocated in @a pool.
213  *
214  * @a *provider retrieves its credentials from the configuration
215  * mechanism. The returned credential is used to override SSL
216  * security on an error.
217  *
218  * @deprecated Provided for backward compatibility with the 1.3 API.
219  * Use svn_auth_get_ssl_server_trust_file_provider() instead.
220  */
222 void
224  (svn_auth_provider_object_t **provider,
225  apr_pool_t *pool);
226 
227 
228 /** Create and return @a *provider, an authentication provider of type @c
229  * svn_auth_cred_ssl_client_cert_t, allocated in @a pool.
230  *
231  * @a *provider retrieves its credentials from the configuration
232  * mechanism. The returned credential is used to load the appropriate
233  * client certificate for authentication when requested by a server.
234  *
235  * @deprecated Provided for backward compatibility with the 1.3 API.
236  * Use svn_auth_get_ssl_client_cert_file_provider() instead.
237  */
239 void
241  (svn_auth_provider_object_t **provider,
242  apr_pool_t *pool);
243 
244 
245 /** Create and return @a *provider, an authentication provider of type @c
246  * svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool.
247  *
248  * @a *provider retrieves its credentials from the configuration
249  * mechanism. The returned credential is used when a loaded client
250  * certificate is protected by a passphrase.
251  *
252  * @deprecated Provided for backward compatibility with the 1.3 API.
253  * Use svn_auth_get_ssl_client_cert_pw_file_provider2() instead.
254  */
256 void
258  (svn_auth_provider_object_t **provider,
259  apr_pool_t *pool);
260 
261 
262 /** Create and return @a *provider, an authentication provider of type @c
263  * svn_auth_cred_ssl_server_trust_t, allocated in @a pool.
264  *
265  * @a *provider retrieves its credentials by using the @a prompt_func
266  * and @a prompt_baton. The returned credential is used to override
267  * SSL security on an error.
268  *
269  * @deprecated Provided for backward compatibility with the 1.3 API.
270  * Use svn_auth_get_ssl_server_trust_prompt_provider() instead.
271  */
273 void
275  (svn_auth_provider_object_t **provider,
277  void *prompt_baton,
278  apr_pool_t *pool);
279 
280 
281 /** Create and return @a *provider, an authentication provider of type @c
282  * svn_auth_cred_ssl_client_cert_t, allocated in @a pool.
283  *
284  * @a *provider retrieves its credentials by using the @a prompt_func
285  * and @a prompt_baton. The returned credential is used to load the
286  * appropriate client certificate for authentication when requested by
287  * a server. The prompt will be retried @a retry_limit times.
288  * For infinite retries, set @a retry_limit to value less than 0.
289  *
290  * @deprecated Provided for backward compatibility with the 1.3 API.
291  * Use svn_auth_get_ssl_client_cert_prompt_provider() instead.
292  */
294 void
296  (svn_auth_provider_object_t **provider,
298  void *prompt_baton,
299  int retry_limit,
300  apr_pool_t *pool);
301 
302 
303 /** Create and return @a *provider, an authentication provider of type @c
304  * svn_auth_cred_ssl_client_cert_pw_t, allocated in @a pool.
305  *
306  * @a *provider retrieves its credentials by using the @a prompt_func
307  * and @a prompt_baton. The returned credential is used when a loaded
308  * client certificate is protected by a passphrase. The prompt will
309  * be retried @a retry_limit times. For infinite retries, set @a retry_limit
310  * to value less than 0.
311  *
312  * @deprecated Provided for backward compatibility with the 1.3 API.
313  * Use svn_auth_get_ssl_client_cert_pw_prompt_provider() instead.
314  */
316 void
318  (svn_auth_provider_object_t **provider,
320  void *prompt_baton,
321  int retry_limit,
322  apr_pool_t *pool);
323 
324 /** @} */
325 
326 /**
327  * Commit operations
328  *
329  * @defgroup clnt_commit Client commit subsystem
330  *
331  * @{
332  */
333 
334 /** This is a structure which stores a filename and a hash of property
335  * names and values.
336  *
337  * @deprecated Provided for backward compatibility with the 1.4 API.
338  */
340 {
341  /** The name of the node on which these properties are set. */
343 
344  /** A hash of (const char *) property names, and (svn_string_t *) property
345  * values. */
346  apr_hash_t *prop_hash;
347 
349 
350 /**
351  * The callback invoked by svn_client_proplist3(). Each invocation
352  * describes the property specified by @a item. Use @a pool for all
353  * temporary allocation.
354  *
355  * @since New in 1.5.
356  */
357 typedef svn_error_t *(*svn_proplist_receiver_t)
358  (void *baton,
359  const char *path,
360  apr_hash_t *prop_hash,
361  apr_pool_t *pool);
362 
363 /**
364  * Return a duplicate of @a item, allocated in @a pool. No part of the new
365  * structure will be shared with @a item.
366  *
367  * @since New in 1.3.
368  *
369  * @deprecated Provided for backward compatibility with the 1.4 API.
370  */
374  apr_pool_t *pool);
375 
376 /** Information about commits passed back to client from this module.
377  *
378  * @deprecated Provided for backward compatibility with the 1.2 API.
379  */
381 {
382  /** just-committed revision. */
384 
385  /** server-side date of the commit. */
386  const char *date;
387 
388  /** author of the commit. */
389  const char *author;
390 
392 
393 
394 /**
395  * @name Commit state flags
396  * @brief State flags for use with the @c svn_client_commit_item3_t structure
397  * (see the note about the namespace for that structure, which also
398  * applies to these flags).
399  * @{
400  */
401 #define SVN_CLIENT_COMMIT_ITEM_ADD 0x01
402 #define SVN_CLIENT_COMMIT_ITEM_DELETE 0x02
403 #define SVN_CLIENT_COMMIT_ITEM_TEXT_MODS 0x04
404 #define SVN_CLIENT_COMMIT_ITEM_PROP_MODS 0x08
405 #define SVN_CLIENT_COMMIT_ITEM_IS_COPY 0x10
406 /** @since New in 1.2. */
407 #define SVN_CLIENT_COMMIT_ITEM_LOCK_TOKEN 0x20
408 /** @} */
409 
410 /** The commit candidate structure. In order to avoid backwards
411  * compatibility problems clients should use
412  * svn_client_commit_item3_create() to allocate and initialize this
413  * structure instead of doing so themselves.
414  *
415  * @since New in 1.5.
416  */
418 {
419  /** absolute working-copy path of item */
420  const char *path;
421 
422  /** node kind (dir, file) */
424 
425  /** commit URL for this item */
426  const char *url;
427 
428  /** revision of textbase */
430 
431  /** copyfrom-url or NULL if not a copied item */
432  const char *copyfrom_url;
433 
434  /** copyfrom-rev, valid when copyfrom_url != NULL */
436 
437  /** state flags */
438  apr_byte_t state_flags;
439 
440  /** An array of @c svn_prop_t *'s, which are incoming changes from
441  * the repository to WC properties. These changes are applied
442  * post-commit.
443  *
444  * When adding to this array, allocate the @c svn_prop_t and its
445  * contents in @c incoming_prop_changes->pool, so that it has the
446  * same lifetime as this data structure.
447  *
448  * See http://subversion.tigris.org/issues/show_bug.cgi?id=806 for a
449  * description of what would happen if the post-commit process
450  * didn't group these changes together with all other changes to the
451  * item.
452  */
453  apr_array_header_t *incoming_prop_changes;
454 
455  /** An array of @c svn_prop_t *'s, which are outgoing changes to
456  * make to properties in the repository. These extra property
457  * changes are declared pre-commit, and applied to the repository as
458  * part of a commit.
459  *
460  * When adding to this array, allocate the @c svn_prop_t and its
461  * contents in @c outgoing_prop_changes->pool, so that it has the
462  * same lifetime as this data structure.
463  */
464  apr_array_header_t *outgoing_prop_changes;
466 
467 /** The commit candidate structure.
468  *
469  * @deprecated Provided for backward compatibility with the 1.3 API.
470  */
472 {
473  /** absolute working-copy path of item */
474  const char *path;
475 
476  /** node kind (dir, file) */
478 
479  /** commit URL for this item */
480  const char *url;
481 
482  /** revision of textbase */
484 
485  /** copyfrom-url or NULL if not a copied item */
486  const char *copyfrom_url;
487 
488  /** copyfrom-rev, valid when copyfrom_url != NULL */
490 
491  /** state flags */
492  apr_byte_t state_flags;
493 
494  /** Analogous to the @c svn_client_commit_item3_t.incoming_prop_changes
495  * field.
496  */
497  apr_array_header_t *wcprop_changes;
499 
500 /** The commit candidate structure.
501  *
502  * @deprecated Provided for backward compatibility with the 1.2 API.
503  */
505 {
506  /** absolute working-copy path of item */
507  const char *path;
508 
509  /** node kind (dir, file) */
511 
512  /** commit URL for this item */
513  const char *url;
514 
515  /** revision (copyfrom-rev if _IS_COPY) */
517 
518  /** copyfrom-url */
519  const char *copyfrom_url;
520 
521  /** state flags */
522  apr_byte_t state_flags;
523 
524  /** Analogous to the @c svn_client_commit_item3_t.incoming_prop_changes
525  * field.
526  */
527  apr_array_header_t *wcprop_changes;
528 
530 
531 /** Return a new commit item object, allocated in @a pool.
532  *
533  * In order to avoid backwards compatibility problems, this function
534  * is used to initialize and allocate the @c svn_client_commit_item3_t
535  * structure rather than doing so explicitly, as the size of this
536  * structure may change in the future.
537  *
538  * @since New in 1.6.
539  */
541 svn_client_commit_item3_create(apr_pool_t *pool);
542 
543 /** Like svn_client_commit_item_create2() but with a stupid "const"
544  * qualifier on the returned structure, and it returns an error that
545  * will never happen.
546  *
547  * @deprecated Provided for backward compatibility with the 1.5 API.
548  */
549 svn_error_t *
551  apr_pool_t *pool);
552 
553 /**
554  * Return a duplicate of @a item, allocated in @a pool. No part of the new
555  * structure will be shared with @a item.
556  *
557  * @since New in 1.5.
558  */
561  apr_pool_t *pool);
562 
563 /**
564  * Return a duplicate of @a item, allocated in @a pool. No part of the new
565  * structure will be shared with @a item.
566  *
567  * @deprecated Provided for backward compatibility with the 1.3 API.
568  */
572  apr_pool_t *pool);
573 
574 /** Callback type used by commit-y operations to get a commit log message
575  * from the caller.
576  *
577  * Set @a *log_msg to the log message for the commit, allocated in @a
578  * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
579  * to the path of any temporary file which might be holding that log
580  * message, or @c NULL if no such file exists (though, if @a *log_msg is
581  * @c NULL, this value is undefined). The log message MUST be a UTF8
582  * string with LF line separators.
583  *
584  * @a commit_items is a read-only array of @c svn_client_commit_item3_t
585  * structures, which may be fully or only partially filled-in,
586  * depending on the type of commit operation.
587  *
588  * @a baton is provided along with the callback for use by the handler.
589  *
590  * All allocations should be performed in @a pool.
591  *
592  * @since New in 1.5.
593  */
594 typedef svn_error_t *(*svn_client_get_commit_log3_t)
595  (const char **log_msg,
596  const char **tmp_file,
597  const apr_array_header_t *commit_items,
598  void *baton,
599  apr_pool_t *pool);
600 
601 /** Callback type used by commit-y operations to get a commit log message
602  * from the caller.
603  *
604  * Set @a *log_msg to the log message for the commit, allocated in @a
605  * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
606  * to the path of any temporary file which might be holding that log
607  * message, or @c NULL if no such file exists (though, if @a *log_msg is
608  * @c NULL, this value is undefined). The log message MUST be a UTF8
609  * string with LF line separators.
610  *
611  * @a commit_items is a read-only array of @c svn_client_commit_item2_t
612  * structures, which may be fully or only partially filled-in,
613  * depending on the type of commit operation.
614  *
615  * @a baton is provided along with the callback for use by the handler.
616  *
617  * All allocations should be performed in @a pool.
618  *
619  * @deprecated Provided for backward compatibility with the 1.3 API.
620  */
621 typedef svn_error_t *(*svn_client_get_commit_log2_t)
622  (const char **log_msg,
623  const char **tmp_file,
624  const apr_array_header_t *commit_items,
625  void *baton,
626  apr_pool_t *pool);
627 
628 /** Callback type used by commit-y operations to get a commit log message
629  * from the caller.
630  *
631  * Set @a *log_msg to the log message for the commit, allocated in @a
632  * pool, or @c NULL if wish to abort the commit process. Set @a *tmp_file
633  * to the path of any temporary file which might be holding that log
634  * message, or @c NULL if no such file exists (though, if @a *log_msg is
635  * @c NULL, this value is undefined). The log message MUST be a UTF8
636  * string with LF line separators.
637  *
638  * @a commit_items is a read-only array of @c svn_client_commit_item_t
639  * structures, which may be fully or only partially filled-in,
640  * depending on the type of commit operation.
641  *
642  * @a baton is provided along with the callback for use by the handler.
643  *
644  * All allocations should be performed in @a pool.
645  *
646  * @deprecated Provided for backward compatibility with the 1.2 API.
647  */
648 typedef svn_error_t *(*svn_client_get_commit_log_t)
649  (const char **log_msg,
650  const char **tmp_file,
651  apr_array_header_t *commit_items,
652  void *baton,
653  apr_pool_t *pool);
654 
655 /** @} */
656 
657 /**
658  * Client blame
659  *
660  * @defgroup clnt_blame Client blame functionality
661  *
662  * @{
663  */
664 
665 /** Callback type used by svn_client_blame4() to notify the caller
666  * that line @a line_no of the blamed file was last changed in
667  * @a revision by @a author on @a date, and that the contents were
668  * @a line.
669  *
670  * If svn_client_blame4() was called with @a include_merged_revisions set to
671  * TRUE, @a merged_revision, @a merged_author, @a merged_date, and
672  * @a merged_path will be set, otherwise they will be NULL. @a merged_path
673  * will be set to the absolute repository path.
674  *
675  * All allocations should be performed in @a pool.
676  *
677  * @note If there is no blame information for this line, @a revision will be
678  * invalid and @a author and @a date will be NULL.
679  *
680  *
681  * @since New in 1.5.
682  */
683 typedef svn_error_t *(*svn_client_blame_receiver2_t)
684  (void *baton,
685  apr_int64_t line_no,
686  svn_revnum_t revision,
687  const char *author,
688  const char *date,
689  svn_revnum_t merged_revision,
690  const char *merged_author,
691  const char *merged_date,
692  const char *merged_path,
693  const char *line,
694  apr_pool_t *pool);
695 
696 /**
697  * Similar to @c svn_client_blame_receiver2_t, but without @a merged_revision,
698  * @a merged_author, @a merged_date, or @a merged_path members.
699  *
700  * @note New in 1.4 is that the line is defined to contain only the line
701  * content (and no [partial] EOLs; which was undefined in older versions).
702  * Using this callback with svn_client_blame() or svn_client_blame2()
703  * will still give you the old behaviour.
704  *
705  * @deprecated Provided for backward compatibility with the 1.4 API.
706  */
707 typedef svn_error_t *(*svn_client_blame_receiver_t)
708  (void *baton,
709  apr_int64_t line_no,
710  svn_revnum_t revision,
711  const char *author,
712  const char *date,
713  const char *line,
714  apr_pool_t *pool);
715 
716 
717 /** @} */
718 
719 /**
720  * Client diff
721  *
722  * @defgroup clnt_diff Client diff functionality
723  *
724  * @{
725  */
726 /** The difference type in an svn_diff_summarize_t structure.
727  *
728  * @since New in 1.4.
729  */
731 {
732  /** An item with no text modifications */
734 
735  /** An added item */
737 
738  /** An item with text modifications */
740 
741  /** A deleted item */
744 
745 
746 /** A struct that describes the diff of an item. Passed to
747  * @c svn_diff_summarize_func_t.
748  *
749  * @note Fields may be added to the end of this structure in future
750  * versions. Therefore, users shouldn't allocate structures of this
751  * type, to preserve binary compatibility.
752  *
753  * @since New in 1.4.
754  */
756 {
757  /** Path relative to the target. If the target is a file, path is
758  * the empty string. */
759  const char *path;
760 
761  /** Change kind */
763 
764  /** Properties changed? */
766 
767  /** File or dir */
770 
771 /**
772  * Return a duplicate of @a diff, allocated in @a pool. No part of the new
773  * structure will be shared with @a diff.
774  *
775  * @since New in 1.4.
776  */
779  apr_pool_t *pool);
780 
781 
782 /** A callback used in svn_client_diff_summarize2() and
783  * svn_client_diff_summarize_peg2() for reporting a @a diff summary.
784  *
785  * All allocations should be performed in @a pool.
786  *
787  * @a baton is a closure object; it should be provided by the implementation,
788  * and passed by the caller.
789  *
790  * @since New in 1.4.
791  */
792 typedef svn_error_t *(*svn_client_diff_summarize_func_t)
794  void *baton,
795  apr_pool_t *pool);
796 
797 
798 
799 /** @} */
800 
801 
802 /**
803  * Client context
804  *
805  * @defgroup clnt_ctx Client context management
806  *
807  * @{
808  */
809 
810 /** A client context structure, which holds client specific callbacks,
811  * batons, serves as a cache for configuration options, and other various
812  * and sundry things. In order to avoid backwards compatibility problems
813  * clients should use svn_client_create_context() to allocate and
814  * initialize this structure instead of doing so themselves.
815  */
816 typedef struct svn_client_ctx_t
817 {
818  /** main authentication baton. */
820 
821  /** notification callback function.
822  * This will be called by notify_func2() by default.
823  * @deprecated Provided for backward compatibility with the 1.1 API.
824  * Use @c notify_func2 instead. */
826 
827  /** notification callback baton for notify_func()
828  * @deprecated Provided for backward compatibility with the 1.1 API.
829  * Use @c notify_baton2 instead */
831 
832  /** Log message callback function. NULL means that Subversion
833  * should try not attempt to fetch a log message.
834  * @deprecated Provided for backward compatibility with the 1.2 API.
835  * Use @c log_msg_func2 instead. */
837 
838  /** log message callback baton
839  * @deprecated Provided for backward compatibility with the 1.2 API.
840  * Use @c log_msg_baton2 instead. */
842 
843  /** a hash mapping of <tt>const char *</tt> configuration file names to
844  * @c svn_config_t *'s. For example, the '~/.subversion/config' file's
845  * contents should have the key "config". May be left unset (or set to
846  * NULL) to use the built-in default settings and not use any configuration.
847  */
848  apr_hash_t *config;
849 
850  /** a callback to be used to see if the client wishes to cancel the running
851  * operation. */
853 
854  /** a baton to pass to the cancellation callback. */
856 
857  /** notification function, defaulting to a function that forwards
858  * to notify_func().
859  * @since New in 1.2. */
861 
862  /** notification baton for notify_func2().
863  * @since New in 1.2. */
865 
866  /** Log message callback function. NULL means that Subversion
867  * should try log_msg_func.
868  * @since New in 1.3. */
870 
871  /** callback baton for log_msg_func2
872  * @since New in 1.3. */
874 
875  /** Notification callback for network progress information.
876  * May be NULL if not used.
877  * @since New in 1.3. */
879 
880  /** Callback baton for progress_func.
881  * @since New in 1.3. */
883 
884  /** Log message callback function. NULL means that Subversion
885  * should try @c log_msg_func2, then @c log_msg_func.
886  * @since New in 1.5. */
888 
889  /** The callback baton for @c log_msg_func3.
890  * @since New in 1.5. */
892 
893  /** MIME types map.
894  * @since New in 1.5. */
895  apr_hash_t *mimetypes_map;
896 
897  /** Conflict resolution callback and baton, if available.
898  * @since New in 1.5. */
900  void *conflict_baton;
901 
902  /** Custom client name string, or @c null.
903  * @since New in 1.5. */
904  const char *client_name;
905 
907 
908 /** Initialize a client context.
909  * Set @a *ctx to a client context object, allocated in @a pool, that
910  * represents a particular instance of an svn client.
911  *
912  * In order to avoid backwards compatibility problems, clients must
913  * use this function to initialize and allocate the
914  * @c svn_client_ctx_t structure rather than doing so themselves, as
915  * the size of this structure may change in the future.
916  *
917  * The current implementation never returns error, but callers should
918  * still check for error, for compatibility with future versions.
919  */
920 svn_error_t *
922  apr_pool_t *pool);
923 
924 /** @} end group: Client context management */
925 
926 /**
927  * @name Authentication information file names
928  *
929  * Names of files that contain authentication information.
930  *
931  * These filenames are decided by libsvn_client, since this library
932  * implements all the auth-protocols; libsvn_wc does nothing but
933  * blindly store and retrieve these files from protected areas.
934  *
935  * @defgroup clnt_auth_filenames Client authentication file names
936  * @{
937  */
938 #define SVN_CLIENT_AUTH_USERNAME "username"
939 #define SVN_CLIENT_AUTH_PASSWORD "password"
940 /** @} group end: Authentication information file names */
941 
942 /** Client argument processing
943  *
944  * @defgroup clnt_cmdline Client command-line processing
945  *
946  * @{
947  */
948 
949 /**
950  * Pull remaining target arguments from @a os into @a *targets_p,
951  * converting them to UTF-8, followed by targets from @a known_targets
952  * (which might come from, for example, the "--targets" command line option).
953  *
954  * On each URL target, do some IRI-to-URI encoding and some auto-escaping.
955  * On each local path, canonicalize case and path separators.
956  *
957  * Allocate @a *targets_p and its elements in @a pool.
958  *
959  * @a ctx is required for possible repository authentication.
960  *
961  * If a path has the same name as a Subversion working copy
962  * administrative directory, return SVN_ERR_RESERVED_FILENAME_SPECIFIED;
963  * if multiple reserved paths are encountered, return a chain of
964  * errors, all of which are SVN_ERR_RESERVED_FILENAME_SPECIFIED. Do
965  * not return this type of error in a chain with any other type of
966  * error, and if this is the only type of error encountered, complete
967  * the operation before returning the error(s).
968  *
969  * @since New in 1.6
970  */
971 svn_error_t *
972 svn_client_args_to_target_array(apr_array_header_t **targets_p,
973  apr_getopt_t *os,
974  const apr_array_header_t *known_targets,
975  svn_client_ctx_t *ctx,
976  apr_pool_t *pool);
977 
978 /** @} group end: Client command-line processing */
979 
980 /** @} */
981 
982 /**
983  * Client working copy management functions
984  *
985  * @defgroup clnt_wc Client working copy management
986  *
987  * @{
988  */
989 
990 /**
991  * @defgroup clnt_wc_checkout Checkout
992  *
993  * @{
994  */
995 
996 
997 /**
998  * Checkout a working copy of @a URL at @a revision, looked up at @a
999  * peg_revision, using @a path as the root directory of the newly
1000  * checked out working copy, and authenticating with the
1001  * authentication baton cached in @a ctx. If @a result_rev is not @c
1002  * NULL, set @a *result_rev to the value of the revision actually
1003  * checked out from the repository.
1004  *
1005  * If @a peg_revision->kind is @c svn_opt_revision_unspecified, then it
1006  * defaults to @c svn_opt_revision_head.
1007  *
1008  * @a revision must be of kind @c svn_opt_revision_number,
1009  * @c svn_opt_revision_head, or @c svn_opt_revision_date. If
1010  * @a revision does not meet these requirements, return the error
1011  * @c SVN_ERR_CLIENT_BAD_REVISION.
1012  *
1013  * If @a depth is @c svn_depth_infinity, check out fully recursively.
1014  * Else if it is @c svn_depth_immediates, check out @a URL and its
1015  * immediate entries (subdirectories will be present, but will be at
1016  * depth @c svn_depth_empty themselves); else @c svn_depth_files,
1017  * check out @a URL and its file entries, but no subdirectories; else
1018  * if @c svn_depth_empty, check out @a URL as an empty directory at
1019  * that depth, with no entries present.
1020  *
1021  * If @a depth is @c svn_depth_unknown, then behave as if for
1022  * @c svn_depth_infinity, except in the case of resuming a previous
1023  * checkout of @a path (i.e., updating), in which case use the depth
1024  * of the existing working copy.
1025  *
1026  * If @a ignore_externals is set, don't process externals definitions
1027  * as part of this operation.
1028  *
1029  * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
1030  * @a ctx->notify_baton2 as the checkout progresses.
1031  *
1032  * If @a allow_unver_obstructions is TRUE then the checkout tolerates
1033  * existing unversioned items that obstruct added paths from @a URL. Only
1034  * obstructions of the same type (file or dir) as the added item are
1035  * tolerated. The text of obstructing files is left as-is, effectively
1036  * treating it as a user modification after the checkout. Working
1037  * properties of obstructing items are set equal to the base properties.
1038  * If @a allow_unver_obstructions is FALSE then the checkout will abort
1039  * if there are any unversioned obstructing items.
1040  *
1041  * If @a URL refers to a file rather than a directory, return the
1042  * error @c SVN_ERR_UNSUPPORTED_FEATURE. If @a URL does not exist,
1043  * return the error @c SVN_ERR_RA_ILLEGAL_URL.
1044  *
1045  * Use @a pool for any temporary allocation.
1046  *
1047  * @since New in 1.5.
1048  */
1049 svn_error_t *
1051  const char *URL,
1052  const char *path,
1053  const svn_opt_revision_t *peg_revision,
1054  const svn_opt_revision_t *revision,
1055  svn_depth_t depth,
1056  svn_boolean_t ignore_externals,
1057  svn_boolean_t allow_unver_obstructions,
1058  svn_client_ctx_t *ctx,
1059  apr_pool_t *pool);
1060 
1061 
1062 /**
1063  * Similar to svn_client_checkout3() but with @a allow_unver_obstructions
1064  * always set to FALSE, and @a depth set according to @a recurse: if
1065  * @a recurse is TRUE, @a depth is @c svn_depth_infinity, if @a recurse
1066  * is FALSE, @a depth is @c svn_depth_files.
1067  *
1068  * @deprecated Provided for backward compatibility with the 1.4 API.
1069  */
1071 svn_error_t *
1073  const char *URL,
1074  const char *path,
1075  const svn_opt_revision_t *peg_revision,
1076  const svn_opt_revision_t *revision,
1077  svn_boolean_t recurse,
1078  svn_boolean_t ignore_externals,
1079  svn_client_ctx_t *ctx,
1080  apr_pool_t *pool);
1081 
1082 
1083 /**
1084  * Similar to svn_client_checkout2(), but with @a peg_revision
1085  * always set to @c svn_opt_revision_unspecified and
1086  * @a ignore_externals always set to FALSE.
1087  *
1088  * @deprecated Provided for backward compatibility with the 1.1 API.
1089  */
1091 svn_error_t *
1092 svn_client_checkout(svn_revnum_t *result_rev,
1093  const char *URL,
1094  const char *path,
1095  const svn_opt_revision_t *revision,
1096  svn_boolean_t recurse,
1097  svn_client_ctx_t *ctx,
1098  apr_pool_t *pool);
1099 /** @} */
1100 
1101 /**
1102  * @defgroup Update Bring a working copy up-to-date with a repository
1103  *
1104  * @{
1105  *
1106  */
1107 
1108 /**
1109  * Update working trees @a paths to @a revision, authenticating with the
1110  * authentication baton cached in @a ctx. @a paths is an array of const
1111  * char * paths to be updated. Unversioned paths that are direct children
1112  * of a versioned path will cause an update that attempts to add that path,
1113  * other unversioned paths are skipped. If @a result_revs is not
1114  * @c NULL an array of svn_revnum_t will be returned with each element set
1115  * to the revision to which @a revision was resolved.
1116  *
1117  * @a revision must be of kind @c svn_opt_revision_number,
1118  * @c svn_opt_revision_head, or @c svn_opt_revision_date. If @a
1119  * revision does not meet these requirements, return the error
1120  * @c SVN_ERR_CLIENT_BAD_REVISION.
1121  *
1122  * The paths in @a paths can be from multiple working copies from multiple
1123  * repositories, but even if they all come from the same repository there
1124  * is no guarantee that revision represented by @c svn_opt_revision_head
1125  * will remain the same as each path is updated.
1126  *
1127  * If @a ignore_externals is set, don't process externals definitions
1128  * as part of this operation.
1129  *
1130  * If @a depth is @c svn_depth_infinity, update fully recursively.
1131  * Else if it is @c svn_depth_immediates or @c svn_depth_files, update
1132  * each target and its file entries, but not its subdirectories. Else
1133  * if @c svn_depth_empty, update exactly each target, nonrecursively
1134  * (essentially, update the target's properties).
1135  *
1136  * If @a depth is @c svn_depth_unknown, take the working depth from
1137  * @a paths and then behave as described above.
1138  *
1139  * If @a depth_is_sticky is set and @a depth is not @c
1140  * svn_depth_unknown, then in addition to updating PATHS, also set
1141  * their sticky ambient depth value to @a depth.
1142  *
1143  * If @a allow_unver_obstructions is TRUE then the update tolerates
1144  * existing unversioned items that obstruct added paths. Only
1145  * obstructions of the same type (file or dir) as the added item are
1146  * tolerated. The text of obstructing files is left as-is, effectively
1147  * treating it as a user modification after the update. Working
1148  * properties of obstructing items are set equal to the base properties.
1149  * If @a allow_unver_obstructions is FALSE then the update will abort
1150  * if there are any unversioned obstructing items.
1151  *
1152  * If @a ctx->notify_func2 is non-NULL, invoke @a ctx->notify_func2 with
1153  * @a ctx->notify_baton2 for each item handled by the update, and also for
1154  * files restored from text-base. If @a ctx->cancel_func is non-NULL, invoke
1155  * it passing @a ctx->cancel_baton at various places during the update.
1156  *
1157  * Use @a pool for any temporary allocation.
1158  *
1159  * @since New in 1.5.
1160  */
1161 svn_error_t *
1162 svn_client_update3(apr_array_header_t **result_revs,
1163  const apr_array_header_t *paths,
1164  const svn_opt_revision_t *revision,
1165  svn_depth_t depth,
1166  svn_boolean_t depth_is_sticky,
1167  svn_boolean_t ignore_externals,
1168  svn_boolean_t allow_unver_obstructions,
1169  svn_client_ctx_t *ctx,
1170  apr_pool_t *pool);
1171 
1172 /**
1173  * Similar to svn_client_update3() but with @a allow_unver_obstructions
1174  * always set to FALSE, @a depth_is_sticky to FALSE, and @a depth set
1175  * according to @a recurse: if @a recurse is TRUE, set @a depth to @c
1176  * svn_depth_infinity, if @a recurse is FALSE, set @a depth to @c
1177  * svn_depth_files.
1178  *
1179  * @deprecated Provided for backward compatibility with the 1.4 API.
1180  */
1182 svn_error_t *
1183 svn_client_update2(apr_array_header_t **result_revs,
1184  const apr_array_header_t *paths,
1185  const svn_opt_revision_t *revision,
1186  svn_boolean_t recurse,
1187  svn_boolean_t ignore_externals,
1188  svn_client_ctx_t *ctx,
1189  apr_pool_t *pool);
1190 
1191 /**
1192  * Similar to svn_client_update2() except that it accepts only a single
1193  * target in @a path, returns a single revision if @a result_rev is
1194  * not NULL, and @a ignore_externals is always set to FALSE.
1195  *
1196  * @deprecated Provided for backward compatibility with the 1.1 API.
1197  */
1199 svn_error_t *
1200 svn_client_update(svn_revnum_t *result_rev,
1201  const char *path,
1202  const svn_opt_revision_t *revision,
1203  svn_boolean_t recurse,
1204  svn_client_ctx_t *ctx,
1205  apr_pool_t *pool);
1206 /** @} */
1207 
1208 /**
1209  * @defgroup Switch Switch a working copy to another location.
1210  *
1211  * @{
1212  */
1213 
1214 /** Switch working tree @a path to @a url\@peg_revision at @a revision,
1215  * authenticating with the authentication baton cached in @a ctx. If
1216  * @a result_rev is not @c NULL, set @a *result_rev to the value of
1217  * the revision to which the working copy was actually switched.
1218  *
1219  * Summary of purpose: this is normally used to switch a working
1220  * directory over to another line of development, such as a branch or
1221  * a tag. Switching an existing working directory is more efficient
1222  * than checking out @a url from scratch.
1223  *
1224  * @a revision must be of kind @c svn_opt_revision_number,
1225  * @c svn_opt_revision_head, or @c svn_opt_revision_date; otherwise,
1226  * return @c SVN_ERR_CLIENT_BAD_REVISION.
1227  *
1228  * If @a depth is @c svn_depth_infinity, switch fully recursively.
1229  * Else if it is @c svn_depth_immediates, switch @a path and its file
1230  * children (if any), and switch subdirectories but do not update
1231  * them. Else if @c svn_depth_files, switch just file children,
1232  * ignoring subdirectories completely. Else if @c svn_depth_empty,
1233  * switch just @a path and touch nothing underneath it.
1234  *
1235  * If @a depth_is_sticky is set and @a depth is not @c
1236  * svn_depth_unknown, then in addition to switching PATH, also set
1237  * its sticky ambient depth value to @a depth.
1238  *
1239  * If @a ignore_externals is set, don't process externals definitions
1240  * as part of this operation.
1241  *
1242  * If @a allow_unver_obstructions is TRUE then the switch tolerates
1243  * existing unversioned items that obstruct added paths. Only
1244  * obstructions of the same type (file or dir) as the added item are
1245  * tolerated. The text of obstructing files is left as-is, effectively
1246  * treating it as a user modification after the switch. Working
1247  * properties of obstructing items are set equal to the base properties.
1248  * If @a allow_unver_obstructions is FALSE then the switch will abort
1249  * if there are any unversioned obstructing items.
1250  *
1251  * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2
1252  * on paths affected by the switch. Also invoke it for files may be restored
1253  * from the text-base because they were removed from the working copy.
1254  *
1255  * Use @a pool for any temporary allocation.
1256  *
1257  * @since New in 1.5.
1258  */
1259 svn_error_t *
1260 svn_client_switch2(svn_revnum_t *result_rev,
1261  const char *path,
1262  const char *url,
1263  const svn_opt_revision_t *peg_revision,
1264  const svn_opt_revision_t *revision,
1265  svn_depth_t depth,
1266  svn_boolean_t depth_is_sticky,
1267  svn_boolean_t ignore_externals,
1268  svn_boolean_t allow_unver_obstructions,
1269  svn_client_ctx_t *ctx,
1270  apr_pool_t *pool);
1271 
1272 
1273 /**
1274  * Similar to svn_client_switch2() but with @a allow_unver_obstructions,
1275  * @a ignore_externals, and @a depth_is_sticky always set to FALSE,
1276  * and @a depth set according to @a recurse: if @a recurse is TRUE,
1277  * set @a depth to @c svn_depth_infinity, if @a recurse is FALSE, set
1278  * @a depth to @c svn_depth_files.
1279  *
1280  * @deprecated Provided for backward compatibility with the 1.4 API.
1281  */
1283 svn_error_t *
1284 svn_client_switch(svn_revnum_t *result_rev,
1285  const char *path,
1286  const char *url,
1287  const svn_opt_revision_t *revision,
1288  svn_boolean_t recurse,
1289  svn_client_ctx_t *ctx,
1290  apr_pool_t *pool);
1291 
1292 /** @} */
1293 
1294 /**
1295  * @defgroup Add Begin versioning files/directories in a working copy.
1296  *
1297  * @{
1298  */
1299 
1300 /**
1301  * Schedule a working copy @a path for addition to the repository.
1302  *
1303  * If @a depth is @c svn_depth_empty, add just @a path and nothing
1304  * below it. If @c svn_depth_files, add @a path and any file
1305  * children of @a path. If @c svn_depth_immediates, add @a path, any
1306  * file children, and any immediate subdirectories (but nothing
1307  * underneath those subdirectories). If @c svn_depth_infinity, add
1308  * @a path and everything under it fully recursively.
1309  *
1310  * @a path's parent must be under revision control already (unless
1311  * @a add_parents is TRUE), but @a path is not. If @a recursive is
1312  * set, then assuming @a path is a directory, all of its contents will
1313  * be scheduled for addition as well.
1314  *
1315  * If @a force is not set and @a path is already under version
1316  * control, return the error @c SVN_ERR_ENTRY_EXISTS. If @a force is
1317  * set, do not error on already-versioned items. When used on a
1318  * directory in conjunction with the @a recursive flag, this has the
1319  * effect of scheduling for addition unversioned files and directories
1320  * scattered deep within a versioned tree.
1321  *
1322  * If @a ctx->notify_func2 is non-NULL, then for each added item, call
1323  * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the
1324  * added item.
1325  *
1326  * If @a no_ignore is FALSE, don't add files or directories that match
1327  * ignore patterns.
1328  *
1329  * If @a add_parents is TRUE, recurse up @a path's directory and look for
1330  * a versioned directory. If found, add all intermediate paths between it
1331  * and @a path. If not found, return @c SVN_ERR_CLIENT_NO_VERSIONED_PARENTS.
1332  *
1333  * @par Important:
1334  * This is a *scheduling* operation. No changes will
1335  * happen to the repository until a commit occurs. This scheduling
1336  * can be removed with svn_client_revert2().
1337  *
1338  * @since New in 1.5.
1339  */
1340 svn_error_t *
1341 svn_client_add4(const char *path,
1342  svn_depth_t depth,
1343  svn_boolean_t force,
1344  svn_boolean_t no_ignore,
1345  svn_boolean_t add_parents,
1346  svn_client_ctx_t *ctx,
1347  apr_pool_t *pool);
1348 
1349 /**
1350  * Similar to svn_client_add4(), but with @a add_parents always set to
1351  * FALSE and @a depth set according to @a recursive: if TRUE, then
1352  * @a depth is @c svn_depth_infinity, if FALSE, then @c svn_depth_empty.
1353  *
1354  * @deprecated Provided for backward compatibility with the 1.4 API.
1355  */
1357 svn_error_t *
1358 svn_client_add3(const char *path,
1359  svn_boolean_t recursive,
1360  svn_boolean_t force,
1361  svn_boolean_t no_ignore,
1362  svn_client_ctx_t *ctx,
1363  apr_pool_t *pool);
1364 
1365 /**
1366  * Similar to svn_client_add3(), but with @a no_ignore always set to
1367  * FALSE.
1368  *
1369  * @deprecated Provided for backward compatibility with the 1.2 API.
1370  */
1372 svn_error_t *
1373 svn_client_add2(const char *path,
1374  svn_boolean_t recursive,
1375  svn_boolean_t force,
1376  svn_client_ctx_t *ctx,
1377  apr_pool_t *pool);
1378 
1379 /**
1380  * Similar to svn_client_add2(), but with @a force always set to FALSE.
1381  *
1382  * @deprecated Provided for backward compatibility with the 1.0 API.
1383  */
1385 svn_error_t *
1386 svn_client_add(const char *path,
1387  svn_boolean_t recursive,
1388  svn_client_ctx_t *ctx,
1389  apr_pool_t *pool);
1390 
1391 /** @} */
1392 
1393 /**
1394  * @defgroup Mkdir Create directories in a working copy or repository.
1395  *
1396  * @{
1397  */
1398 
1399 /** Create a directory, either in a repository or a working copy.
1400  *
1401  * If @a paths contains URLs, use the authentication baton in @a ctx
1402  * and @a message to immediately attempt to commit the creation of the
1403  * directories in @a paths in the repository. If the commit succeeds,
1404  * allocate (in @a pool) and populate @a *commit_info_p.
1405  *
1406  * Else, create the directories on disk, and attempt to schedule them
1407  * for addition (using svn_client_add(), whose docstring you should
1408  * read).
1409  *
1410  * If @a make_parents is TRUE, create any non-existent parent directories
1411  * also.
1412  *
1413  * If non-NULL, @a revprop_table is a hash table holding additional,
1414  * custom revision properties (<tt>const char *</tt> names mapped to
1415  * <tt>svn_string_t *</tt> values) to be set on the new revision in
1416  * the event that this is a committing operation. This table cannot
1417  * contain any standard Subversion properties.
1418  *
1419  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1420  * combo that this function can use to query for a commit log message
1421  * when one is needed.
1422  *
1423  * If @a ctx->notify_func2 is non-NULL, when the directory has been created
1424  * (successfully) in the working copy, call @a ctx->notify_func2 with
1425  * @a ctx->notify_baton2 and the path of the new directory. Note that this is
1426  * only called for items added to the working copy.
1427  *
1428  * @since New in 1.5.
1429  */
1430 svn_error_t *
1431 svn_client_mkdir3(svn_commit_info_t **commit_info_p,
1432  const apr_array_header_t *paths,
1433  svn_boolean_t make_parents,
1434  const apr_hash_t *revprop_table,
1435  svn_client_ctx_t *ctx,
1436  apr_pool_t *pool);
1437 
1438 
1439 /**
1440  * Same as svn_client_mkdir3(), but with @a make_parents always FALSE,
1441  * and @a revprop_table always NULL.
1442  *
1443  * @since New in 1.3.
1444  * @deprecated Provided for backward compatibility with the 1.4 API.
1445  */
1447 svn_error_t *
1448 svn_client_mkdir2(svn_commit_info_t **commit_info_p,
1449  const apr_array_header_t *paths,
1450  svn_client_ctx_t *ctx,
1451  apr_pool_t *pool);
1452 
1453 /**
1454  * Same as svn_client_mkdir2(), but takes the @c svn_client_commit_info_t
1455  * type for @a commit_info_p.
1456  *
1457  * @deprecated Provided for backward compatibility with the 1.2 API.
1458  */
1460 svn_error_t *
1462  const apr_array_header_t *paths,
1463  svn_client_ctx_t *ctx,
1464  apr_pool_t *pool);
1465 
1466 /** @} */
1467 
1468 /**
1469  * @defgroup Delete Remove files/directories from a working copy or repository.
1470  *
1471  * @{
1472  */
1473 
1474 /** Delete items from a repository or working copy.
1475  *
1476  * If the paths in @a paths are URLs, use the authentication baton in
1477  * @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to
1478  * immediately attempt to commit a deletion of the URLs from the
1479  * repository. If the commit succeeds, allocate (in @a pool) and
1480  * populate @a *commit_info_p. Every path must belong to the same
1481  * repository.
1482  *
1483  * Else, schedule the working copy paths in @a paths for removal from
1484  * the repository. Each path's parent must be under revision control.
1485  * This is just a *scheduling* operation. No changes will happen to
1486  * the repository until a commit occurs. This scheduling can be
1487  * removed with svn_client_revert2(). If a path is a file it is
1488  * immediately removed from the working copy. If the path is a
1489  * directory it will remain in the working copy but all the files, and
1490  * all unversioned items, it contains will be removed. If @a force is
1491  * not set then this operation will fail if any path contains locally
1492  * modified and/or unversioned items. If @a force is set such items
1493  * will be deleted.
1494  *
1495  * If the paths are working copy paths and @a keep_local is TRUE then
1496  * the paths will not be removed from the working copy, only scheduled
1497  * for removal from the repository. Once the scheduled deletion is
1498  * committed, they will appear as unversioned paths in the working copy.
1499  *
1500  * If non-NULL, @a revprop_table is a hash table holding additional,
1501  * custom revision properties (<tt>const char *</tt> names mapped to
1502  * <tt>svn_string_t *</tt> values) to be set on the new revision in
1503  * the event that this is a committing operation. This table cannot
1504  * contain any standard Subversion properties.
1505  *
1506  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1507  * combo that this function can use to query for a commit log message
1508  * when one is needed.
1509  *
1510  * If @a ctx->notify_func2 is non-NULL, then for each item deleted, call
1511  * @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of the deleted
1512  * item.
1513  *
1514  * @since New in 1.5.
1515  */
1516 svn_error_t *
1517 svn_client_delete3(svn_commit_info_t **commit_info_p,
1518  const apr_array_header_t *paths,
1519  svn_boolean_t force,
1520  svn_boolean_t keep_local,
1521  const apr_hash_t *revprop_table,
1522  svn_client_ctx_t *ctx,
1523  apr_pool_t *pool);
1524 
1525 /**
1526  * Similar to svn_client_delete3(), but with @a keep_local always set
1527  * to FALSE, and @a revprop_table passed as NULL.
1528  *
1529  * @deprecated Provided for backward compatibility with the 1.4 API.
1530  */
1532 svn_error_t *
1533 svn_client_delete2(svn_commit_info_t **commit_info_p,
1534  const apr_array_header_t *paths,
1535  svn_boolean_t force,
1536  svn_client_ctx_t *ctx,
1537  apr_pool_t *pool);
1538 
1539 /**
1540  * Similar to svn_client_delete2(), but takes the @c svn_client_commit_info_t
1541  * type for @a commit_info_p.
1542  *
1543  * @deprecated Provided for backward compatibility with the 1.2 API.
1544  */
1546 svn_error_t *
1548  const apr_array_header_t *paths,
1549  svn_boolean_t force,
1550  svn_client_ctx_t *ctx,
1551  apr_pool_t *pool);
1552 
1553 
1554 /** @} */
1555 
1556 /**
1557  * @defgroup Import Import files into the repository.
1558  *
1559  * @{
1560  */
1561 
1562 /** Import file or directory @a path into repository directory @a url at
1563  * head, authenticating with the authentication baton cached in @a ctx,
1564  * and using @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to get a log message
1565  * for the (implied) commit. Set @a *commit_info_p to the results of the
1566  * commit, allocated in @a pool. If some components of @a url do not exist
1567  * then create parent directories as necessary.
1568  *
1569  * If @a path is a directory, the contents of that directory are
1570  * imported directly into the directory identified by @a url. Note that the
1571  * directory @a path itself is not imported -- that is, the basename of
1572  * @a path is not part of the import.
1573  *
1574  * If @a path is a file, then the dirname of @a url is the directory
1575  * receiving the import. The basename of @a url is the filename in the
1576  * repository. In this case if @a url already exists, return error.
1577  *
1578  * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
1579  * @a ctx->notify_baton2 as the import progresses, with any of the following
1580  * actions: @c svn_wc_notify_commit_added,
1581  * @c svn_wc_notify_commit_postfix_txdelta.
1582  *
1583  * Use @a pool for any temporary allocation.
1584  *
1585  * If non-NULL, @a revprop_table is a hash table holding additional,
1586  * custom revision properties (<tt>const char *</tt> names mapped to
1587  * <tt>svn_string_t *</tt> values) to be set on the new revision.
1588  * This table cannot contain any standard Subversion properties.
1589  *
1590  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton
1591  * combo that this function can use to query for a commit log message
1592  * when one is needed.
1593  *
1594  * If @a depth is @c svn_depth_empty, import just @a path and nothing
1595  * below it. If @c svn_depth_files, import @a path and any file
1596  * children of @a path. If @c svn_depth_immediates, import @a path, any
1597  * file children, and any immediate subdirectories (but nothing
1598  * underneath those subdirectories). If @c svn_depth_infinity, import
1599  * @a path and everything under it fully recursively.
1600  *
1601  * If @a no_ignore is @c FALSE, don't add files or directories that match
1602  * ignore patterns.
1603  *
1604  * If @a ignore_unknown_node_types is @c FALSE, ignore files of which the
1605  * node type is unknown, such as device files and pipes.
1606  *
1607  * @since New in 1.5.
1608  */
1609 svn_error_t *
1610 svn_client_import3(svn_commit_info_t **commit_info_p,
1611  const char *path,
1612  const char *url,
1613  svn_depth_t depth,
1614  svn_boolean_t no_ignore,
1615  svn_boolean_t ignore_unknown_node_types,
1616  const apr_hash_t *revprop_table,
1617  svn_client_ctx_t *ctx,
1618  apr_pool_t *pool);
1619 
1620 /**
1621  * Similar to svn_client_import3(), but with @a ignore_unknown_node_types
1622  * always set to @c FALSE, @a revprop_table passed as NULL, and @a
1623  * depth set according to @a nonrecursive: if TRUE, then @a depth is
1624  * @c svn_depth_files, else @c svn_depth_infinity.
1625  *
1626  * @since New in 1.3.
1627  *
1628  * @deprecated Provided for backward compatibility with the 1.4 API
1629  */
1631 svn_error_t *
1632 svn_client_import2(svn_commit_info_t **commit_info_p,
1633  const char *path,
1634  const char *url,
1635  svn_boolean_t nonrecursive,
1636  svn_boolean_t no_ignore,
1637  svn_client_ctx_t *ctx,
1638  apr_pool_t *pool);
1639 
1640 /**
1641  * Similar to svn_client_import2(), but with @a no_ignore always set
1642  * to FALSE and using the @c svn_client_commit_info_t type for
1643  * @a commit_info_p.
1644  *
1645  * @deprecated Provided for backward compatibility with the 1.2 API.
1646  */
1648 svn_error_t *
1650  const char *path,
1651  const char *url,
1652  svn_boolean_t nonrecursive,
1653  svn_client_ctx_t *ctx,
1654  apr_pool_t *pool);
1655 
1656 /** @} */
1657 
1658 /**
1659  * @defgroup Commit Commit local modifications to the repository.
1660  *
1661  * @{
1662  */
1663 
1664 /**
1665  * Commit files or directories into repository, authenticating with
1666  * the authentication baton cached in @a ctx, and using
1667  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message.
1668  * Set @a *commit_info_p to the results of the commit, allocated in @a pool.
1669  *
1670  * @a targets is an array of <tt>const char *</tt> paths to commit. They
1671  * need not be canonicalized nor condensed; this function will take care of
1672  * that. If @a targets has zero elements, then do nothing and return
1673  * immediately without error.
1674  *
1675  * If non-NULL, @a revprop_table is a hash table holding additional,
1676  * custom revision properties (<tt>const char *</tt> names mapped to
1677  * <tt>svn_string_t *</tt> values) to be set on the new revision.
1678  * This table cannot contain any standard Subversion properties.
1679  *
1680  * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with
1681  * @a ctx->notify_baton2 as the commit progresses, with any of the following
1682  * actions: @c svn_wc_notify_commit_modified, @c svn_wc_notify_commit_added,
1683  * @c svn_wc_notify_commit_deleted, @c svn_wc_notify_commit_replaced,
1684  * @c svn_wc_notify_commit_postfix_txdelta.
1685  *
1686  * If @a depth is @c svn_depth_infinity, commit all changes to and
1687  * below named targets. If @a depth is @c svn_depth_empty, commit
1688  * only named targets (that is, only property changes on named
1689  * directory targets, and property and content changes for named file
1690  * targets). If @a depth is @c svn_depth_files, behave as above for
1691  * named file targets, and for named directory targets, commit
1692  * property changes on a named directory and all changes to files
1693  * directly inside that directory. If @c svn_depth_immediates, behave
1694  * as for @c svn_depth_files, and for subdirectories of any named
1695  * directory target commit as though for @c svn_depth_empty.
1696  *
1697  * Unlock paths in the repository, unless @a keep_locks is TRUE.
1698  *
1699  * @a changelists is an array of <tt>const char *</tt> changelist
1700  * names, used as a restrictive filter on items that are committed;
1701  * that is, don't commit anything unless it's a member of one of those
1702  * changelists. After the commit completes successfully, remove
1703  * changelist associations from the targets, unless @a
1704  * keep_changelists is set. If @a changelists is
1705  * empty (or altogether @c NULL), no changelist filtering occurs.
1706  *
1707  * Use @a pool for any temporary allocations.
1708  *
1709  * If no error is returned and @a (*commit_info_p)->revision is set to
1710  * @c SVN_INVALID_REVNUM, then the commit was a no-op; nothing needed to
1711  * be committed.
1712  *
1713  * @since New in 1.5.
1714  */
1715 svn_error_t *
1716 svn_client_commit4(svn_commit_info_t **commit_info_p,
1717  const apr_array_header_t *targets,
1718  svn_depth_t depth,
1719  svn_boolean_t keep_locks,
1720  svn_boolean_t keep_changelists,
1721  const apr_array_header_t *changelists,
1722  const apr_hash_t *revprop_table,
1723  svn_client_ctx_t *ctx,
1724  apr_pool_t *pool);
1725 
1726 /**
1727  * Similar to svn_client_commit4(), but always with NULL for
1728  * @a changelist_name, FALSE for @a keep_changelist, NULL for @a
1729  * revprop_table, and @a depth set according to @a recurse: if @a
1730  * recurse is TRUE, use @c svn_depth_infinity, else @c
1731  * svn_depth_empty.
1732  *
1733  * @deprecated Provided for backward compatibility with the 1.4 API.
1734  *
1735  * @since New in 1.3.
1736  */
1738 svn_error_t *
1739 svn_client_commit3(svn_commit_info_t **commit_info_p,
1740  const apr_array_header_t *targets,
1741  svn_boolean_t recurse,
1742  svn_boolean_t keep_locks,
1743  svn_client_ctx_t *ctx,
1744  apr_pool_t *pool);
1745 
1746 /**
1747  * Similar to svn_client_commit3(), but uses @c svn_client_commit_info_t
1748  * for @a commit_info_p.
1749  *
1750  * @deprecated Provided for backward compatibility with the 1.2 API.
1751  *
1752  * @since New in 1.2.
1753  */
1755 svn_error_t *
1757  const apr_array_header_t *targets,
1758  svn_boolean_t recurse,
1759  svn_boolean_t keep_locks,
1760  svn_client_ctx_t *ctx,
1761  apr_pool_t *pool);
1762 
1763 /**
1764  * Similar to svn_client_commit2(), but with @a keep_locks set to
1765  * TRUE and @a nonrecursive instead of @a recurse.
1766  *
1767  * @deprecated Provided for backward compatibility with the 1.1 API.
1768  */
1770 svn_error_t *
1772  const apr_array_header_t *targets,
1773  svn_boolean_t nonrecursive,
1774  svn_client_ctx_t *ctx,
1775  apr_pool_t *pool);
1776 
1777 /** @} */
1778 
1779 /**
1780  * @defgroup Status Report interesting information about paths in the \
1781  * working copy.
1782  *
1783  * @{
1784  */
1785 
1786 /**
1787  * Given @a path to a working copy directory (or single file), call
1788  * @a status_func/status_baton with a set of @c svn_wc_status_t *
1789  * structures which describe the status of @a path, and its children
1790  * (recursing according to @a depth).
1791  *
1792  * - If @a get_all is set, retrieve all entries; otherwise,
1793  * retrieve only "interesting" entries (local mods and/or
1794  * out of date).
1795  *
1796  * - If @a update is set, contact the repository and augment the
1797  * status structures with information about out-of-dateness (with
1798  * respect to @a revision). Also, if @a result_rev is not @c NULL,
1799  * set @a *result_rev to the actual revision against which the
1800  * working copy was compared (@a *result_rev is not meaningful unless
1801  * @a update is set).
1802  *
1803  * If @a ignore_externals is not set, then recurse into externals
1804  * definitions (if any exist) after handling the main target. This
1805  * calls the client notification function (in @a ctx) with the @c
1806  * svn_wc_notify_status_external action before handling each externals
1807  * definition, and with @c svn_wc_notify_status_completed
1808  * after each.
1809  *
1810  * @a changelists is an array of <tt>const char *</tt> changelist
1811  * names, used as a restrictive filter on items whose statuses are
1812  * reported; that is, don't report status about any item unless
1813  * it's a member of one of those changelists. If @a changelists is
1814  * empty (or altogether @c NULL), no changelist filtering occurs.
1815  *
1816  * @since New in 1.6.
1817  */
1818 svn_error_t *
1819 svn_client_status4(svn_revnum_t *result_rev,
1820  const char *path,
1821  const svn_opt_revision_t *revision,
1822  svn_wc_status_func3_t status_func,
1823  void *status_baton,
1824  svn_depth_t depth,
1825  svn_boolean_t get_all,
1826  svn_boolean_t update,
1827  svn_boolean_t no_ignore,
1828  svn_boolean_t ignore_externals,
1829  const apr_array_header_t *changelists,
1830  svn_client_ctx_t *ctx,
1831  apr_pool_t *pool);
1832 
1833 /**
1834  * Same as svn_client_status4(), but using an @c svn_wc_status_func2_t
1835  * instead of an @c svn_wc_status_func3_t.
1836  *
1837  * @since New in 1.5.
1838  * @deprecated Provided for backward compatibility with the 1.5 API.
1839  */
1841 svn_error_t *
1842 svn_client_status3(svn_revnum_t *result_rev,
1843  const char *path,
1844  const svn_opt_revision_t *revision,
1845  svn_wc_status_func2_t status_func,
1846  void *status_baton,
1847  svn_depth_t depth,
1848  svn_boolean_t get_all,
1849  svn_boolean_t update,
1850  svn_boolean_t no_ignore,
1851  svn_boolean_t ignore_externals,
1852  const apr_array_header_t *changelists,
1853  svn_client_ctx_t *ctx,
1854  apr_pool_t *pool);
1855 
1856 /**
1857  * Like svn_client_status3(), except with @a changelists passed as @c
1858  * NULL, and with @a recurse instead of @a depth. If @a recurse is
1859  * TRUE, behave as if for @c svn_depth_infinity; else if @a recurse is
1860  * FALSE, behave as if for @c svn_depth_immediates.
1861  *
1862  * @since New in 1.2.
1863  * @deprecated Provided for backward compatibility with the 1.4 API.
1864  */
1866 svn_error_t *
1867 svn_client_status2(svn_revnum_t *result_rev,
1868  const char *path,
1869  const svn_opt_revision_t *revision,
1870  svn_wc_status_func2_t status_func,
1871  void *status_baton,
1872  svn_boolean_t recurse,
1873  svn_boolean_t get_all,
1874  svn_boolean_t update,
1875  svn_boolean_t no_ignore,
1876  svn_boolean_t ignore_externals,
1877  svn_client_ctx_t *ctx,
1878  apr_pool_t *pool);
1879 
1880 
1881 /**
1882  * Similar to svn_client_status2(), but with @a ignore_externals
1883  * always set to FALSE, taking the @c svn_wc_status_func_t type
1884  * instead of the @c svn_wc_status_func2_t type for @a status_func,
1885  * and requiring @a *revision to be non-const even though it is
1886  * treated as constant.
1887  *
1888  * @deprecated Provided for backward compatibility with the 1.1 API.
1889  */
1891 svn_error_t *
1892 svn_client_status(svn_revnum_t *result_rev,
1893  const char *path,
1894  svn_opt_revision_t *revision,
1895  svn_wc_status_func_t status_func,
1896  void *status_baton,
1897  svn_boolean_t recurse,
1898  svn_boolean_t get_all,
1899  svn_boolean_t update,
1900  svn_boolean_t no_ignore,
1901  svn_client_ctx_t *ctx,
1902  apr_pool_t *pool);
1903 
1904 /** @} */
1905 
1906 /**
1907  * @defgroup Log View information about previous revisions of an object.
1908  *
1909  * @{
1910  */
1911 
1912 /**
1913  * Invoke @a receiver with @a receiver_baton on each log message from
1914  * each start/end revision pair in the @a revision_ranges in turn,
1915  * inclusive (but never invoke @a receiver on a given log message more
1916  * than once).
1917  *
1918  * @a targets contains either a URL followed by zero or more relative
1919  * paths, or 1 working copy path, as <tt>const char *</tt>, for which log
1920  * messages are desired. @a receiver is invoked only on messages whose
1921  * revisions involved a change to some path in @a targets. @a peg_revision
1922  * indicates in which revision @a targets are valid. If @a peg_revision is
1923  * @c svn_opt_revision_unspecified, it defaults to @c svn_opt_revision_head
1924  * for URLs or @c svn_opt_revision_working for WC paths.
1925  *
1926  * If @a limit is non-zero only invoke @a receiver on the first @a limit
1927  * logs.
1928  *
1929  * If @a discover_changed_paths is set, then the `@a changed_paths' argument
1930  * to @a receiver will be passed on each invocation.
1931  *
1932  * If @a strict_node_history is set, copy history (if any exists) will
1933  * not be traversed while harvesting revision logs for each target.
1934  *
1935  * If @a include_merged_revisions is set, log information for revisions
1936  * which have been merged to @a targets will also be returned.
1937  *
1938  * If @a revprops is NULL, retrieve all revprops; else, retrieve only the
1939  * revprops named in the array (i.e. retrieve none if the array is empty).
1940  *
1941  * If @a start->kind or @a end->kind is @c svn_opt_revision_unspecified,
1942  * return the error @c SVN_ERR_CLIENT_BAD_REVISION.
1943  *
1944  * Use @a pool for any temporary allocation.
1945  *
1946  * @par Important:
1947  * A special case for the revision range HEAD:1, which was present
1948  * in svn_client_log(), has been removed from svn_client_log2(). Instead, it
1949  * is expected that callers will specify the range HEAD:0, to avoid a
1950  * SVN_ERR_FS_NO_SUCH_REVISION error when invoked against an empty repository
1951  * (i.e. one not containing a revision 1).
1952  *
1953  * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2/baton2
1954  * with a 'skip' signal on any unversioned targets.
1955  *
1956  * @since New in 1.6.
1957  */
1958 svn_error_t *
1959 svn_client_log5(const apr_array_header_t *targets,
1960  const svn_opt_revision_t *peg_revision,
1961  const apr_array_header_t *revision_ranges,
1962  int limit,
1963  svn_boolean_t discover_changed_paths,
1964  svn_boolean_t strict_node_history,
1965  svn_boolean_t include_merged_revisions,
1966  const apr_array_header_t *revprops,
1967  svn_log_entry_receiver_t receiver,
1968  void *receiver_baton,
1969  svn_client_ctx_t *ctx,
1970  apr_pool_t *pool);
1971 
1972 /**
1973  * Similar to svn_client_log5(), but takes explicit start and end parameters
1974  * instead of an array of revision ranges.
1975  *
1976  * @deprecated Provided for compatibility with the 1.5 API.
1977  * @since New in 1.5.
1978  */
1980 svn_error_t *
1981 svn_client_log4(const apr_array_header_t *targets,
1982  const svn_opt_revision_t *peg_revision,
1983  const svn_opt_revision_t *start,
1984  const svn_opt_revision_t *end,
1985  int limit,
1986  svn_boolean_t discover_changed_paths,
1987  svn_boolean_t strict_node_history,
1988  svn_boolean_t include_merged_revisions,
1989  const apr_array_header_t *revprops,
1990  svn_log_entry_receiver_t receiver,
1991  void *receiver_baton,
1992  svn_client_ctx_t *ctx,
1993  apr_pool_t *pool);
1994 
1995 /**
1996  * Similar to svn_client_log4(), but using @c svn_log_message_receiver_t
1997  * instead of @c svn_log_entry_receiver_t. Also, @a
1998  * include_merged_revisions is set to @c FALSE and @a revprops is
1999  * svn:author, svn:date, and svn:log.
2000  *
2001  * @deprecated Provided for compatibility with the 1.4 API.
2002  * @since New in 1.4.
2003  */
2005 svn_error_t *
2006 svn_client_log3(const apr_array_header_t *targets,
2007  const svn_opt_revision_t *peg_revision,
2008  const svn_opt_revision_t *start,
2009  const svn_opt_revision_t *end,
2010  int limit,
2011  svn_boolean_t discover_changed_paths,
2012  svn_boolean_t strict_node_history,
2013  svn_log_message_receiver_t receiver,
2014  void *receiver_baton,
2015  svn_client_ctx_t *ctx,
2016  apr_pool_t *pool);
2017 
2018 
2019 /**
2020  * Similar to svn_client_log3(), but with the @c kind field of
2021  * @a peg_revision set to @c svn_opt_revision_unspecified.
2022  *
2023  * @deprecated Provided for compatibility with the 1.3 API.
2024  * @since New in 1.2.
2025  */
2027 svn_error_t *
2028 svn_client_log2(const apr_array_header_t *targets,
2029  const svn_opt_revision_t *start,
2030  const svn_opt_revision_t *end,
2031  int limit,
2032  svn_boolean_t discover_changed_paths,
2033  svn_boolean_t strict_node_history,
2034  svn_log_message_receiver_t receiver,
2035  void *receiver_baton,
2036  svn_client_ctx_t *ctx,
2037  apr_pool_t *pool);
2038 
2039 
2040 /**
2041  * Similar to svn_client_log2(), but with @a limit set to 0, and the
2042  * following special case:
2043  *
2044  * Special case for repositories at revision 0:
2045  *
2046  * If @a start->kind is @c svn_opt_revision_head, and @a end->kind is
2047  * @c svn_opt_revision_number && @a end->number is @c 1, then handle an
2048  * empty (no revisions) repository specially: instead of erroring
2049  * because requested revision 1 when the highest revision is 0, just
2050  * invoke @a receiver on revision 0, passing @c NULL for changed paths and
2051  * empty strings for the author and date. This is because that
2052  * particular combination of @a start and @a end usually indicates the
2053  * common case of log invocation -- the user wants to see all log
2054  * messages from youngest to oldest, where the oldest commit is
2055  * revision 1. That works fine, except when there are no commits in
2056  * the repository, hence this special case.
2057  *
2058  * @deprecated Provided for backward compatibility with the 1.0 API.
2059  */
2061 svn_error_t *
2062 svn_client_log(const apr_array_header_t *targets,
2063  const svn_opt_revision_t *start,
2064  const svn_opt_revision_t *end,
2065  svn_boolean_t discover_changed_paths,
2066  svn_boolean_t strict_node_history,
2067  svn_log_message_receiver_t receiver,
2068  void *receiver_baton,
2069  svn_client_ctx_t *ctx,
2070  apr_pool_t *pool);
2071 
2072 /** @} */
2073 
2074 /**
2075  * @defgroup Blame Show modification information about lines in a file.
2076  *
2077  * @{
2078  */
2079 
2080 /**
2081  * Invoke @a receiver with @a receiver_baton on each line-blame item
2082  * associated with revision @a end of @a path_or_url, using @a start
2083  * as the default source of all blame. @a peg_revision indicates in
2084  * which revision @a path_or_url is valid. If @a peg_revision->kind
2085  * is @c svn_opt_revision_unspecified, then it defaults to @c
2086  * svn_opt_revision_head for URLs or @c svn_opt_revision_working for
2087  * WC targets.
2088  *
2089  * If @a start->kind or @a end->kind is @c svn_opt_revision_unspecified,
2090  * return the error @c SVN_ERR_CLIENT_BAD_REVISION. If either are @c
2091  * svn_opt_revision_working, return the error @c
2092  * SVN_ERR_UNSUPPORTED_FEATURE. If any of the revisions of @a
2093  * path_or_url have a binary mime-type, return the error @c
2094  * SVN_ERR_CLIENT_IS_BINARY_FILE, unless @a ignore_mime_type is TRUE,
2095  * in which case blame information will be generated regardless of the
2096  * MIME types of the revisions.
2097  *
2098  * Use @a diff_options to determine how to compare different revisions of the
2099  * target.
2100  *
2101  * If @a include_merged_revisions is TRUE, also return data based upon
2102  * revisions which have been merged to @a path_or_url.
2103  *
2104  * Use @a pool for any temporary allocation.
2105  *
2106  * @since New in 1.5.
2107  */
2108 svn_error_t *
2109 svn_client_blame4(const char *path_or_url,
2110  const svn_opt_revision_t *peg_revision,
2111  const svn_opt_revision_t *start,
2112  const svn_opt_revision_t *end,
2113  const svn_diff_file_options_t *diff_options,
2114  svn_boolean_t ignore_mime_type,
2115  svn_boolean_t include_merged_revisions,
2117  void *receiver_baton,
2118  svn_client_ctx_t *ctx,
2119  apr_pool_t *pool);
2120 
2121 /**
2122  * Similar to svn_client_blame4(), but with @a include_merged_revisions set
2123  * to FALSE, and using a @c svn_client_blame_receiver2_t as the receiver.
2124  *
2125  * @deprecated Provided for backwards compatibility with the 1.4 API.
2126  *
2127  * @since New in 1.4.
2128  */
2130 svn_error_t *
2131 svn_client_blame3(const char *path_or_url,
2132  const svn_opt_revision_t *peg_revision,
2133  const svn_opt_revision_t *start,
2134  const svn_opt_revision_t *end,
2135  const svn_diff_file_options_t *diff_options,
2136  svn_boolean_t ignore_mime_type,
2137  svn_client_blame_receiver_t receiver,
2138  void *receiver_baton,
2139  svn_client_ctx_t *ctx,
2140  apr_pool_t *pool);
2141 
2142 /**
2143  * Similar to svn_client_blame3(), but with @a diff_options set to
2144  * default options as returned by svn_diff_file_options_parse() and
2145  * @a ignore_mime_type set to FALSE.
2146  *
2147  * @deprecated Provided for backwards compatibility with the 1.3 API.
2148  *
2149  * @since New in 1.2.
2150  */
2152 svn_error_t *
2153 svn_client_blame2(const char *path_or_url,
2154  const svn_opt_revision_t *peg_revision,
2155  const svn_opt_revision_t *start,
2156  const svn_opt_revision_t *end,
2157  svn_client_blame_receiver_t receiver,
2158  void *receiver_baton,
2159  svn_client_ctx_t *ctx,
2160  apr_pool_t *pool);
2161 
2162 /**
2163  * Similar to svn_client_blame2() except that @a peg_revision is always
2164  * the same as @a end.
2165  *
2166  * @deprecated Provided for backward compatibility with the 1.1 API.
2167  */
2169 svn_error_t *
2170 svn_client_blame(const char *path_or_url,
2171  const svn_opt_revision_t *start,
2172  const svn_opt_revision_t *end,
2173  svn_client_blame_receiver_t receiver,
2174  void *receiver_baton,
2175  svn_client_ctx_t *ctx,
2176  apr_pool_t *pool);
2177 
2178 /** @} */
2179 
2180 /**
2181  * @defgroup Diff Generate differences between paths.
2182  *
2183  * @{
2184  */
2185 
2186 /**
2187  * Produce diff output which describes the delta between
2188  * @a path1/@a revision1 and @a path2/@a revision2. Print the output
2189  * of the diff to @a outfile, and any errors to @a errfile. @a path1
2190  * and @a path2 can be either working-copy paths or URLs.
2191  *
2192  * If @a relative_to_dir is not @c NULL, the @a original_path and
2193  * @a modified_path will have the @a relative_to_dir stripped from the
2194  * front of the respective paths. If @a relative_to_dir is @c NULL,
2195  * paths will not be modified. If @a relative_to_dir is not
2196  * @c NULL but @a relative_to_dir is not a parent path of the target,
2197  * an error is returned. Finally, if @a relative_to_dir is a URL, an
2198  * error will be returned.
2199  *
2200  * If either @a revision1 or @a revision2 has an `unspecified' or
2201  * unrecognized `kind', return @c SVN_ERR_CLIENT_BAD_REVISION.
2202  *
2203  * @a path1 and @a path2 must both represent the same node kind -- that
2204  * is, if @a path1 is a directory, @a path2 must also be, and if @a path1
2205  * is a file, @a path2 must also be.
2206  *
2207  * If @a depth is @c svn_depth_infinity, diff fully recursively.
2208  * Else if it is @c svn_depth_immediates, diff the named paths and
2209  * their file children (if any), and diff properties of
2210  * subdirectories, but do not descend further into the subdirectories.
2211  * Else if @c svn_depth_files, behave as if for @c svn_depth_immediates
2212  * except don't diff properties of subdirectories. If @c
2213  * svn_depth_empty, diff exactly the named paths but nothing
2214  * underneath them.
2215  *
2216  * Use @a ignore_ancestry to control whether or not items being
2217  * diffed will be checked for relatedness first. Unrelated items
2218  * are typically transmitted to the editor as a deletion of one thing
2219  * and the addition of another, but if this flag is TRUE, unrelated
2220  * items will be diffed as if they were related.
2221  *
2222  * If @a no_diff_deleted is TRUE, then no diff output will be
2223  * generated on deleted files.
2224  *
2225  * Generated headers are encoded using @a header_encoding.
2226  *
2227  * Diff output will not be generated for binary files, unless @a
2228  * ignore_content_type is TRUE, in which case diffs will be shown
2229  * regardless of the content types.
2230  *
2231  * @a diff_options (an array of <tt>const char *</tt>) is used to pass
2232  * additional command line options to the diff processes invoked to compare
2233  * files.
2234  *
2235  * The authentication baton cached in @a ctx is used to communicate with
2236  * the repository.
2237  *
2238  * @a changelists is an array of <tt>const char *</tt> changelist
2239  * names, used as a restrictive filter on items whose differences are
2240  * reported; that is, don't generate diffs about any item unless
2241  * it's a member of one of those changelists. If @a changelists is
2242  * empty (or altogether @c NULL), no changelist filtering occurs.
2243  *
2244  * @note Changelist filtering only applies to diffs in which at least
2245  * one side of the diff represents working copy data.
2246  *
2247  * @note @a header_encoding doesn't affect headers generated by external
2248  * diff programs.
2249  *
2250  * @note @a relative_to_dir doesn't affect the path index generated by
2251  * external diff programs.
2252  *
2253  * @since New in 1.5.
2254  */
2255 svn_error_t *
2256 svn_client_diff4(const apr_array_header_t *diff_options,
2257  const char *path1,
2258  const svn_opt_revision_t *revision1,
2259  const char *path2,
2260  const svn_opt_revision_t *revision2,
2261  const char *relative_to_dir,
2262  svn_depth_t depth,
2263  svn_boolean_t ignore_ancestry,
2264  svn_boolean_t no_diff_deleted,
2265  svn_boolean_t ignore_content_type,
2266  const char *header_encoding,
2267  apr_file_t *outfile,
2268  apr_file_t *errfile,
2269  const apr_array_header_t *changelists,
2270  svn_client_ctx_t *ctx,
2271  apr_pool_t *pool);
2272 
2273 
2274 /**
2275  * Similar to svn_client_diff4(), but with @a changelists passed as @c
2276  * NULL, and @a depth set according to @a recurse: if @a recurse is
2277  * TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is
2278  * FALSE, set @a depth to @c svn_depth_empty.
2279  *
2280  * @deprecated Provided for backward compatibility with the 1.4 API.
2281  *
2282  * @since New in 1.3.
2283  */
2285 svn_error_t *
2286 svn_client_diff3(const apr_array_header_t *diff_options,
2287  const char *path1,
2288  const svn_opt_revision_t *revision1,
2289  const char *path2,
2290  const svn_opt_revision_t *revision2,
2291  svn_boolean_t recurse,
2292  svn_boolean_t ignore_ancestry,
2293  svn_boolean_t no_diff_deleted,
2294  svn_boolean_t ignore_content_type,
2295  const char *header_encoding,
2296  apr_file_t *outfile,
2297  apr_file_t *errfile,
2298  svn_client_ctx_t *ctx,
2299  apr_pool_t *pool);
2300 
2301 
2302 /**
2303  * Similar to svn_client_diff3(), but with @a header_encoding set to
2304  * @c APR_LOCALE_CHARSET.
2305  *
2306  * @deprecated Provided for backward compatibility with the 1.2 API.
2307  *
2308  * @since New in 1.2.
2309  */
2311 svn_error_t *
2312 svn_client_diff2(const apr_array_header_t *diff_options,
2313  const char *path1,
2314  const svn_opt_revision_t *revision1,
2315  const char *path2,
2316  const svn_opt_revision_t *revision2,
2317  svn_boolean_t recurse,
2318  svn_boolean_t ignore_ancestry,
2319  svn_boolean_t no_diff_deleted,
2320  svn_boolean_t ignore_content_type,
2321  apr_file_t *outfile,
2322  apr_file_t *errfile,
2323  svn_client_ctx_t *ctx,
2324  apr_pool_t *pool);
2325 
2326 /**
2327  * Similar to svn_client_diff2(), but with @a ignore_content_type
2328  * always set to FALSE.
2329  *
2330  * @deprecated Provided for backward compatibility with the 1.0 API.
2331  */
2333 svn_error_t *
2334 svn_client_diff(const apr_array_header_t *diff_options,
2335  const char *path1,
2336  const svn_opt_revision_t *revision1,
2337  const char *path2,
2338  const svn_opt_revision_t *revision2,
2339  svn_boolean_t recurse,
2340  svn_boolean_t ignore_ancestry,
2341  svn_boolean_t no_diff_deleted,
2342  apr_file_t *outfile,
2343  apr_file_t *errfile,
2344  svn_client_ctx_t *ctx,
2345  apr_pool_t *pool);
2346 
2347 /**
2348  * Produce diff output which describes the delta between the
2349  * filesystem object @a path in peg revision @a peg_revision, as it
2350  * changed between @a start_revision and @a end_revision. @a path can
2351  * be either a working-copy path or URL.
2352  *
2353  * If @a peg_revision is @c svn_opt_revision_unspecified, behave
2354  * identically to svn_client_diff4(), using @a path for both of that
2355  * function's @a path1 and @a path2 argments.
2356  *
2357  * All other options are handled identically to svn_client_diff4().
2358  *
2359  * @since New in 1.5.
2360  */
2361 svn_error_t *
2362 svn_client_diff_peg4(const apr_array_header_t *diff_options,
2363  const char *path,
2364  const svn_opt_revision_t *peg_revision,
2365  const svn_opt_revision_t *start_revision,
2366  const svn_opt_revision_t *end_revision,
2367  const char *relative_to_dir,
2368  svn_depth_t depth,
2369  svn_boolean_t ignore_ancestry,
2370  svn_boolean_t no_diff_deleted,
2371  svn_boolean_t ignore_content_type,
2372  const char *header_encoding,
2373  apr_file_t *outfile,
2374  apr_file_t *errfile,
2375  const apr_array_header_t *changelists,
2376  svn_client_ctx_t *ctx,
2377  apr_pool_t *pool);
2378 
2379 /**
2380  * Similar to svn_client_diff_peg4(), but with @a changelists passed
2381  * as @c NULL, and @a depth set according to @a recurse: if @a recurse
2382  * is TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is
2383  * FALSE, set @a depth to @c svn_depth_files.
2384  *
2385  * @deprecated Provided for backward compatibility with the 1.4 API.
2386  *
2387  * @since New in 1.3.
2388  */
2390 svn_error_t *
2391 svn_client_diff_peg3(const apr_array_header_t *diff_options,
2392  const char *path,
2393  const svn_opt_revision_t *peg_revision,
2394  const svn_opt_revision_t *start_revision,
2395  const svn_opt_revision_t *end_revision,
2396  svn_boolean_t recurse,
2397  svn_boolean_t ignore_ancestry,
2398  svn_boolean_t no_diff_deleted,
2399  svn_boolean_t ignore_content_type,
2400  const char *header_encoding,
2401  apr_file_t *outfile,
2402  apr_file_t *errfile,
2403  svn_client_ctx_t *ctx,
2404  apr_pool_t *pool);
2405 
2406 /**
2407  * Similar to svn_client_diff_peg3(), but with @a header_encoding set to
2408  * @c APR_LOCALE_CHARSET.
2409  *
2410  * @deprecated Provided for backward compatibility with the 1.2 API.
2411  *
2412  * @since New in 1.2.
2413  */
2415 svn_error_t *
2416 svn_client_diff_peg2(const apr_array_header_t *diff_options,
2417  const char *path,
2418  const svn_opt_revision_t *peg_revision,
2419  const svn_opt_revision_t *start_revision,
2420  const svn_opt_revision_t *end_revision,
2421  svn_boolean_t recurse,
2422  svn_boolean_t ignore_ancestry,
2423  svn_boolean_t no_diff_deleted,
2424  svn_boolean_t ignore_content_type,
2425  apr_file_t *outfile,
2426  apr_file_t *errfile,
2427  svn_client_ctx_t *ctx,
2428  apr_pool_t *pool);
2429 
2430 /**
2431  * Similar to svn_client_diff_peg2(), but with @a ignore_content_type
2432  * always set to FALSE.
2433  *
2434  * @since New in 1.1.
2435  * @deprecated Provided for backward compatibility with the 1.1 API.
2436  */
2438 svn_error_t *
2439 svn_client_diff_peg(const apr_array_header_t *diff_options,
2440  const char *path,
2441  const svn_opt_revision_t *peg_revision,
2442  const svn_opt_revision_t *start_revision,
2443  const svn_opt_revision_t *end_revision,
2444  svn_boolean_t recurse,
2445  svn_boolean_t ignore_ancestry,
2446  svn_boolean_t no_diff_deleted,
2447  apr_file_t *outfile,
2448  apr_file_t *errfile,
2449  svn_client_ctx_t *ctx,
2450  apr_pool_t *pool);
2451 
2452 /**
2453  * Produce a diff summary which lists the changed items between
2454  * @a path1/@a revision1 and @a path2/@a revision2 without creating text
2455  * deltas. @a path1 and @a path2 can be either working-copy paths or URLs.
2456  *
2457  * The function may report false positives if @a ignore_ancestry is false,
2458  * since a file might have been modified between two revisions, but still
2459  * have the same contents.
2460  *
2461  * Calls @a summarize_func with @a summarize_baton for each difference
2462  * with a @c svn_client_diff_summarize_t structure describing the difference.
2463  *
2464  * See svn_client_diff4() for a description of the other parameters.
2465  *
2466  * @since New in 1.5.
2467  */
2468 svn_error_t *
2469 svn_client_diff_summarize2(const char *path1,
2470  const svn_opt_revision_t *revision1,
2471  const char *path2,
2472  const svn_opt_revision_t *revision2,
2473  svn_depth_t depth,
2474  svn_boolean_t ignore_ancestry,
2475  const apr_array_header_t *changelists,
2476  svn_client_diff_summarize_func_t summarize_func,
2477  void *summarize_baton,
2478  svn_client_ctx_t *ctx,
2479  apr_pool_t *pool);
2480 
2481 /**
2482  * Similar to svn_client_diff_summarize2(), but with @a changelists
2483  * passed as @c NULL, and @a depth set according to @a recurse: if @a
2484  * recurse is TRUE, set @a depth to @c svn_depth_infinity, if @a
2485  * recurse is FALSE, set @a depth to @c svn_depth_files.
2486  *
2487  * @deprecated Provided for backward compatibility with the 1.4 API.
2488  *
2489  * @since New in 1.4.
2490  */
2492 svn_error_t *
2493 svn_client_diff_summarize(const char *path1,
2494  const svn_opt_revision_t *revision1,
2495  const char *path2,
2496  const svn_opt_revision_t *revision2,
2497  svn_boolean_t recurse,
2498  svn_boolean_t ignore_ancestry,
2499  svn_client_diff_summarize_func_t summarize_func,
2500  void *summarize_baton,
2501  svn_client_ctx_t *ctx,
2502  apr_pool_t *pool);
2503 
2504 /**
2505  * Produce a diff summary which lists the changed items between the
2506  * filesystem object @a path in peg revision @a peg_revision, as it
2507  * changed between @a start_revision and @a end_revision. @a path can
2508  * be either a working-copy path or URL.
2509  *
2510  * If @a peg_revision is @c svn_opt_revision_unspecified, behave
2511  * identically to svn_client_diff_summarize2(), using @a path for both
2512  * of that function's @a path1 and @a path2 argments.
2513  *
2514  * The function may report false positives if @a ignore_ancestry is false,
2515  * as described in the documentation for svn_client_diff_summarize2().
2516  *
2517  * Call @a summarize_func with @a summarize_baton for each difference
2518  * with a @c svn_client_diff_summarize_t structure describing the difference.
2519  *
2520  * See svn_client_diff_peg4() for a description of the other parameters.
2521  *
2522  * @since New in 1.5.
2523  */
2524 svn_error_t *
2525 svn_client_diff_summarize_peg2(const char *path,
2526  const svn_opt_revision_t *peg_revision,
2527  const svn_opt_revision_t *start_revision,
2528  const svn_opt_revision_t *end_revision,
2529  svn_depth_t depth,
2530  svn_boolean_t ignore_ancestry,
2531  const apr_array_header_t *changelists,
2532  svn_client_diff_summarize_func_t summarize_func,
2533  void *summarize_baton,
2534  svn_client_ctx_t *ctx,
2535  apr_pool_t *pool);
2536 
2537 /**
2538  * Similar to svn_client_diff_summarize_peg2(), but with @a
2539  * changelists passed as @c NULL, and @a depth set according to @a
2540  * recurse: if @a recurse is TRUE, set @a depth to @c
2541  * svn_depth_infinity, if @a recurse is FALSE, set @a depth to @c
2542  * svn_depth_files.
2543  *
2544  * @deprecated Provided for backward compatibility with the 1.4 API.
2545  *
2546  * @since New in 1.4.
2547  */
2549 svn_error_t *
2550 svn_client_diff_summarize_peg(const char *path,
2551  const svn_opt_revision_t *peg_revision,
2552  const svn_opt_revision_t *start_revision,
2553  const svn_opt_revision_t *end_revision,
2554  svn_boolean_t recurse,
2555  svn_boolean_t ignore_ancestry,
2556  svn_client_diff_summarize_func_t summarize_func,
2557  void *summarize_baton,
2558  svn_client_ctx_t *ctx,
2559  apr_pool_t *pool);
2560 
2561 /** @} */
2562 
2563 /**
2564  * @defgroup Merge Merge changes between branches.
2565  *
2566  * @{
2567  */
2568 
2569 /** Merge changes from @a source1/@a revision1 to @a source2/@a revision2 into
2570  * the working-copy path @a target_wcpath.
2571  *
2572  * @a source1 and @a source2 are either URLs that refer to entries in the
2573  * repository, or paths to entries in the working copy.
2574  *
2575  * By "merging", we mean: apply file differences using
2576  * svn_wc_merge(), and schedule additions & deletions when appropriate.
2577  *
2578  * @a source1 and @a source2 must both represent the same node kind -- that
2579  * is, if @a source1 is a directory, @a source2 must also be, and if @a source1
2580  * is a file, @a source2 must also be.
2581  *
2582  * If either @a revision1 or @a revision2 has an `unspecified' or
2583  * unrecognized `kind', return @c SVN_ERR_CLIENT_BAD_REVISION.
2584  *
2585  * If @a depth is @c svn_depth_infinity, merge fully recursively.
2586  * Else if @c svn_depth_immediates, merge changes at most to files
2587  * that are immediate children of @a target_wcpath and to directory
2588  * properties of @a target_wcpath and its immediate subdirectory children.
2589  * Else if @c svn_depth_files, merge at most to immediate file
2590  * children of @a target_wcpath and to @a target_wcpath itself.
2591  * Else if @c svn_depth_empty, apply changes only to @a target_wcpath
2592  * (i.e., directory property changes only)
2593  *
2594  * If @a depth is @c svn_depth_unknown, use the depth of @a target_wcpath.
2595  *
2596  * Use @a ignore_ancestry to control whether or not items being
2597  * diffed will be checked for relatedness first. Unrelated items
2598  * are typically transmitted to the editor as a deletion of one thing
2599  * and the addition of another, but if this flag is TRUE, unrelated
2600  * items will be diffed as if they were related.
2601  *
2602  * If @a force is false and the merge involves deleting a file whose
2603  * content differs from the source-left version, or a locally modified
2604  * directory, or an unversioned item, then the operation will fail. If
2605  * @a force is true then all such items will be deleted.
2606  *
2607  * @a merge_options (an array of <tt>const char *</tt>), if non-NULL,
2608  * is used to pass additional command line arguments to the merge
2609  * processes (internal or external). @see
2610  * svn_diff_file_options_parse().
2611  *
2612  * If @a ctx->notify_func2 is non-NULL, then call @a ctx->notify_func2 with @a
2613  * ctx->notify_baton2 once for each merged target, passing the target's local
2614  * path.
2615  *
2616  * If @a record_only is TRUE, the merge isn't actually performed, but
2617  * the mergeinfo for the revisions which would've been merged is
2618  * recorded in the working copy (and must be subsequently committed
2619  * back to the repository).
2620  *
2621  * If @a dry_run is TRUE, the merge is carried out, and full notification
2622  * feedback is provided, but the working copy is not modified.
2623  *
2624  * The authentication baton cached in @a ctx is used to communicate with the
2625  * repository.
2626  *
2627  * @since New in 1.5.
2628  */
2629 svn_error_t *
2630 svn_client_merge3(const char *source1,
2631  const svn_opt_revision_t *revision1,
2632  const char *source2,
2633  const svn_opt_revision_t *revision2,
2634  const char *target_wcpath,
2635  svn_depth_t depth,
2636  svn_boolean_t ignore_ancestry,
2637  svn_boolean_t force,
2638  svn_boolean_t record_only,
2639  svn_boolean_t dry_run,
2640  const apr_array_header_t *merge_options,
2641  svn_client_ctx_t *ctx,
2642  apr_pool_t *pool);
2643 
2644 /**
2645  * Similar to svn_client_merge3(), but with @a record_only set to @c
2646  * FALSE, and @a depth set according to @a recurse: if @a recurse is
2647  * TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is
2648  * FALSE, set @a depth to @c svn_depth_files.
2649  *
2650  * @deprecated Provided for backward compatibility with the 1.4 API.
2651  *
2652  * @since New in 1.4.
2653  */
2655 svn_error_t *
2656 svn_client_merge2(const char *source1,
2657  const svn_opt_revision_t *revision1,
2658  const char *source2,
2659  const svn_opt_revision_t *revision2,
2660  const char *target_wcpath,
2661  svn_boolean_t recurse,
2662  svn_boolean_t ignore_ancestry,
2663  svn_boolean_t force,
2664  svn_boolean_t dry_run,
2665  const apr_array_header_t *merge_options,
2666  svn_client_ctx_t *ctx,
2667  apr_pool_t *pool);
2668 
2669 
2670 /**
2671  * Similar to svn_client_merge2(), but with @a merge_options set to NULL.
2672  *
2673  * @deprecated Provided for backwards compatibility with the 1.3 API.
2674  */
2676 svn_error_t *
2677 svn_client_merge(const char *source1,
2678  const svn_opt_revision_t *revision1,
2679  const char *source2,
2680  const svn_opt_revision_t *revision2,
2681  const char *target_wcpath,
2682  svn_boolean_t recurse,
2683  svn_boolean_t ignore_ancestry,
2684  svn_boolean_t force,
2685  svn_boolean_t dry_run,
2686  svn_client_ctx_t *ctx,
2687  apr_pool_t *pool);
2688 
2689 
2690 
2691 /**
2692  * Perform a reintegration merge of @a source at @a peg_revision
2693  * into @a target_wcpath.
2694  * @a target_wcpath must be a single-revision, @c svn_depth_infinity,
2695  * pristine, unswitched working copy -- in other words, it must
2696  * reflect a single revision tree, the "target". The mergeinfo on @a
2697  * source must reflect that all of the target has been merged into it.
2698  * Then this behaves like a merge with svn_client_merge3() from the
2699  * target's URL to the source.
2700  *
2701  * All other options are handled identically to svn_client_merge3().
2702  * The depth of the merge is always @c svn_depth_infinity.
2703  *
2704  * @since New in 1.5.
2705  */
2706 svn_error_t *
2707 svn_client_merge_reintegrate(const char *source,
2708  const svn_opt_revision_t *peg_revision,
2709  const char *target_wcpath,
2710  svn_boolean_t dry_run,
2711  const apr_array_header_t *merge_options,
2712  svn_client_ctx_t *ctx,
2713  apr_pool_t *pool);
2714 
2715 /**
2716  * Merge the changes between the filesystem object @a source in peg
2717  * revision @a peg_revision, as it changed between the ranges described
2718  * in @a ranges_to_merge.
2719  *
2720  * @a ranges_to_merge is an array of <tt>svn_opt_revision_range_t
2721  * *</tt> ranges. These ranges may describe additive and/or
2722  * subtractive merge ranges, they may overlap fully or partially,
2723  * and/or they may partially or fully negate each other. This
2724  * rangelist is not required to be sorted. If any revision in the
2725  * list of provided ranges has an `unspecified' or unrecognized
2726  * `kind', return @c SVN_ERR_CLIENT_BAD_REVISION.
2727  *
2728  * All other options are handled identically to svn_client_merge3().
2729  *
2730  * @since New in 1.5.
2731  */
2732 svn_error_t *
2733 svn_client_merge_peg3(const char *source,
2734  const apr_array_header_t *ranges_to_merge,
2735  const svn_opt_revision_t *peg_revision,
2736  const char *target_wcpath,
2737  svn_depth_t depth,
2738  svn_boolean_t ignore_ancestry,
2739  svn_boolean_t force,
2740  svn_boolean_t record_only,
2741  svn_boolean_t dry_run,
2742  const apr_array_header_t *merge_options,
2743  svn_client_ctx_t *ctx,
2744  apr_pool_t *pool);
2745 
2746 /**
2747  * Similar to svn_client_merge_peg3(), but with @a record_only set to
2748  * @c FALSE, and @a depth set according to @a recurse: if @a recurse
2749  * is TRUE, set @a depth to @c svn_depth_infinity, if @a recurse is
2750  * FALSE, set @a depth to @c svn_depth_files.
2751  *
2752  * @deprecated Provided for backwards compatibility with the 1.3 API.
2753  *
2754  * @since New in 1.4.
2755  */
2757 svn_error_t *
2758 svn_client_merge_peg2(const char *source,
2759  const svn_opt_revision_t *revision1,
2760  const svn_opt_revision_t *revision2,
2761  const svn_opt_revision_t *peg_revision,
2762  const char *target_wcpath,
2763  svn_boolean_t recurse,
2764  svn_boolean_t ignore_ancestry,
2765  svn_boolean_t force,
2766  svn_boolean_t dry_run,
2767  const apr_array_header_t *merge_options,
2768  svn_client_ctx_t *ctx,
2769  apr_pool_t *pool);
2770 
2771 /**
2772  * Similar to svn_client_merge_peg2(), but with @a merge_options set to
2773  * NULL.
2774  *
2775  * @deprecated Provided for backwards compatibility with the 1.3 API.
2776  *
2777  * @since New in 1.1.
2778  */
2780 svn_error_t *
2781 svn_client_merge_peg(const char *source,
2782  const svn_opt_revision_t *revision1,
2783  const svn_opt_revision_t *revision2,
2784  const svn_opt_revision_t *peg_revision,
2785  const char *target_wcpath,
2786  svn_boolean_t recurse,
2787  svn_boolean_t ignore_ancestry,
2788  svn_boolean_t force,
2789  svn_boolean_t dry_run,
2790  svn_client_ctx_t *ctx,
2791  apr_pool_t *pool);
2792 
2793 
2794 /** Set @a suggestions to an ordered array of @c const char *
2795  * potential merge sources (expressed as full repository URLs) for @a
2796  * path_or_url at @a peg_revision. @a path_or_url is a working copy
2797  * path or repository URL. @a ctx is a context used for
2798  * authentication in the repository case. Use @a pool for all
2799  * allocations.
2800  *
2801  * @since New in 1.5.
2802  */
2803 svn_error_t *
2804 svn_client_suggest_merge_sources(apr_array_header_t **suggestions,
2805  const char *path_or_url,
2806  const svn_opt_revision_t *peg_revision,
2807  svn_client_ctx_t *ctx,
2808  apr_pool_t *pool);
2809 
2810 
2811 /**
2812  * Set @a *mergeinfo to a hash mapping <tt>const char *</tt> merge
2813  * source URLs to <tt>apr_array_header_t *</tt> rangelists (arrays of
2814  * <tt>svn_merge_range_t *</tt> ranges) describing the ranges which
2815  * have been merged into @a path_or_url as of @a peg_revision, or @c
2816  * NULL if there is no mergeinfo.
2817  *
2818  * Use @a pool for all necessary allocations.
2819  *
2820  * If the server doesn't support retrieval of mergeinfo (which will
2821  * never happen for file:// URLs), return an @c
2822  * SVN_ERR_UNSUPPORTED_FEATURE error.
2823  *
2824  * @note Unlike most APIs which deal with mergeinfo, this one returns
2825  * data where the keys of the hash are absolute repository URLs rather
2826  * than repository filesystem paths.
2827  *
2828  * @since New in 1.5.
2829  */
2830 svn_error_t *
2831 svn_client_mergeinfo_get_merged(apr_hash_t **mergeinfo,
2832  const char *path_or_url,
2833  const svn_opt_revision_t *peg_revision,
2834  svn_client_ctx_t *ctx,
2835  apr_pool_t *pool);
2836 
2837 
2838 /**
2839  * Drive log entry callbacks @a receiver / @a receiver_baton with the
2840  * revisions merged from @a merge_source_path_or_url (as of @a
2841  * src_peg_revision) into @a path_or_url (as of @a peg_revision). @a
2842  * ctx is a context used for authentication.
2843  *
2844  * @a discover_changed_paths and @a revprops are the same as for
2845  * svn_client_log4(). Use @a pool for all necessary allocations.
2846  *
2847  * If the server doesn't support retrieval of mergeinfo, return an @c
2848  * SVN_ERR_UNSUPPORTED_FEATURE error.
2849  *
2850  * @since New in 1.5.
2851  */
2852 svn_error_t *
2853 svn_client_mergeinfo_log_merged(const char *path_or_url,
2854  const svn_opt_revision_t *peg_revision,
2855  const char *merge_source_path_or_url,
2856  const svn_opt_revision_t *src_peg_revision,
2857  svn_log_entry_receiver_t receiver,
2858  void *receiver_baton,
2859  svn_boolean_t discover_changed_paths,
2860  const apr_array_header_t *revprops,
2861  svn_client_ctx_t *ctx,
2862  apr_pool_t *pool);
2863 
2864 /**
2865  * Drive log entry callbacks @a receiver / @a receiver_baton with the
2866  * revisions eligible for merge from @a merge_source_path_or_url (as
2867  * of @a src_peg_revision) into @a path_or_url (as of @a
2868  * peg_revision). @a ctx is a context used for authentication.
2869  *
2870  * @a discover_changed_paths and @a revprops are the same as for
2871  * svn_client_log4(). Use @a pool for all necessary allocations.
2872  *
2873  * If the server doesn't support retrieval of mergeinfo, return an @c
2874  * SVN_ERR_UNSUPPORTED_FEATURE error.
2875  *
2876  * @since New in 1.5.
2877  */
2878 svn_error_t *
2879 svn_client_mergeinfo_log_eligible(const char *path_or_url,
2880  const svn_opt_revision_t *peg_revision,
2881  const char *merge_source_path_or_url,
2882  const svn_opt_revision_t *src_peg_revision,
2883  svn_log_entry_receiver_t receiver,
2884  void *receiver_baton,
2885  svn_boolean_t discover_changed_paths,
2886  const apr_array_header_t *revprops,
2887  svn_client_ctx_t *ctx,
2888  apr_pool_t *pool);
2889 
2890 /** @} */
2891 
2892 /**
2893  * @defgroup Cleanup Cleanup an abnormally terminated working copy.
2894  *
2895  * @{
2896  */
2897 
2898 /** Recursively cleanup a working copy directory @a dir, finishing any
2899  * incomplete operations, removing lockfiles, etc.
2900  *
2901  * If @a ctx->cancel_func is non-NULL, invoke it with @a
2902  * ctx->cancel_baton at various points during the operation. If it
2903  * returns an error (typically SVN_ERR_CANCELLED), return that error
2904  * immediately.
2905  */
2906 svn_error_t *
2907 svn_client_cleanup(const char *dir,
2908  svn_client_ctx_t *ctx,
2909  apr_pool_t *pool);
2910 
2911 
2912 /** @} */
2913 
2914 /**
2915  * @defgroup Relocate Switch a working copy to a different repository.
2916  *
2917  * @{
2918  */
2919 
2920 /**
2921  * Modify a working copy directory @a dir, changing any
2922  * repository URLs that begin with @a from to begin with @a to instead,
2923  * recursing into subdirectories if @a recurse is TRUE.
2924  *
2925  * @param dir Working copy directory
2926  * @param from Original URL
2927  * @param to New URL
2928  * @param recurse Whether to recurse
2929  * @param ctx svn_client_ctx_t
2930  * @param pool The pool from which to perform memory allocations
2931  */
2932 svn_error_t *
2933 svn_client_relocate(const char *dir,
2934  const char *from,
2935  const char *to,
2936  svn_boolean_t recurse,
2937  svn_client_ctx_t *ctx,
2938  apr_pool_t *pool);
2939 
2940 
2941 /** @} */
2942 
2943 /**
2944  * @defgroup Revert Remove local changes in a repository.
2945  *
2946  * @{
2947  */
2948 
2949 /**
2950  * Restore the pristine version of a working copy @a paths,
2951  * effectively undoing any local mods. For each path in @a paths,
2952  * revert it if it is a file. Else if it is a directory, revert
2953  * according to @a depth:
2954  *
2955  * If @a depth is @c svn_depth_empty, revert just the properties on
2956  * the directory; else if @c svn_depth_files, revert the properties
2957  * and any files immediately under the directory; else if
2958  * @c svn_depth_immediates, revert all of the preceding plus
2959  * properties on immediate subdirectories; else if @c svn_depth_infinity,
2960  * revert path and everything under it fully recursively.
2961  *
2962  * @a changelists is an array of <tt>const char *</tt> changelist
2963  * names, used as a restrictive filter on items reverted; that is,
2964  * don't revert any item unless it's a member of one of those
2965  * changelists. If @a changelists is empty (or altogether @c NULL),
2966  * no changelist filtering occurs.
2967  *
2968  * If @a ctx->notify_func2 is non-NULL, then for each item reverted,
2969  * call @a ctx->notify_func2 with @a ctx->notify_baton2 and the path of
2970  * the reverted item.
2971  *
2972  * If an item specified for reversion is not under version control,
2973  * then do not error, just invoke @a ctx->notify_func2 with @a
2974  * ctx->notify_baton2, using notification code @c svn_wc_notify_skip.
2975  *
2976  * @since New in 1.5.
2977  */
2978 svn_error_t *
2979 svn_client_revert2(const apr_array_header_t *paths,
2980  svn_depth_t depth,
2981  const apr_array_header_t *changelists,
2982  svn_client_ctx_t *ctx,
2983  apr_pool_t *pool);
2984 
2985 
2986 /**
2987  * Similar to svn_client_revert2(), but with @a changelists passed as
2988  * @c NULL, and @a depth set according to @a recurse: if @a recurse is
2989  * TRUE, @a depth is @c svn_depth_infinity, else if @a recurse is
2990  * FALSE, @a depth is @c svn_depth_empty.
2991  *
2992  * @note Most APIs map @a recurse==FALSE to @a depth==svn_depth_files;
2993  * revert is deliberately different.
2994  *
2995  * @deprecated Provided for backwards compatibility with the 1.0 API.
2996  */
2998 svn_error_t *
2999 svn_client_revert(const apr_array_header_t *paths,
3000  svn_boolean_t recursive,
3001  svn_client_ctx_t *ctx,
3002  apr_pool_t *pool);
3003 
3004 
3005 /** @} */
3006 
3007 /**
3008  * @defgroup Resolved Mark conflicted paths as resolved.
3009  *
3010  * @{
3011  */
3012 
3013 /**
3014  * Similar to svn_client_resolve(), but without automatic conflict
3015  * resolution support.
3016  *
3017  * @deprecated Provided for backward compatibility with the 1.4 API.
3018  * Use svn_client_resolve() instead.
3019  */
3021 svn_error_t *
3022 svn_client_resolved(const char *path,
3023  svn_boolean_t recursive,
3024  svn_client_ctx_t *ctx,
3025  apr_pool_t *pool);
3026 
3027 /** Perform automatic conflict resolution on a working copy @a path.
3028  *
3029  * If @a depth is @c svn_depth_empty, act only on @a path; if
3030  * @c svn_depth_files, resolve @a path and its conflicted file
3031  * children (if any); if @c svn_depth_immediates, resolve @a path and
3032  * all its immediate conflicted children (both files and directories,
3033  * if any); if @c svn_depth_infinity, resolve @a path and every
3034  * conflicted file or directory anywhere beneath it.
3035  * Note that this operation will try to lock the parent directory of
3036  * @a path in order to be able to resolve tree-conflicts on @a path.
3037  *
3038  * If @a conflict_choice is @c svn_wc_conflict_choose_base, resolve the
3039  * conflict with the old file contents; if
3040  * @c svn_wc_conflict_choose_mine_full, use the original working contents;
3041  * if @c svn_wc_conflict_choose_theirs_full, the new contents; and if
3042  * @c svn_wc_conflict_choose_merged, don't change the contents at all,
3043  * just remove the conflict status, which is the pre-1.5 behavior.
3044  *
3045  * @c svn_wc_conflict_choose_theirs_conflict and @c
3046  * svn_wc_conflict_choose_mine_conflict are not legal for binary
3047  * files or properties.
3048  *
3049  * If @a path is not in a state of conflict to begin with, do nothing.
3050  * If @a path's conflict state is removed and @a ctx->notify_func2 is non-NULL,
3051  * call @a ctx->notify_func2 with @a ctx->notify_baton2 and @a path.
3052  *
3053  * @since New in 1.5.
3054  */
3055 svn_error_t *
3056 svn_client_resolve(const char *path,
3057  svn_depth_t depth,
3058  svn_wc_conflict_choice_t conflict_choice,
3059  svn_client_ctx_t *ctx,
3060  apr_pool_t *pool);
3061 
3062 
3063 /** @} */
3064 
3065 /**
3066  * @defgroup Copy Copy paths in the working copy and repository.
3067  *
3068  * @{
3069  */
3070 
3071 /**
3072  * A structure which describes the source of a copy operation--its path,
3073  * revision, and peg revision.
3074  *
3075  * @since New in 1.5.
3076  */
3078 {
3079  /** The source path or URL. */
3080  const char *path;
3081 
3082  /** The source operational revision. */
3084 
3085  /** The source peg revision. */
3088 
3089 /** Copy each @a src in @a sources to @a dst_path.
3090  *
3091  * If multiple @a sources are given, @a dst_path must be a directory,
3092  * and @a sources will be copied as children of @a dst_path.
3093  *
3094  * @a sources must be an array of elements of type
3095  * <tt>svn_client_copy_source_t *</tt>.
3096  *
3097  * Each @a src in @a sources must be files or directories under version control,
3098  * or URLs of a versioned item in the repository. If @a sources has multiple
3099  * items, the @a src members must be all repository URLs or all working copy
3100  * paths.
3101  *
3102  * The parent of @a dst_path must already exist.
3103  *
3104  * If @a sources has only one item, attempt to copy it to @a dst_path. If
3105  * @a copy_as_child is TRUE and @a dst_path already exists, attempt to copy the
3106  * item as a child of @a dst_path. If @a copy_as_child is FALSE and
3107  * @a dst_path already exists, fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path
3108  * is a working copy path and @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
3109  * URL.
3110  *
3111  * If @a sources has multiple items, and @a copy_as_child is TRUE, all
3112  * @a sources are copied as children of @a dst_path. If any child of
3113  * @a dst_path already exists with the same name any item in @a sources,
3114  * fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
3115  * @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
3116  *
3117  * If @a sources has multiple items, and @a copy_as_child is FALSE, fail
3118  * with @c SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
3119  *
3120  * If @a dst_path is a URL, use the authentication baton
3121  * in @a ctx and @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to immediately
3122  * attempt to commit the copy action in the repository. If the commit
3123  * succeeds, allocate (in @a pool) and populate @a *commit_info_p. If
3124  * @a dst_path is not a URL, and the copy succeeds, set @a
3125  * *commit_info_p to @c NULL.
3126  *
3127  * If @a dst_path is not a URL, then this is just a variant of
3128  * svn_client_add(), where the @a sources are scheduled for addition
3129  * as copies. No changes will happen to the repository until a commit occurs.
3130  * This scheduling can be removed with svn_client_revert2().
3131  *
3132  * If @a make_parents is TRUE, create any non-existent parent directories
3133  * also.
3134  *
3135  * If @a ignore_externals is set, don't process externals definitions
3136  * as part of this operation.
3137  *
3138  * If non-NULL, @a revprop_table is a hash table holding additional,
3139  * custom revision properties (<tt>const char *</tt> names mapped to
3140  * <tt>svn_string_t *</tt> values) to be set on the new revision in
3141  * the event that this is a committing operation. This table cannot
3142  * contain any standard Subversion properties.
3143  *
3144  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo
3145  * that this function can use to query for a commit log message when one is
3146  * needed.
3147  *
3148  * If @a ctx->notify_func2 is non-NULL, invoke it with @a ctx->notify_baton2
3149  * for each item added at the new location, passing the new, relative path of
3150  * the added item.
3151  *
3152  * @since New in 1.6.
3153  */
3154 svn_error_t *
3155 svn_client_copy5(svn_commit_info_t **commit_info_p,
3156  apr_array_header_t *sources,
3157  const char *dst_path,
3158  svn_boolean_t copy_as_child,
3159  svn_boolean_t make_parents,
3160  svn_boolean_t ignore_externals,
3161  const apr_hash_t *revprop_table,
3162  svn_client_ctx_t *ctx,
3163  apr_pool_t *pool);
3164 
3165 /**
3166  * Similar to svn_client_copy5(), with @a ignore_externals set to @c FALSE.
3167  *
3168  * @since New in 1.5.
3169  *
3170  * @deprecated Provided for backward compatibility with the 1.5 API.
3171  */
3173 svn_error_t *
3174 svn_client_copy4(svn_commit_info_t **commit_info_p,
3175  apr_array_header_t *sources,
3176  const char *dst_path,
3177  svn_boolean_t copy_as_child,
3178  svn_boolean_t make_parents,
3179  const apr_hash_t *revprop_table,
3180  svn_client_ctx_t *ctx,
3181  apr_pool_t *pool);
3182 
3183 /**
3184  * Similar to svn_client_copy4(), with only one @a src_path, @a
3185  * copy_as_child set to @c FALSE, @a revprop_table passed as NULL, and
3186  * @a make_parents set to @c FALSE. Also, use @a src_revision as both
3187  * the operational and peg revision.
3188  *
3189  * @since New in 1.4.
3190  *
3191  * @deprecated Provided for backward compatibility with the 1.4 API.
3192  */
3194 svn_error_t *
3195 svn_client_copy3(svn_commit_info_t **commit_info_p,
3196  const char *src_path,
3197  const svn_opt_revision_t *src_revision,
3198  const char *dst_path,
3199  svn_client_ctx_t *ctx,
3200  apr_pool_t *pool);
3201 
3202 
3203 /**
3204  * Similar to svn_client_copy3(), with the difference that if @a dst_path
3205  * already exists and is a directory, copy the item into that directory,
3206  * keeping its name (the last component of @a src_path).
3207  *
3208  * @since New in 1.3.
3209  *
3210  * @deprecated Provided for backward compatibility with the 1.3 API.
3211  */
3213 svn_error_t *
3214 svn_client_copy2(svn_commit_info_t **commit_info_p,
3215  const char *src_path,
3216  const svn_opt_revision_t *src_revision,
3217  const char *dst_path,
3218  svn_client_ctx_t *ctx,
3219  apr_pool_t *pool);
3220 
3221 
3222 /**
3223  * Similar to svn_client_copy2(), but uses @c svn_client_commit_info_t
3224  * for @a commit_info_p.
3225  *
3226  * @deprecated Provided for backward compatibility with the 1.2 API.
3227  */
3229 svn_error_t *
3231  const char *src_path,
3232  const svn_opt_revision_t *src_revision,
3233  const char *dst_path,
3234  svn_client_ctx_t *ctx,
3235  apr_pool_t *pool);
3236 
3237 
3238 /** @} */
3239 
3240 /**
3241  * @defgroup Move Move paths in the working copy or repository.
3242  *
3243  * @{
3244  */
3245 
3246 /**
3247  * Move @a src_paths to @a dst_path.
3248  *
3249  * @a src_paths must be files or directories under version control, or
3250  * URLs of versioned items in the repository. All @a src_paths must be of
3251  * the same type. If multiple @a src_paths are given, @a dst_path must be
3252  * a directory and @a src_paths will be moved as children of @a dst_path.
3253  *
3254  * If @a src_paths are repository URLs:
3255  *
3256  * - @a dst_path must also be a repository URL.
3257  *
3258  * - The authentication baton in @a ctx and @a ctx->log_msg_func/@a
3259  * ctx->log_msg_baton are used to commit the move.
3260  *
3261  * - The move operation will be immediately committed. If the
3262  * commit succeeds, allocate (in @a pool) and populate @a *commit_info_p.
3263  *
3264  * If @a src_paths are working copy paths:
3265  *
3266  * - @a dst_path must also be a working copy path.
3267  *
3268  * - @a ctx->log_msg_func3 and @a ctx->log_msg_baton3 are ignored.
3269  *
3270  * - This is a scheduling operation. No changes will happen to the
3271  * repository until a commit occurs. This scheduling can be removed
3272  * with svn_client_revert2(). If one of @a src_paths is a file it is
3273  * removed from the working copy immediately. If one of @a src_path
3274  * is a directory it will remain in the working copy but all the files,
3275  * and unversioned items, it contains will be removed.
3276  *
3277  * - If one of @a src_paths contains locally modified and/or unversioned
3278  * items and @a force is not set, the move will fail. If @a force is set
3279  * such items will be removed.
3280  *
3281  * - If the move succeeds, set @a *commit_info_p to @c NULL.
3282  *
3283  * The parent of @a dst_path must already exist.
3284  *
3285  * If @a src_paths has only one item, attempt to move it to @a dst_path. If
3286  * @a move_as_child is TRUE and @a dst_path already exists, attempt to move the
3287  * item as a child of @a dst_path. If @a move_as_child is FALSE and
3288  * @a dst_path already exists, fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path
3289  * is a working copy path and @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a
3290  * URL.
3291  *
3292  * If @a src_paths has multiple items, and @a move_as_child is TRUE, all
3293  * @a src_paths are moved as children of @a dst_path. If any child of
3294  * @a dst_path already exists with the same name any item in @a src_paths,
3295  * fail with @c SVN_ERR_ENTRY_EXISTS if @a dst_path is a working copy path and
3296  * @c SVN_ERR_FS_ALREADY_EXISTS if @a dst_path is a URL.
3297  *
3298  * If @a src_paths has multiple items, and @a move_as_child is FALSE, fail
3299  * with @c SVN_ERR_CLIENT_MULTIPLE_SOURCES_DISALLOWED.
3300  *
3301  * If @a make_parents is TRUE, create any non-existent parent directories
3302  * also.
3303  *
3304  * If non-NULL, @a revprop_table is a hash table holding additional,
3305  * custom revision properties (<tt>const char *</tt> names mapped to
3306  * <tt>svn_string_t *</tt> values) to be set on the new revision in
3307  * the event that this is a committing operation. This table cannot
3308  * contain any standard Subversion properties.
3309  *
3310  * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 are a callback/baton combo that
3311  * this function can use to query for a commit log message when one is needed.
3312  *
3313  * If @a ctx->notify_func2 is non-NULL, then for each item moved, call
3314  * @a ctx->notify_func2 with the @a ctx->notify_baton2 twice, once to indicate
3315  * the deletion of the moved thing, and once to indicate the addition of
3316  * the new location of the thing.
3317  *
3318  * ### Is this really true? What about svn_wc_notify_commit_replaced()? ###
3319  *
3320  * @since New in 1.5.
3321  */
3322 svn_error_t *
3323 svn_client_move5(svn_commit_info_t **commit_info_p,
3324  apr_array_header_t *src_paths,
3325  const char *dst_path,
3326  svn_boolean_t force,
3327  svn_boolean_t move_as_child,
3328  svn_boolean_t make_parents,
3329  const apr_hash_t *revprop_table,
3330  svn_client_ctx_t *ctx,
3331  apr_pool_t *pool);
3332 
3333 /**
3334  * Similar to svn_client_move5(), with only one @a src_path, @a
3335  * move_as_child set to @c FALSE, @a revprop_table passed as NULL, and
3336  * @a make_parents set to @c FALSE.
3337  *
3338  * @since New in 1.4.
3339  *
3340  * @deprecated Provided for backward compatibility with the 1.4 API.
3341  */
3343 svn_error_t *
3344 svn_client_move4(svn_commit_info_t **commit_info_p,
3345  const char *src_path,
3346  const char *dst_path,
3347  svn_boolean_t force,
3348  svn_client_ctx_t *ctx,
3349  apr_pool_t *pool);
3350 
3351 /**
3352  * Similar to svn_client_move4(), with the difference that if @a dst_path
3353  * already exists and is a directory, move the item into that directory,
3354  * keeping its name (the last component of @a src_path).
3355  *
3356  * @since New in 1.3.
3357  *
3358  * @deprecated Provided for backward compatibility with the 1.3 API.
3359  */
3361 svn_error_t *
3362 svn_client_move3(svn_commit_info_t **commit_info_p,
3363  const char *src_path,
3364  const char *dst_path,
3365  svn_boolean_t force,
3366  svn_client_ctx_t *ctx,
3367  apr_pool_t *pool);
3368 
3369 /**
3370  * Similar to svn_client_move3(), but uses @c svn_client_commit_info_t
3371  * for @a commit_info_p.
3372  *
3373  * @deprecated Provided for backward compatibility with the 1.2 API.
3374  *
3375  * @since New in 1.2.
3376  */
3378 svn_error_t *
3380  const char *src_path,
3381  const char *dst_path,
3382  svn_boolean_t force,
3383  svn_client_ctx_t *ctx,
3384  apr_pool_t *pool);
3385 
3386 /**
3387  * Similar to svn_client_move2(), but an extra argument @a src_revision
3388  * must be passed. This has no effect, but must be of kind
3389  * @c svn_opt_revision_unspecified or @c svn_opt_revision_head,
3390  * otherwise error @c SVN_ERR_UNSUPPORTED_FEATURE is returned.
3391  *
3392  * @deprecated Provided for backward compatibility with the 1.1 API.
3393  */
3395 svn_error_t *
3397  const char *src_path,
3398  const svn_opt_revision_t *src_revision,
3399  const char *dst_path,
3400  svn_boolean_t force,
3401  svn_client_ctx_t *ctx,
3402  apr_pool_t *pool);
3403 
3404 /** @} */
3405 
3406 
3407 /** Properties
3408  *
3409  * Note that certain svn-controlled properties must always have their
3410  * values set and stored in UTF8 with LF line endings. When
3411  * retrieving these properties, callers must convert the values back
3412  * to native locale and native line-endings before displaying them to
3413  * the user. For help with this task, see
3414  * svn_prop_needs_translation(), svn_subst_translate_string(), and
3415  * svn_subst_detranslate_string().
3416  *
3417  * @defgroup svn_client_prop_funcs Property functions
3418  * @{
3419  */
3420 
3421 
3422 /**
3423  * Set @a propname to @a propval on @a target.
3424  * A @a propval of @c NULL will delete the property.
3425  *
3426  * If @a depth is @c svn_depth_empty, set the property on @a target
3427  * only; if @c svn_depth_files, set it on @a target and its file
3428  * children (if any); if @c svn_depth_immediates, on @a target and all
3429  * of its immediate children (both files and directories); if
3430  * @c svn_depth_infinity, on @a target and everything beneath it.
3431  *
3432  * The @a target may only be an URL if @a base_revision_for_url is not
3433  * @c SVN_INVALID_REVNUM; in this case, the property will only be set
3434  * if it has not changed since revision @a base_revision_for_url.
3435  * @a base_revision_for_url must be @c SVN_INVALID_REVNUM if @a target
3436  * is not an URL. @a depth deeper than @c svn_depth_empty is not
3437  * supported on URLs. The authentication baton in @a ctx and @a
3438  * ctx->log_msg_func3/@a ctx->log_msg_baton3 will be used to
3439  * immediately attempt to commit the property change in the
3440  * repository. If the commit succeeds, allocate (in @a pool) and
3441  * populate @a *commit_info_p.
3442  *
3443  * If @a propname is an svn-controlled property (i.e. prefixed with
3444  * @c SVN_PROP_PREFIX), then the caller is responsible for ensuring that
3445  * the value is UTF8-encoded and uses LF line-endings.
3446  *
3447  * If @a skip_checks is TRUE, do no validity checking. But if @a
3448  * skip_checks is FALSE, and @a propname is not a valid property for @a
3449  * target, return an error, either @c SVN_ERR_ILLEGAL_TARGET (if the
3450  * property is not appropriate for @a target), or @c
3451  * SVN_ERR_BAD_MIME_TYPE (if @a propname is "svn:mime-type", but @a
3452  * propval is not a valid mime-type).
3453  *
3454  * @a changelists is an array of <tt>const char *</tt> changelist
3455  * names, used as a restrictive filter on items whose properties are
3456  * set; that is, don't set properties on any item unless it's a member
3457  * of one of those changelists. If @a changelists is empty (or
3458  * altogether @c NULL), no changelist filtering occurs.
3459  *
3460  * If non-NULL, @a revprop_table is a hash table holding additional,
3461  * custom revision properties (<tt>const char *</tt> names mapped to
3462  * <tt>svn_string_t *</tt> values) to be set on the new revision in
3463  * the event that this is a committing operation. This table cannot
3464  * contain any standard Subversion properties.
3465  *
3466  * If @a ctx->cancel_func is non-NULL, invoke it passing @a
3467  * ctx->cancel_baton at various places during the operation.
3468  *
3469  * Use @a pool for all memory allocation.
3470  *
3471  * @since New in 1.5.
3472  */
3473 svn_error_t *
3474 svn_client_propset3(svn_commit_info_t **commit_info_p,
3475  const char *propname,
3476  const svn_string_t *propval,
3477  const char *target,
3478  svn_depth_t depth,
3479  svn_boolean_t skip_checks,
3480  svn_revnum_t base_revision_for_url,
3481  const apr_array_header_t *changelists,
3482  const apr_hash_t *revprop_table,
3483  svn_client_ctx_t *ctx,
3484  apr_pool_t *pool);
3485 
3486 /**
3487  * Like svn_client_propset3(), but with @a base_revision_for_url
3488  * always @c SVN_INVALID_REVNUM; @a commit_info_p always @c NULL; @a
3489  * changelists always @c NULL; @a revprop_table always @c NULL; and @a
3490  * depth set according to @a recurse: if @a recurse is TRUE, @a depth
3491  * is @c svn_depth_infinity, else @c svn_depth_empty.
3492  *
3493  * @deprecated Provided for backward compatibility with the 1.4 API.
3494  */
3496 svn_error_t *
3497 svn_client_propset2(const char *propname,
3498  const svn_string_t *propval,
3499  const char *target,
3500  svn_boolean_t recurse,
3501  svn_boolean_t skip_checks,
3502  svn_client_ctx_t *ctx,
3503  apr_pool_t *pool);
3504 
3505 /**
3506  * Like svn_client_propset2(), but with @a skip_checks always FALSE and a
3507  * newly created @a ctx.
3508  *
3509  * @deprecated Provided for backward compatibility with the 1.1 API.
3510  */
3512 svn_error_t *
3513 svn_client_propset(const char *propname,
3514  const svn_string_t *propval,
3515  const char *target,
3516  svn_boolean_t recurse,
3517  apr_pool_t *pool);
3518 
3519 /** Set @a propname to @a propval on revision @a revision in the repository
3520  * represented by @a URL. Use the authentication baton in @a ctx for
3521  * authentication, and @a pool for all memory allocation. Return the actual
3522  * rev affected in @a *set_rev. A @a propval of @c NULL will delete the
3523  * property.
3524  *
3525  * If @a original_propval is non-NULL, then just before setting the
3526  * new value, check that the old value matches @a original_propval;
3527  * if they do not match, return the error @c SVN_ERR_RA_OUT_OF_DATE.
3528  * This is to help clients support interactive editing of revprops:
3529  * without this check, the window during which the property may change
3530  * underneath the user is as wide as the amount of time the user
3531  * spends editing the property. With this check, the window is
3532  * reduced to a small, constant amount of time right before we set the
3533  * new value. (To check that an old value is still non-existent, set
3534  * @a original_propval->data to NULL, and @a original_propval->len is
3535  * ignored.)
3536  *
3537  * If @a force is TRUE, allow newlines in the author property.
3538  *
3539  * If @a propname is an svn-controlled property (i.e. prefixed with
3540  * @c SVN_PROP_PREFIX), then the caller is responsible for ensuring that
3541  * the value UTF8-encoded and uses LF line-endings.
3542  *
3543  * Note that unlike its cousin svn_client_propset3(), this routine
3544  * doesn't affect the working copy at all; it's a pure network
3545  * operation that changes an *unversioned* property attached to a
3546  * revision. This can be used to tweak log messages, dates, authors,
3547  * and the like. Be careful: it's a lossy operation.
3548 
3549  * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
3550  * functions and baton which are called upon successful setting of the
3551  * property.
3552  *
3553  * Also note that unless the administrator creates a
3554  * pre-revprop-change hook in the repository, this feature will fail.
3555  *
3556  * @since New in 1.6.
3557  */
3558 svn_error_t *
3559 svn_client_revprop_set2(const char *propname,
3560  const svn_string_t *propval,
3561  const svn_string_t *original_propval,
3562  const char *URL,
3563  const svn_opt_revision_t *revision,
3564  svn_revnum_t *set_rev,
3565  svn_boolean_t force,
3566  svn_client_ctx_t *ctx,
3567  apr_pool_t *pool);
3568 
3569 /**
3570  * Similar to svn_client_revprop_set2(), but with @a original_propval
3571  * always @c NULL.
3572  *
3573  * @deprecated Provided for backward compatibility with the 1.0 API.
3574  */
3576 svn_error_t *
3577 svn_client_revprop_set(const char *propname,
3578  const svn_string_t *propval,
3579  const char *URL,
3580  const svn_opt_revision_t *revision,
3581  svn_revnum_t *set_rev,
3582  svn_boolean_t force,
3583  svn_client_ctx_t *ctx,
3584  apr_pool_t *pool);
3585 
3586 /**
3587  * Set @a *props to a hash table whose keys are `<tt>char *</tt>' paths,
3588  * prefixed by @a target (a working copy path or a URL), of items on
3589  * which property @a propname is set, and whose values are `@c svn_string_t
3590  * *' representing the property value for @a propname at that path.
3591  *
3592  * Allocate @a *props, its keys, and its values in @a pool.
3593  *
3594  * Don't store any path, not even @a target, if it does not have a
3595  * property named @a propname.
3596  *
3597  * If @a revision->kind is @c svn_opt_revision_unspecified, then: get
3598  * properties from the working copy if @a target is a working copy
3599  * path, or from the repository head if @a target is a URL. Else get
3600  * the properties as of @a revision. The actual node revision
3601  * selected is determined by the path as it exists in @a peg_revision.
3602  * If @a peg_revision->kind is @c svn_opt_revision_unspecified, then
3603  * it defaults to @c svn_opt_revision_head for URLs or @c
3604  * svn_opt_revision_working for WC targets. Use the authentication
3605  * baton in @a ctx for authentication if contacting the repository.
3606  * If @a actual_revnum is not @c NULL, the actual revision number used
3607  * for the fetch is stored in @a *actual_revnum.
3608  *
3609  * If @a depth is @c svn_depth_empty, fetch the property from
3610  * @a target only; if @c svn_depth_files, fetch from @a target and its
3611  * file children (if any); if @c svn_depth_immediates, from @a target
3612  * and all of its immediate children (both files and directories); if
3613  * @c svn_depth_infinity, from @a target and everything beneath it.
3614  *
3615  * @a changelists is an array of <tt>const char *</tt> changelist
3616  * names, used as a restrictive filter on items whose properties are
3617  * set; that is, don't set properties on any item unless it's a member
3618  * of one of those changelists. If @a changelists is empty (or
3619  * altogether @c NULL), no changelist filtering occurs.
3620  *
3621  * If error, don't touch @a *props, otherwise @a *props is a hash table
3622  * even if empty.
3623  *
3624  * @since New in 1.5.
3625  */
3626 svn_error_t *
3627 svn_client_propget3(apr_hash_t **props,
3628  const char *propname,
3629  const char *target,
3630  const svn_opt_revision_t *peg_revision,
3631  const svn_opt_revision_t *revision,
3632  svn_revnum_t *actual_revnum,
3633  svn_depth_t depth,
3634  const apr_array_header_t *changelists,
3635  svn_client_ctx_t *ctx,
3636  apr_pool_t *pool);
3637 
3638 /**
3639  * Similar to svn_client_propget3(), except that @a actual_revnum and
3640  * @a changelists are always @c NULL, and @a depth is set according to
3641  * @a recurse: if @a recurse is TRUE, then @a depth is @c
3642  * svn_depth_infinity, else @c svn_depth_empty.
3643  *
3644  * @deprecated Provided for backward compatibility with the 1.2 API.
3645  */
3647 svn_error_t *
3648 svn_client_propget2(apr_hash_t **props,
3649  const char *propname,
3650  const char *target,
3651  const svn_opt_revision_t *peg_revision,
3652  const svn_opt_revision_t *revision,
3653  svn_boolean_t recurse,
3654  svn_client_ctx_t *ctx,
3655  apr_pool_t *pool);
3656 
3657 /**
3658  * Similar to svn_client_propget2(), except that @a peg_revision is
3659  * always the same as @a revision.
3660  *
3661  * @deprecated Provided for backward compatibility with the 1.1 API.
3662  */
3664 svn_error_t *
3665 svn_client_propget(apr_hash_t **props,
3666  const char *propname,
3667  const char *target,
3668  const svn_opt_revision_t *revision,
3669  svn_boolean_t recurse,
3670  svn_client_ctx_t *ctx,
3671  apr_pool_t *pool);
3672 
3673 /** Set @a *propval to the value of @a propname on revision @a revision
3674  * in the repository represented by @a URL. Use the authentication baton
3675  * in @a ctx for authentication, and @a pool for all memory allocation.
3676  * Return the actual rev queried in @a *set_rev.
3677  *
3678  * Note that unlike its cousin svn_client_propget(), this routine
3679  * doesn't affect the working copy at all; it's a pure network
3680  * operation that queries an *unversioned* property attached to a
3681  * revision. This can query log messages, dates, authors, and the
3682  * like.
3683  */
3684 svn_error_t *
3685 svn_client_revprop_get(const char *propname,
3686  svn_string_t **propval,
3687  const char *URL,
3688  const svn_opt_revision_t *revision,
3689  svn_revnum_t *set_rev,
3690  svn_client_ctx_t *ctx,
3691  apr_pool_t *pool);
3692 
3693 /**
3694  * Invoke @a receiver with @a receiver_baton to return the regular properies
3695  * of @a target, a URL or working copy path. @a receiver will be called
3696  * for each path encountered.
3697  *
3698  * If @a revision->kind is @c svn_opt_revision_unspecified, then get
3699  * properties from the working copy, if @a target is a working copy
3700  * path, or from the repository head if @a target is a URL. Else get
3701  * the properties as of @a revision. The actual node revision
3702  * selected is determined by the path as it exists in @a peg_revision.
3703  * If @a peg_revision->kind is @c svn_opt_revision_unspecified, then it
3704  * defaults to @c svn_opt_revision_head for URLs or @c
3705  * svn_opt_revision_working for WC targets. Use the authentication
3706  * baton cached in @a ctx for authentication if contacting the
3707  * repository.
3708  *
3709  * If @a depth is @c svn_depth_empty, list only the properties of
3710  * @a target itself. If @a depth is @c svn_depth_files, and
3711  * @a target is a directory, list the properties of @a target
3712  * and its file entries. If @c svn_depth_immediates, list the properties
3713  * of its immediate file and directory entries. If @c svn_depth_infinity,
3714  * list the properties of its file entries and recurse (with
3715  * @c svn_depth_infinity) on directory entries. @c svn_depth_unknown is
3716  * equivalent to @c svn_depth_empty. All other values produce undefined
3717  * results.
3718  *
3719  * @a changelists is an array of <tt>const char *</tt> changelist
3720  * names, used as a restrictive filter on items whose properties are
3721  * set; that is, don't set properties on any item unless it's a member
3722  * of one of those changelists. If @a changelists is empty (or
3723  * altogether @c NULL), no changelist filtering occurs.
3724  *
3725  * If @a target is not found, return the error @c SVN_ERR_ENTRY_NOT_FOUND.
3726  *
3727  * @since New in 1.5.
3728  */
3729 svn_error_t *
3730 svn_client_proplist3(const char *target,
3731  const svn_opt_revision_t *peg_revision,
3732  const svn_opt_revision_t *revision,
3733  svn_depth_t depth,
3734  const apr_array_header_t *changelists,
3735  svn_proplist_receiver_t receiver,
3736  void *receiver_baton,
3737  svn_client_ctx_t *ctx,
3738  apr_pool_t *pool);
3739 
3740 /**
3741  * Similar to svn_client_proplist3(), except the properties are
3742  * returned as an array of @c svn_client_proplist_item_t * structures
3743  * instead of by invoking the receiver function, there's no support
3744  * for @a changelists filtering, and @a recurse is used instead of a
3745  * @c svn_depth_t parameter (FALSE corresponds to @c svn_depth_empty,
3746  * and TRUE to @c svn_depth_infinity).
3747  *
3748  * @since New in 1.2.
3749  *
3750  * @deprecated Provided for backward compatiblility with the 1.2 API.
3751  */
3753 svn_error_t *
3754 svn_client_proplist2(apr_array_header_t **props,
3755  const char *target,
3756  const svn_opt_revision_t *peg_revision,
3757  const svn_opt_revision_t *revision,
3758  svn_boolean_t recurse,
3759  svn_client_ctx_t *ctx,
3760  apr_pool_t *pool);
3761 
3762 /**
3763  * Similar to svn_client_proplist2(), except that @a peg_revision is
3764  * always the same as @a revision.
3765  *
3766  * @deprecated Provided for backward compatibility with the 1.1 API.
3767  */
3769 svn_error_t *
3770 svn_client_proplist(apr_array_header_t **props,
3771  const char *target,
3772  const svn_opt_revision_t *revision,
3773  svn_boolean_t recurse,
3774  svn_client_ctx_t *ctx,
3775  apr_pool_t *pool);
3776 
3777 /** Set @a *props to a hash of the revision props attached to @a revision in
3778  * the repository represented by @a URL. Use the authentication baton cached
3779  * in @a ctx for authentication, and @a pool for all memory allocation.
3780  * Return the actual rev queried in @a *set_rev.
3781  *
3782  * The allocated hash maps (<tt>const char *</tt>) property names to
3783  * (@c svn_string_t *) property values.
3784  *
3785  * Note that unlike its cousin svn_client_proplist(), this routine
3786  * doesn't read a working copy at all; it's a pure network operation
3787  * that reads *unversioned* properties attached to a revision.
3788  */
3789 svn_error_t *
3790 svn_client_revprop_list(apr_hash_t **props,
3791  const char *URL,
3792  const svn_opt_revision_t *revision,
3793  svn_revnum_t *set_rev,
3794  svn_client_ctx_t *ctx,
3795  apr_pool_t *pool);
3796 /** @} */
3797 
3798 
3799 /**
3800  * @defgroup Export Export a tree from version control.
3801  *
3802  * @{
3803  */
3804 
3805 /**
3806  * Export the contents of either a subversion repository or a
3807  * subversion working copy into a 'clean' directory (meaning a
3808  * directory with no administrative directories). If @a result_rev
3809  * is not @c NULL and the path being exported is a repository URL, set
3810  * @a *result_rev to the value of the revision actually exported (set
3811  * it to @c SVN_INVALID_REVNUM for local exports).
3812  *
3813  * @a from is either the path the working copy on disk, or a URL to the
3814  * repository you wish to export.
3815  *
3816  * @a to is the path to the directory where you wish to create the exported
3817  * tree.
3818  *
3819  * @a peg_revision is the revision where the path is first looked up
3820  * when exporting from a repository. If @a peg_revision->kind is @c
3821  * svn_opt_revision_unspecified, then it defaults to @c svn_opt_revision_head
3822  * for URLs or @c svn_opt_revision_working for WC targets.
3823  *
3824  * @a revision is the revision that should be exported, which is only used
3825  * when exporting from a repository.
3826  *
3827  * @a peg_revision and @a revision must not be @c NULL.
3828  *
3829  * @a ctx->notify_func2 and @a ctx->notify_baton2 are the notification
3830  * functions and baton which are passed to svn_client_checkout() when
3831  * exporting from a repository.
3832  *
3833  * @a ctx is a context used for authentication in the repository case.
3834  *
3835  * @a overwrite if TRUE will cause the export to overwrite files or directories.
3836  *
3837  * If @a ignore_externals is set, don't process externals definitions
3838  * as part of this operation.
3839  *
3840  * @a native_eol allows you to override the standard eol marker on the platform
3841  * you are running on. Can be either "LF", "CR" or "CRLF" or NULL. If NULL
3842  * will use the standard eol marker. Any other value will cause the
3843  * SVN_ERR_IO_UNKNOWN_EOL error to be returned.
3844  *
3845  * If @a depth is @c svn_depth_infinity, export fully recursively.
3846  * Else if it is @c svn_depth_immediates, export @a from and its immediate
3847  * children (if any), but with subdirectories empty and at
3848  * @c svn_depth_empty. Else if @c svn_depth_files, export @a from and
3849  * its immediate file children (if any) only. If @a depth is @c
3850  * svn_depth_empty, then export exactly @a from and none of its children.
3851  *
3852  * All allocations are done in @a pool.
3853  *
3854  * @since New in 1.5.
3855  */
3856 svn_error_t *
3857 svn_client_export4(svn_revnum_t *result_rev,
3858  const char *from,
3859  const char *to,
3860  const svn_opt_revision_t *peg_revision,
3861  const svn_opt_revision_t *revision,
3862  svn_boolean_t overwrite,
3863  svn_boolean_t ignore_externals,
3864  svn_depth_t depth,
3865  const char *native_eol,
3866  svn_client_ctx_t *ctx,
3867  apr_pool_t *pool);
3868 
3869 
3870 /**
3871  * Similar to svn_client_export4(), but with @a depth set according to
3872  * @a recurse: if @a recurse is TRUE, set @a depth to
3873  * @c svn_depth_infinity, if @a recurse is FALSE, set @a depth to
3874  * @c svn_depth_files.
3875  *
3876  * @deprecated Provided for backward compatibility with the 1.4 API.
3877  *
3878  * @since New in 1.2.
3879  */
3881 svn_error_t *
3882 svn_client_export3(svn_revnum_t *result_rev,
3883  const char *from,
3884  const char *to,
3885  const svn_opt_revision_t *peg_revision,
3886  const svn_opt_revision_t *revision,
3887  svn_boolean_t overwrite,
3888  svn_boolean_t ignore_externals,
3889  svn_boolean_t recurse,
3890  const char *native_eol,
3891  svn_client_ctx_t *ctx,
3892  apr_pool_t *pool);
3893 
3894 
3895 /**
3896  * Similar to svn_client_export3(), but with @a peg_revision
3897  * always set to @c svn_opt_revision_unspecified, @a overwrite set to
3898  * the value of @a force, @a ignore_externals always FALSE, and
3899  * @a recurse always TRUE.
3900  *
3901  * @since New in 1.1.
3902  * @deprecated Provided for backward compatibility with the 1.1 API.
3903  */
3905 svn_error_t *
3906 svn_client_export2(svn_revnum_t *result_rev,
3907  const char *from,
3908  const char *to,
3909  svn_opt_revision_t *revision,
3910  svn_boolean_t force,
3911  const char *native_eol,
3912  svn_client_ctx_t *ctx,
3913  apr_pool_t *pool);
3914 
3915 
3916 /**
3917  * Similar to svn_client_export2(), but with @a native_eol always set
3918  * to NULL.
3919  *
3920  * @deprecated Provided for backward compatibility with the 1.0 API.
3921  */
3923 svn_error_t *
3924 svn_client_export(svn_revnum_t *result_rev,
3925  const char *from,
3926  const char *to,
3927  svn_opt_revision_t *revision,
3928  svn_boolean_t force,
3929  svn_client_ctx_t *ctx,
3930  apr_pool_t *pool);
3931 
3932 /** @} */
3933 
3934 /**
3935  * @defgroup List List / ls
3936  *
3937  * @{
3938  */
3939 
3940 /** Invoked by svn_client_list2() for each @a path with its @a dirent and,
3941  * if @a path is locked, its @a lock. @a abs_path is the filesystem path
3942  * to which @a path is relative. @a baton is the baton passed to the
3943  * caller. @a pool may be used for temporary allocations.
3944  *
3945  * @since New in 1.4.
3946  */
3947 typedef svn_error_t *(*svn_client_list_func_t)(void *baton,
3948  const char *path,
3949  const svn_dirent_t *dirent,
3950  const svn_lock_t *lock,
3951  const char *abs_path,
3952  apr_pool_t *pool);
3953 
3954 /**
3955  * Report the directory entry, and possibly children, for @a
3956  * path_or_url at @a revision. The actual node revision selected is
3957  * determined by the path as it exists in @a peg_revision. If @a
3958  * peg_revision->kind is @c svn_opt_revision_unspecified, then it defaults
3959  * to @c svn_opt_revision_head for URLs or @c svn_opt_revision_working
3960  * for WC targets.
3961  *
3962  * Report directory entries by invoking @a list_func/@a baton with @a path
3963  * relative to @a path_or_url. The dirent for @a path_or_url is reported
3964  * using an empty @a path. If @a path_or_url is a directory, also report
3965  * its children. If @a path_or_url is non-existent, return
3966  * @c SVN_ERR_FS_NOT_FOUND.
3967  *
3968  * If @a fetch_locks is TRUE, include locks when reporting directory entries.
3969  *
3970  * Use @a pool for temporary allocations.
3971  *
3972  * Use authentication baton cached in @a ctx to authenticate against the
3973  * repository.
3974  *
3975  * If @a depth is @c svn_depth_empty, list just @a path_or_url itself.
3976  * If @a depth is @c svn_depth_files, list @a path_or_url and its file
3977  * entries. If @c svn_depth_immediates, list its immediate file and
3978  * directory entries. If @c svn_depth_infinity, list file entries and
3979  * recurse (with @c svn_depth_infinity) on directory entries.
3980  *
3981  * @a dirent_fields controls which fields in the @c svn_dirent_t's are
3982  * filled in. To have them totally filled in use @c SVN_DIRENT_ALL,
3983  * otherwise simply bitwise OR together the combination of @c SVN_DIRENT_
3984  * fields you care about.
3985  *
3986  * @since New in 1.5.
3987  */
3988 svn_error_t *
3989 svn_client_list2(const char *path_or_url,
3990  const svn_opt_revision_t *peg_revision,
3991  const svn_opt_revision_t *revision,
3992  svn_depth_t depth,
3993  apr_uint32_t dirent_fields,
3994  svn_boolean_t fetch_locks,
3995  svn_client_list_func_t list_func,
3996  void *baton,
3997  svn_client_ctx_t *ctx,
3998  apr_pool_t *pool);
3999 
4000 /**
4001  * Similar to svn_client_list2(), but with @a recurse instead of @a depth.
4002  * If @a recurse is TRUE, pass @c svn_depth_files for @a depth; else
4003  * pass @c svn_depth_infinity.
4004  *
4005  * @since New in 1.4.
4006  *
4007  * @deprecated Provided for backward compatibility with the 1.4 API.
4008  */
4010 svn_error_t *
4011 svn_client_list(const char *path_or_url,
4012  const svn_opt_revision_t *peg_revision,
4013  const svn_opt_revision_t *revision,
4014  svn_boolean_t recurse,
4015  apr_uint32_t dirent_fields,
4016  svn_boolean_t fetch_locks,
4017  svn_client_list_func_t list_func,
4018  void *baton,
4019  svn_client_ctx_t *ctx,
4020  apr_pool_t *pool);
4021 
4022 /**
4023  * Same as svn_client_list(), but always passes @c SVN_DIRENT_ALL for
4024  * the @a dirent_fields argument and returns all information in two
4025  * hash tables instead of invoking a callback.
4026  *
4027  * Set @a *dirents to a newly allocated hash of directory entries.
4028  * The @a dirents hash maps entry names (<tt>const char *</tt>) to
4029  * @c svn_dirent_t *'s.
4030  *
4031  * If @a locks is not @c NULL, set @a *locks to a hash table mapping
4032  * entry names (<tt>const char *</tt>) to @c svn_lock_t *'s.
4033  *
4034  * @since New in 1.3.
4035  *
4036  * @deprecated Provided for backward compatibility with the 1.3 API.
4037  * Use svn_client_list2() instead.
4038  */
4040 svn_error_t *
4041 svn_client_ls3(apr_hash_t **dirents,
4042  apr_hash_t **locks,
4043  const char *path_or_url,
4044  const svn_opt_revision_t *peg_revision,
4045  const svn_opt_revision_t *revision,
4046  svn_boolean_t recurse,
4047  svn_client_ctx_t *ctx,
4048  apr_pool_t *pool);
4049 
4050 /**
4051  * Same as svn_client_ls3(), but without the ability to get locks.
4052  *
4053  * @since New in 1.2.
4054  *
4055  * @deprecated Provided for backward compatibility with the 1.2 API.
4056  * Use svn_client_list2() instead.
4057  */
4059 svn_error_t *
4060 svn_client_ls2(apr_hash_t **dirents,
4061  const char *path_or_url,
4062  const svn_opt_revision_t *peg_revision,
4063  const svn_opt_revision_t *revision,
4064  svn_boolean_t recurse,
4065  svn_client_ctx_t *ctx,
4066  apr_pool_t *pool);
4067 
4068 /**
4069  * Similar to svn_client_ls2() except that @a peg_revision is always
4070  * the same as @a revision.
4071  *
4072  * @deprecated Provided for backward compatibility with the 1.1 API.
4073  * Use svn_client_list2() instead.
4074  */
4076 svn_error_t *
4077 svn_client_ls(apr_hash_t **dirents,
4078  const char *path_or_url,
4079  svn_opt_revision_t *revision,
4080  svn_boolean_t recurse,
4081  svn_client_ctx_t *ctx,
4082  apr_pool_t *pool);
4083 
4084 
4085 /** @} */
4086 
4087 /**
4088  * @defgroup Cat View the contents of a file in the repository.
4089  *
4090  * @{
4091  */
4092 
4093 /**
4094  * Output the content of file identified by @a path_or_url and @a
4095  * revision to the stream @a out. The actual node revision selected
4096  * is determined by the path as it exists in @a peg_revision. If @a
4097  * peg_revision->kind is @c svn_opt_revision_unspecified, then it defaults
4098  * to @c svn_opt_revision_head for URLs or @c svn_opt_revision_working
4099  * for WC targets.
4100  *
4101  * If @a path_or_url is not a local path, then if @a revision is of
4102  * kind @c svn_opt_revision_previous (or some other kind that requires
4103  * a local path), an error will be returned, because the desired
4104  * revision cannot be determined.
4105  *
4106  * Use the authentication baton cached in @a ctx to authenticate against the
4107  * repository.
4108  *
4109  * Perform all allocations from @a pool.
4110  *
4111  * ### @todo Add an expansion/translation flag?
4112  *
4113  * @since New in 1.2.
4114  */
4115 svn_error_t *
4117  const char *path_or_url,
4118  const svn_opt_revision_t *peg_revision,
4119  const svn_opt_revision_t *revision,
4120  svn_client_ctx_t *ctx,
4121  apr_pool_t *pool);
4122 
4123 
4124 /**
4125  * Similar to svn_client_cat2() except that the peg revision is always
4126  * the same as @a revision.
4127  *
4128  * @deprecated Provided for backward compatibility with the 1.1 API.
4129  */
4131 svn_error_t *
4133  const char *path_or_url,
4134  const svn_opt_revision_t *revision,
4135  svn_client_ctx_t *ctx,
4136  apr_pool_t *pool);
4137 
4138 /** @} end group: cat */
4139 
4140 
4141 
4142 /** Changelist commands
4143  *
4144  * @defgroup svn_client_changelist_funcs Client Changelist Functions
4145  * @{
4146  */
4147 
4148 /** Implementation note:
4149  *
4150  * For now, changelists are implemented by scattering the
4151  * associations across multiple .svn/entries files in a working copy.
4152  * However, this client API was written so that we have the option of
4153  * changing the underlying implementation -- we may someday want to
4154  * store changelist definitions in a centralized database.
4155  */
4156 
4157 /**
4158  * Add each path in @a paths (recursing to @a depth as necessary) to
4159  * @a changelist. If a path is already a member of another
4160  * changelist, then remove it from the other changelist and add it to
4161  * @a changelist. (For now, a path cannot belong to two changelists
4162  * at once.)
4163  *
4164  * @a changelists is an array of <tt>const char *</tt> changelist
4165  * names, used as a restrictive filter on items whose changelist
4166  * assignments are adjusted; that is, don't tweak the changeset of any
4167  * item unless it's currently a member of one of those changelists.
4168  * If @a changelists is empty (or altogether @c NULL), no changelist
4169  * filtering occurs.
4170  *
4171  * @note This metadata is purely a client-side "bookkeeping"
4172  * convenience, and is entirely managed by the working copy.
4173  *
4174  * @since New in 1.5.
4175  */
4176 svn_error_t *
4177 svn_client_add_to_changelist(const apr_array_header_t *paths,
4178  const char *changelist,
4179  svn_depth_t depth,
4180  const apr_array_header_t *changelists,
4181  svn_client_ctx_t *ctx,
4182  apr_pool_t *pool);
4183 
4184 /**
4185  * Remove each path in @a paths (recursing to @a depth as necessary)
4186  * from changelists to which they are currently assigned.
4187  *
4188  * @a changelists is an array of <tt>const char *</tt> changelist
4189  * names, used as a restrictive filter on items whose changelist
4190  * assignments are removed; that is, don't remove from a changeset any
4191  * item unless it's currently a member of one of those changelists.
4192  * If @a changelists is empty (or altogether @c NULL), all changelist
4193  * assignments in and under each path in @a paths (to @a depth) will
4194  * be removed.
4195  *
4196  * @note This metadata is purely a client-side "bookkeeping"
4197  * convenience, and is entirely managed by the working copy.
4198  *
4199  * @since New in 1.5.
4200  */
4201 svn_error_t *
4202 svn_client_remove_from_changelists(const apr_array_header_t *paths,
4203  svn_depth_t depth,
4204  const apr_array_header_t *changelists,
4205  svn_client_ctx_t *ctx,
4206  apr_pool_t *pool);
4207 
4208 /**
4209  * The callback type used by svn_client_get_changelists().
4210  *
4211  * On each invocation, @a path is a newly discovered member of the
4212  * changelist, and @a baton is a private function closure.
4213  *
4214  * @since New in 1.5.
4215  */
4216 typedef svn_error_t *(*svn_changelist_receiver_t) (void *baton,
4217  const char *path,
4218  const char *changelist,
4219  apr_pool_t *pool);
4220 
4221 /**
4222  * Beginning at @a path, crawl to @a depth to discover every path in
4223  * or under @a path which belongs to one of the changelists in @a
4224  * changelists (an array of <tt>const char *</tt> changelist names).
4225  * If @a changelists is @c null, discover paths with any changelist.
4226  * Call @a callback_func (with @a callback_baton) each time a
4227  * changelist-having path is discovered.
4228  *
4229  * If @a ctx->cancel_func is not @c null, invoke it passing @a
4230  * ctx->cancel_baton during the recursive walk.
4231  *
4232  * @since New in 1.5.
4233  */
4234 svn_error_t *
4235 svn_client_get_changelists(const char *path,
4236  const apr_array_header_t *changelists,
4237  svn_depth_t depth,
4238  svn_changelist_receiver_t callback_func,
4239  void *callback_baton,
4240  svn_client_ctx_t *ctx,
4241  apr_pool_t *pool);
4242 
4243 /** @} */
4244 
4245 
4246 
4247 /** Locking commands
4248  *
4249  * @defgroup svn_client_locking_funcs Client Locking Functions
4250  * @{
4251  */
4252 
4253 /**
4254  * Lock @a targets in the repository. @a targets is an array of
4255  * <tt>const char *</tt> paths - either all working copy paths or URLs. All
4256  * @a targets must be in the same repository.
4257  *
4258  * If a target is already locked in the repository, no lock will be
4259  * acquired unless @a steal_lock is TRUE, in which case the locks are
4260  * stolen. @a comment, if non-NULL, is an xml-escapable description
4261  * stored with each lock in the repository. Each acquired lock will
4262  * be stored in the working copy if the targets are WC paths.
4263  *
4264  * For each target @a ctx->notify_func2/notify_baton2 will be used to indicate
4265  * whether it was locked. An action of @c svn_wc_notify_state_locked
4266  * means that the path was locked. If the path was not locked because
4267  * it was out of date or there was already a lock in the repository,
4268  * the notification function will be called with @c
4269  * svn_wc_notify_failed_lock, and the error passed in the notification
4270  * structure.
4271  *
4272  * Use @a pool for temporary allocations.
4273  *
4274  * @since New in 1.2.
4275  */
4276 svn_error_t *
4277 svn_client_lock(const apr_array_header_t *targets,
4278  const char *comment,
4279  svn_boolean_t steal_lock,
4280  svn_client_ctx_t *ctx,
4281  apr_pool_t *pool);
4282 
4283 /**
4284  * Unlock @a targets in the repository. @a targets is an array of
4285  * <tt>const char *</tt> paths - either all working copy paths or all URLs.
4286  * All @a targets must be in the same repository.
4287  *
4288  * If the targets are WC paths, and @a break_lock is FALSE, the working
4289  * copy must contain a locks for each target.
4290  * If this is not the case, or the working copy lock doesn't match the
4291  * lock token in the repository, an error will be signaled.
4292  *
4293  * If the targets are URLs, the locks may be broken even if @a break_lock
4294  * is FALSE, but only if the lock owner is the same as the
4295  * authenticated user.
4296  *
4297  * If @a break_lock is TRUE, the locks will be broken in the
4298  * repository. In both cases, the locks, if any, will be removed from
4299  * the working copy if the targets are WC paths.
4300  *
4301  * The notification functions in @a ctx will be called for each
4302  * target. If the target was successfully unlocked, @c
4303  * svn_wc_notify_unlocked will be used. Else, if the error is
4304  * directly related to unlocking the path (see @c
4305  * SVN_ERR_IS_UNLOCK_ERROR), @c svn_wc_notify_failed_unlock will be
4306  * used and the error will be passed in the notification structure.
4307 
4308  * Use @a pool for temporary allocations.
4309  *
4310  * @since New in 1.2.
4311  */
4312 svn_error_t *
4313 svn_client_unlock(const apr_array_header_t *targets,
4314  svn_boolean_t break_lock,
4315  svn_client_ctx_t *ctx,
4316  apr_pool_t *pool);
4317 
4318 /** @} */
4319 
4320 /**
4321  * @defgroup Info Show repository information about a working copy.
4322  *
4323  * @{
4324  */
4325 
4326 /** The size of the file is unknown.
4327  * Used as value in fields of type @c apr_size_t.
4328  *
4329  * @since New in 1.5
4330  */
4331 #define SVN_INFO_SIZE_UNKNOWN ((apr_size_t) -1)
4332 
4333 /**
4334  * A structure which describes various system-generated metadata about
4335  * a working-copy path or URL.
4336  *
4337  * @note Fields may be added to the end of this structure in future
4338  * versions. Therefore, users shouldn't allocate structures of this
4339  * type, to preserve binary compatibility.
4340  *
4341  * @since New in 1.2.
4342  */
4343 typedef struct svn_info_t
4344 {
4345  /** Where the item lives in the repository. */
4346  const char *URL;
4347 
4348  /** The revision of the object. If path_or_url is a working-copy
4349  * path, then this is its current working revnum. If path_or_url
4350  * is a URL, then this is the repos revision that path_or_url lives in. */
4352 
4353  /** The node's kind. */
4355 
4356  /** The root URL of the repository. */
4357  const char *repos_root_URL;
4358 
4359  /** The repository's UUID. */
4360  const char *repos_UUID;
4361 
4362  /** The last revision in which this object changed. */
4364 
4365  /** The date of the last_changed_rev. */
4366  apr_time_t last_changed_date;
4367 
4368  /** The author of the last_changed_rev. */
4369  const char *last_changed_author;
4370 
4371  /** An exclusive lock, if present. Could be either local or remote. */
4373 
4374  /** Whether or not to ignore the next 10 wc-specific fields. */
4376 
4377  /**
4378  * @name Working-copy path fields
4379  * These things only apply to a working-copy path.
4380  * See svn_wc_entry_t for explanations.
4381  * @{
4382  */
4383  svn_wc_schedule_t schedule;
4384  const char *copyfrom_url;
4385  svn_revnum_t copyfrom_rev;
4386  apr_time_t text_time;
4387  apr_time_t prop_time; /* will always be 0 for svn 1.4 and later */
4388  const char *checksum;
4389  const char *conflict_old;
4390  const char *conflict_new;
4391  const char *conflict_wrk;
4392  const char *prejfile;
4393  /** @since New in 1.5. */
4394  const char *changelist;
4395  /** @since New in 1.5. */
4397 
4398  /**
4399  * Similar to working_size64, but will be @c SVN_INFO_SIZE_UNKNOWN when
4400  * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte).
4401  *
4402  * @deprecated Provided for backward compatibility with the 1.5 API.
4403  */
4404  apr_size_t working_size;
4405 
4406  /** @} */
4407 
4408  /**
4409  * Similar to size64, but size will be @c SVN_INFO_SIZE_UNKNOWN when
4410  * its value would overflow apr_size_t (so when size >= 4 GB - 1 byte).
4411  *
4412  * @deprecated Provided for backward compatibility with the 1.5 API.
4413  */
4414  apr_size_t size;
4415 
4416  /**
4417  * The size of the file in the repository (untranslated,
4418  * e.g. without adjustment of line endings and keyword
4419  * expansion). Only applicable for file -- not directory -- URLs.
4420  * For working copy paths, size64 will be @c SVN_INVALID_FILESIZE.
4421  * @since New in 1.6.
4422  */
4424 
4425  /**
4426  * The size of the file after being translated into its local
4427  * representation, or @c SVN_INVALID_FILESIZE if unknown.
4428  * Not applicable for directories.
4429  * @since New in 1.6.
4430  * @name Working-copy path fields
4431  * @{
4432  */
4433  svn_filesize_t working_size64;
4434 
4435  /**
4436  * Info on any tree conflict of which this node is a victim. Otherwise NULL.
4437  * @since New in 1.6.
4438  */
4440 
4441  /** @} */
4442 
4443 } svn_info_t;
4444 
4445 
4446 /**
4447  * The callback invoked by svn_client_info2(). Each invocation
4448  * describes @a path with the information present in @a info. Note
4449  * that any fields within @a info may be NULL if information is
4450  * unavailable. Use @a pool for all temporary allocation.
4451  *
4452  * @since New in 1.2.
4453  */
4454 typedef svn_error_t *(*svn_info_receiver_t)
4455  (void *baton,
4456  const char *path,
4457  const svn_info_t *info,
4458  apr_pool_t *pool);
4459 
4460 /**
4461  * Return a duplicate of @a info, allocated in @a pool. No part of the new
4462  * structure will be shared with @a info.
4463  *
4464  * @since New in 1.3.
4465  */
4466 svn_info_t *
4467 svn_info_dup(const svn_info_t *info,
4468  apr_pool_t *pool);
4469 
4470 /**
4471  * Invoke @a receiver with @a receiver_baton to return information
4472  * about @a path_or_url in @a revision. The information returned is
4473  * system-generated metadata, not the sort of "property" metadata
4474  * created by users. See @c svn_info_t.
4475  *
4476  * If both revision arguments are either @c
4477  * svn_opt_revision_unspecified or NULL, then information will be
4478  * pulled solely from the working copy; no network connections will be
4479  * made.
4480  *
4481  * Otherwise, information will be pulled from a repository. The
4482  * actual node revision selected is determined by the @a path_or_url
4483  * as it exists in @a peg_revision. If @a peg_revision->kind is @c
4484  * svn_opt_revision_unspecified, then it defaults to @c
4485  * svn_opt_revision_head for URLs or @c svn_opt_revision_working for
4486  * WC targets.
4487  *
4488  * If @a path_or_url is not a local path, then if @a revision is of
4489  * kind @c svn_opt_revision_previous (or some other kind that requires
4490  * a local path), an error will be returned, because the desired
4491  * revision cannot be determined.
4492  *
4493  * Use the authentication baton cached in @a ctx to authenticate
4494  * against the repository.
4495  *
4496  * If @a path_or_url is a file, just invoke @a receiver on it. If it
4497  * is a directory, then descend according to @a depth. If @a depth is
4498  * @c svn_depth_empty, invoke @a receiver on @a path_or_url and
4499  * nothing else; if @c svn_depth_files, on @a path_or_url and its
4500  * immediate file children; if @c svn_depth_immediates, the preceding
4501  * plus on each immediate subdirectory; if @c svn_depth_infinity, then
4502  * recurse fully, invoking @a receiver on @a path_or_url and
4503  * everything beneath it.
4504  *
4505  * @a changelists is an array of <tt>const char *</tt> changelist
4506  * names, used as a restrictive filter on items whose info is
4507  * reported; that is, don't report info about any item unless
4508  * it's a member of one of those changelists. If @a changelists is
4509  * empty (or altogether @c NULL), no changelist filtering occurs.
4510  *
4511  * @since New in 1.5.
4512  */
4513 svn_error_t *
4514 svn_client_info2(const char *path_or_url,
4515  const svn_opt_revision_t *peg_revision,
4516  const svn_opt_revision_t *revision,
4517  svn_info_receiver_t receiver,
4518  void *receiver_baton,
4519  svn_depth_t depth,
4520  const apr_array_header_t *changelists,
4521  svn_client_ctx_t *ctx,
4522  apr_pool_t *pool);
4523 
4524 /**
4525  * Similar to svn_client_info2() but with @a changelists passed as @c
4526  * NULL, and @a depth set according to @a recurse: if @a recurse is
4527  * TRUE, @a depth is @c svn_depth_infinity, else @c svn_depth_empty.
4528  *
4529  * @deprecated Provided for backward compatibility with the 1.2 API.
4530  */
4532 svn_error_t *
4533 svn_client_info(const char *path_or_url,
4534  const svn_opt_revision_t *peg_revision,
4535  const svn_opt_revision_t *revision,
4536  svn_info_receiver_t receiver,
4537  void *receiver_baton,
4538  svn_boolean_t recurse,
4539  svn_client_ctx_t *ctx,
4540  apr_pool_t *pool);
4541 
4542 /** @} */
4543 
4544 /** @} end group: Client working copy management */
4545 
4546 /**
4547  *
4548  * @defgroup clnt_sessions Client session related functions
4549  *
4550  * @{
4551  *
4552  */
4553 
4554 
4555 /* Converting paths to URLs. */
4556 
4557 /** Set @a *url to the URL for @a path_or_url.
4558  *
4559  * If @a path_or_url is already a URL, set @a *url to @a path_or_url.
4560  *
4561  * If @a path_or_url is a versioned item, set @a *url to @a
4562  * path_or_url's entry URL. If @a path_or_url is unversioned (has
4563  * no entry), set @a *url to NULL.
4564  */
4565 svn_error_t *
4566 svn_client_url_from_path(const char **url,
4567  const char *path_or_url,
4568  apr_pool_t *pool);
4569 
4570 
4571 /** Set @a *url to the repository root URL of the repository in which
4572  * @a path_or_url is versioned (or scheduled to be versioned),
4573  * allocated in @a pool. @a ctx is required for possible repository
4574  * authentication.
4575  *
4576  * @since New in 1.5.
4577  */
4578 svn_error_t *
4579 svn_client_root_url_from_path(const char **url,
4580  const char *path_or_url,
4581  svn_client_ctx_t *ctx,
4582  apr_pool_t *pool);
4583 
4584 
4585 
4586 /* Fetching repository UUIDs. */
4587 
4588 /** Get repository @a uuid for @a url.
4589  *
4590  * Use a @a pool to open a temporary RA session to @a url, discover the
4591  * repository uuid, and free the session. Return the uuid in @a uuid,
4592  * allocated in @a pool. @a ctx is required for possible repository
4593  * authentication.
4594  */
4595 svn_error_t *
4596 svn_client_uuid_from_url(const char **uuid,
4597  const char *url,
4598  svn_client_ctx_t *ctx,
4599  apr_pool_t *pool);
4600 
4601 
4602 /** Return the repository @a uuid for working-copy @a path, allocated
4603  * in @a pool. Use @a adm_access to retrieve the uuid from @a path's
4604  * entry; if not present in the entry, then look in its parents. If not
4605  * present in the workingcopy call svn_client_uuid_from_url() to
4606  * retrieve, using the entry's URL. @a ctx is required for possible
4607  * repository authentication.
4608  *
4609  * @note The only reason this function falls back on
4610  * svn_client_uuid_from_url() is for compatibility purposes. Old and
4611  * detached working copies may not have uuids in the entries file.
4612  */
4613 svn_error_t *
4614 svn_client_uuid_from_path(const char **uuid,
4615  const char *path,
4616  svn_wc_adm_access_t *adm_access,
4617  svn_client_ctx_t *ctx,
4618  apr_pool_t *pool);
4619 
4620 
4621 /* Opening RA sessions. */
4622 
4623 /** Open an RA session rooted at @a url, and return it in @a *session.
4624  *
4625  * Use the authentication baton stored in @a ctx for authentication.
4626  * @a *session is allocated in @a pool.
4627  *
4628  * @since New in 1.3.
4629  *
4630  * @note This function is similar to svn_ra_open3(), but the caller avoids
4631  * having to providing its own callback functions.
4632  */
4633 svn_error_t *
4635  const char *url,
4636  svn_client_ctx_t *ctx,
4637  apr_pool_t *pool);
4638 
4639 
4640 /** @} end group: Client session related functions */
4641 
4642 /** @} */
4643 
4644 #ifdef __cplusplus
4645 }
4646 #endif /* __cplusplus */
4647 
4648 #endif /* SVN_CLIENT_H */