Subversion
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
svn_wc.h
Go to the documentation of this file.
1 /**
2  * @copyright
3  * ====================================================================
4  * Licensed to the Apache Software Foundation (ASF) under one
5  * or more contributor license agreements. See the NOTICE file
6  * distributed with this work for additional information
7  * regarding copyright ownership. The ASF licenses this file
8  * to you under the Apache License, Version 2.0 (the
9  * "License"); you may not use this file except in compliance
10  * with the License. You may obtain a copy of the License at
11  *
12  * http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing,
15  * software distributed under the License is distributed on an
16  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17  * KIND, either express or implied. See the License for the
18  * specific language governing permissions and limitations
19  * under the License.
20  * ====================================================================
21  * @endcopyright
22  *
23  * @file svn_wc.h
24  * @brief Subversion's working copy library
25  *
26  * Requires:
27  * - A working copy
28  *
29  * Provides:
30  * - Ability to manipulate working copy's versioned data.
31  * - Ability to manipulate working copy's administrative files.
32  *
33  * Used By:
34  * - Clients.
35  *
36  * Notes:
37  * The 'path' parameters to most of the older functions can be
38  * absolute or relative (relative to current working
39  * directory). If there are any cases where they are
40  * relative to the path associated with the
41  * 'svn_wc_adm_access_t *adm_access' baton passed along with the
42  * path, those cases should be explicitly documented, and if they
43  * are not, please fix it. All new functions introduced since
44  * Subversion 1.7 require absolute paths, unless explicitly
45  * documented otherwise.
46  *
47  * Starting with Subversion 1.7, several arguments are re-ordered
48  * to be more consistent through the api. The common ordering used
49  * is:
50  *
51  * Firsts:
52  * - Output arguments
53  * Then:
54  * - Working copy context
55  * - Local abspath
56  * Followed by:
57  * - Function specific arguments
58  * - Specific callbacks with their batons
59  * Finally:
60  * - Generic callbacks (with baton) from directly functional to
61  * just observing:
62  * - svn_wc_conflict_resolver_func2_t
63  * - svn_wc_external_update_t
64  * - svn_cancel_func_t
65  * - svn_wc_notify_func2_t
66  * - Result pool
67  * - Scratch pool.
68  */
69 
70 #ifndef SVN_WC_H
71 #define SVN_WC_H
72 
73 #include <apr.h>
74 #include <apr_pools.h>
75 #include <apr_tables.h>
76 #include <apr_hash.h>
77 #include <apr_time.h>
78 #include <apr_file_io.h>
79 
80 #include "svn_types.h"
81 #include "svn_string.h"
82 #include "svn_checksum.h"
83 #include "svn_io.h"
84 #include "svn_delta.h" /* for svn_stream_t */
85 #include "svn_opt.h"
86 #include "svn_ra.h" /* for svn_ra_reporter_t type */
87 
88 #ifdef __cplusplus
89 extern "C" {
90 #endif /* __cplusplus */
91 
92 
93 /**
94  * Get libsvn_wc version information.
95  *
96  * @since New in 1.1.
97  */
98 const svn_version_t *
99 svn_wc_version(void);
100 
101 
102 /**
103  * @defgroup svn_wc Working copy management
104  * @{
105  */
106 
107 
108 /** Flags for use with svn_wc_translated_file2() and svn_wc_translated_stream().
109  *
110  * @defgroup translate_flags Translation flags
111  * @{
112  */
113 
114  /** Translate from Normal Form.
115  *
116  * The working copy text bases and repository files are stored
117  * in normal form. Some files' contents - or ever representation -
118  * differs between the working copy and the normal form. This flag
119  * specifies to take the latter form as input and transform it
120  * to the former.
121  *
122  * Either this flag or #SVN_WC_TRANSLATE_TO_NF should be specified,
123  * but not both.
124  */
125 #define SVN_WC_TRANSLATE_FROM_NF 0x00000000
126 
127  /** Translate to Normal Form.
128  *
129  * Either this flag or #SVN_WC_TRANSLATE_FROM_NF should be specified,
130  * but not both.
131  */
132 #define SVN_WC_TRANSLATE_TO_NF 0x00000001
133 
134  /** Force repair of eol styles, making sure the output file consistently
135  * contains the one eol style as specified by the svn:eol-style
136  * property and the required translation direction.
137  *
138  */
139 #define SVN_WC_TRANSLATE_FORCE_EOL_REPAIR 0x00000002
140 
141  /** Don't register a pool cleanup to delete the output file */
142 #define SVN_WC_TRANSLATE_NO_OUTPUT_CLEANUP 0x00000004
143 
144  /** Guarantee a new file is created on successful return.
145  * The default shortcuts translation by returning the path
146  * of the untranslated file when no translation is required.
147  */
148 #define SVN_WC_TRANSLATE_FORCE_COPY 0x00000008
149 
150  /** Use a non-wc-local tmp directory for creating output files,
151  * instead of in the working copy admin tmp area which is the default.
152  *
153  * @since New in 1.4.
154  */
155 #define SVN_WC_TRANSLATE_USE_GLOBAL_TMP 0x00000010
156 
157 /** @} */
158 
159 
160 /**
161  * @defgroup svn_wc_context Working copy context
162  * @{
163  */
164 
165 /** The context for all working copy interactions.
166  *
167  * This is the client-facing datastructure API consumers are required
168  * to create and use when interacting with a working copy. Multiple
169  * contexts can be created for the same working copy simultaneously, within
170  * the same process or different processes. Context mutexing will be handled
171  * internally by the working copy library.
172  *
173  * @note: #svn_wc_context_t should be passed by non-const pointer in all
174  * APIs, even for read-only operations, as it contains mutable data (caching,
175  * etc.).
176  *
177  * @since New in 1.7.
178  */
180 
181 /** Create a context for the working copy, and return it in @a *wc_ctx. This
182  * context is not associated with a particular working copy, but as operations
183  * are performed, will load the appropriate working copy information.
184  *
185  * @a config should hold the various configuration options that may apply to
186  * this context. It should live at least as long as @a result_pool. It may
187  * be @c NULL.
188  *
189  * The context will be allocated in @a result_pool, and will use @a
190  * result_pool for any internal allocations requiring the same longevity as
191  * the context. The context will be automatically destroyed, and its
192  * resources released, when @a result_pool is cleared, or it may be manually
193  * destroyed by invoking svn_wc_context_destroy().
194  *
195  * Use @a scratch_pool for temporary allocations. It may be cleared
196  * immediately upon returning from this function.
197  *
198  * @since New in 1.7.
199  */
200 svn_error_t *
202  const svn_config_t *config,
203  apr_pool_t *result_pool,
204  apr_pool_t *scratch_pool);
205 
206 
207 /** Destroy the working copy context described by @a wc_ctx, releasing any
208  * acquired resources.
209  *
210  * @since New in 1.7.
211  */
212 svn_error_t *
214 
215 
216 /** @} */
217 
218 
219 /**
220  * Locking/Opening/Closing using adm access batons.
221  *
222  * @defgroup svn_wc_adm_access Adm access batons (deprecated)
223  * @{
224  */
225 
226 /** Baton for access to a working copy administrative area.
227  *
228  * Access batons can be grouped into sets, by passing an existing open
229  * baton when opening a new baton. Given one baton in a set, other batons
230  * may be retrieved. This allows an entire hierarchy to be locked, and
231  * then the set of batons can be passed around by passing a single baton.
232  *
233  * @deprecated Provided for backward compatibility with the 1.6 API.
234  * New code should use a #svn_wc_context_t object to access the working
235  * copy.
236  */
238 
239 
240 /**
241  * Return, in @a *adm_access, a pointer to a new access baton for the working
242  * copy administrative area associated with the directory @a path. If
243  * @a write_lock is TRUE the baton will include a write lock, otherwise the
244  * baton can only be used for read access. If @a path refers to a directory
245  * that is already write locked then the error #SVN_ERR_WC_LOCKED will be
246  * returned. The error #SVN_ERR_WC_NOT_DIRECTORY will be returned if
247  * @a path is not a versioned directory.
248  *
249  * If @a associated is an open access baton then @a adm_access will be added
250  * to the set containing @a associated. @a associated can be @c NULL, in
251  * which case @a adm_access is the start of a new set.
252  *
253  * @a levels_to_lock specifies how far to lock. Zero means just the specified
254  * directory. Any negative value means to lock the entire working copy
255  * directory hierarchy under @a path. A positive value indicates the number of
256  * levels of directories to lock -- 1 means just immediate subdirectories, 2
257  * means immediate subdirectories and their subdirectories, etc. All the
258  * access batons will become part of the set containing @a adm_access. This
259  * is an all-or-nothing option, if it is not possible to lock all the
260  * requested directories then an error will be returned and @a adm_access will
261  * be invalid, with the exception that subdirectories of @a path that are
262  * missing from the physical filesystem will not be locked and will not cause
263  * an error. The error #SVN_ERR_WC_LOCKED will be returned if a
264  * subdirectory of @a path is already write locked.
265  *
266  * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
267  * if the client has canceled the operation.
268  *
269  * @a pool will be used to allocate memory for the baton and any subsequently
270  * cached items. If @a adm_access has not been closed when the pool is
271  * cleared, it will be closed automatically at that point, and removed from
272  * its set. A baton closed in this way will not remove physical locks from
273  * the working copy if cleanup is required.
274  *
275  * The first baton in a set, with @a associated passed as @c NULL, must have
276  * the longest lifetime of all the batons in the set. This implies it must be
277  * the root of the hierarchy.
278  *
279  * @since New in 1.2.
280  * @deprecated Provided for backward compatibility with the 1.6 API.
281  * Callers should use a #svn_wc_context_t object to access the working
282  * copy.
283  */
285 svn_error_t *
287  svn_wc_adm_access_t *associated,
288  const char *path,
289  svn_boolean_t write_lock,
290  int levels_to_lock,
291  svn_cancel_func_t cancel_func,
292  void *cancel_baton,
293  apr_pool_t *pool);
294 
295 /**
296  * Similar to svn_wc_adm_open3(), but without cancellation support.
297  *
298  * @deprecated Provided for backward compatibility with the 1.1 API.
299  */
301 svn_error_t *
303  svn_wc_adm_access_t *associated,
304  const char *path,
305  svn_boolean_t write_lock,
306  int levels_to_lock,
307  apr_pool_t *pool);
308 
309 /**
310  * Similar to svn_wc_adm_open2(), but with @a tree_lock instead of
311  * @a levels_to_lock. @a levels_to_lock is set to -1 if @a tree_lock
312  * is @c TRUE, else 0.
313  *
314  * @deprecated Provided for backward compatibility with the 1.0 API.
315  */
317 svn_error_t *
319  svn_wc_adm_access_t *associated,
320  const char *path,
321  svn_boolean_t write_lock,
322  svn_boolean_t tree_lock,
323  apr_pool_t *pool);
324 
325 /**
326  * Checks the working copy to determine the node type of @a path. If
327  * @a path is a versioned directory then the behaviour is like that of
328  * svn_wc_adm_open3(), otherwise, if @a path is a file or does not
329  * exist, then the behaviour is like that of svn_wc_adm_open3() with
330  * @a path replaced by the parent directory of @a path. If @a path is
331  * an unversioned directory, the behaviour is also like that of
332  * svn_wc_adm_open3() on the parent, except that if the open fails,
333  * then the returned #SVN_ERR_WC_NOT_DIRECTORY error refers to @a path,
334  * not to @a path's parent.
335  *
336  * @since New in 1.2.
337  * @deprecated Provided for backward compatibility with the 1.6 API.
338  * Callers should use a #svn_wc_context_t object to access the working
339  * copy.
340  */
342 svn_error_t *
344  svn_wc_adm_access_t *associated,
345  const char *path,
346  svn_boolean_t write_lock,
347  int levels_to_lock,
348  svn_cancel_func_t cancel_func,
349  void *cancel_baton,
350  apr_pool_t *pool);
351 
352 /**
353  * Similar to svn_wc_adm_probe_open3() without the cancel
354  * functionality.
355  *
356  * @deprecated Provided for backward compatibility with the 1.1 API.
357  */
359 svn_error_t *
361  svn_wc_adm_access_t *associated,
362  const char *path,
363  svn_boolean_t write_lock,
364  int levels_to_lock,
365  apr_pool_t *pool);
366 
367 /**
368  * Similar to svn_wc_adm_probe_open2(), but with @a tree_lock instead of
369  * @a levels_to_lock. @a levels_to_lock is set to -1 if @a tree_lock
370  * is @c TRUE, else 0.
371  *
372  * @deprecated Provided for backward compatibility with the 1.0 API.
373  */
375 svn_error_t *
377  svn_wc_adm_access_t *associated,
378  const char *path,
379  svn_boolean_t write_lock,
380  svn_boolean_t tree_lock,
381  apr_pool_t *pool);
382 
383 /**
384  * Open access batons for @a path and return in @a *anchor_access and
385  * @a *target the anchor and target required to drive an editor. Return
386  * in @a *target_access the access baton for the target, which may be the
387  * same as @a *anchor_access (in which case @a *target is the empty
388  * string, never NULL). All the access batons will be in the
389  * @a *anchor_access set.
390  *
391  * @a levels_to_lock determines the levels_to_lock used when opening
392  * @a path if @a path is a versioned directory, @a levels_to_lock is
393  * ignored otherwise. If @a write_lock is @c TRUE the access batons
394  * will hold write locks.
395  *
396  * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
397  * if the client has canceled the operation.
398  *
399  * This function is essentially a combination of svn_wc_adm_open3() and
400  * svn_wc_get_actual_target(), with the emphasis on reducing physical IO.
401  *
402  * @since New in 1.2.
403  * @deprecated Provided for backward compatibility with the 1.6 API.
404  * Callers should use a #svn_wc_context_t object to access the working
405  * copy.
406  */
408 svn_error_t *
410  svn_wc_adm_access_t **target_access,
411  const char **target,
412  const char *path,
413  svn_boolean_t write_lock,
414  int levels_to_lock,
415  svn_cancel_func_t cancel_func,
416  void *cancel_baton,
417  apr_pool_t *pool);
418 
419 /** Return, in @a *adm_access, a pointer to an existing access baton associated
420  * with @a path. @a path must be a directory that is locked as part of the
421  * set containing the @a associated access baton.
422  *
423  * If the requested access baton is marked as missing in, or is simply
424  * absent from, @a associated, return #SVN_ERR_WC_NOT_LOCKED.
425  *
426  * @a pool is used only for local processing, it is not used for the batons.
427  *
428  * @deprecated Provided for backward compatibility with the 1.6 API.
429  */
431 svn_error_t *
433  svn_wc_adm_access_t *associated,
434  const char *path,
435  apr_pool_t *pool);
436 
437 /** Check the working copy to determine the node type of @a path. If
438  * @a path is a versioned directory then the behaviour is like that of
439  * svn_wc_adm_retrieve(), otherwise, if @a path is a file, an unversioned
440  * directory, or does not exist, then the behaviour is like that of
441  * svn_wc_adm_retrieve() with @a path replaced by the parent directory of
442  * @a path.
443  *
444  * @deprecated Provided for backward compatibility with the 1.6 API.
445  */
447 svn_error_t *
449  svn_wc_adm_access_t *associated,
450  const char *path,
451  apr_pool_t *pool);
452 
453 /**
454  * Try various ways to obtain an access baton for @a path.
455  *
456  * First, try to obtain @a *adm_access via svn_wc_adm_probe_retrieve(),
457  * but if this fails because @a associated can't give a baton for
458  * @a path or @a path's parent, then try svn_wc_adm_probe_open3(),
459  * this time passing @a write_lock and @a levels_to_lock. If there is
460  * still no access because @a path is not a versioned directory, then
461  * just set @a *adm_access to NULL and return success. But if it is
462  * because @a path is locked, then return the error #SVN_ERR_WC_LOCKED,
463  * and the effect on @a *adm_access is undefined. (Or if the attempt
464  * fails for any other reason, return the corresponding error, and the
465  * effect on @a *adm_access is also undefined.)
466  *
467  * If svn_wc_adm_probe_open3() succeeds, then add @a *adm_access to
468  * @a associated.
469  *
470  * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
471  * if the client has canceled the operation.
472  *
473  * Use @a pool only for local processing, not to allocate @a *adm_access.
474  *
475  * @since New in 1.2.
476  * @deprecated Provided for backward compatibility with the 1.6 API.
477  */
479 svn_error_t *
481  svn_wc_adm_access_t *associated,
482  const char *path,
483  svn_boolean_t write_lock,
484  int levels_to_lock,
485  svn_cancel_func_t cancel_func,
486  void *cancel_baton,
487  apr_pool_t *pool);
488 
489 /**
490  * Similar to svn_wc_adm_probe_try3() without the cancel
491  * functionality.
492  *
493  * @deprecated Provided for backward compatibility with the 1.1 API.
494  */
496 svn_error_t *
498  svn_wc_adm_access_t *associated,
499  const char *path,
500  svn_boolean_t write_lock,
501  int levels_to_lock,
502  apr_pool_t *pool);
503 
504 /**
505  * Similar to svn_wc_adm_probe_try2(), but with @a tree_lock instead of
506  * @a levels_to_lock. @a levels_to_lock is set to -1 if @a tree_lock
507  * is @c TRUE, else 0.
508  *
509  * @deprecated Provided for backward compatibility with the 1.0 API.
510  */
512 svn_error_t *
514  svn_wc_adm_access_t *associated,
515  const char *path,
516  svn_boolean_t write_lock,
517  svn_boolean_t tree_lock,
518  apr_pool_t *pool);
519 
520 
521 /** Give up the access baton @a adm_access, and its lock if any. This will
522  * recursively close any batons in the same set that are direct
523  * subdirectories of @a adm_access. Any physical locks will be removed from
524  * the working copy. Lock removal is unconditional, there is no check to
525  * determine if cleanup is required.
526  *
527  * Any temporary allocations are performed using @a scratch_pool.
528  *
529  * @since New in 1.6
530  * @deprecated Provided for backward compatibility with the 1.6 API.
531  */
533 svn_error_t *
535  apr_pool_t *scratch_pool);
536 
537 /**
538  * Similar to svn_wc_adm_close2(), but with the internal pool of @a adm_access
539  * used for temporary allocations.
540  *
541  * @deprecated Provided for backward compatibility with the 1.5 API.
542  */
544 svn_error_t *
546 
547 /** Return the path used to open the access baton @a adm_access.
548  *
549  * @deprecated Provided for backward compatibility with the 1.6 API.
550  */
552 const char *
554 
555 /** Return the pool used by access baton @a adm_access.
556  *
557  * @deprecated Provided for backward compatibility with the 1.6 API.
558  */
560 apr_pool_t *
562 
563 /** Return @c TRUE is the access baton @a adm_access has a write lock,
564  * @c FALSE otherwise. Compared to svn_wc_locked() this is a cheap, fast
565  * function that doesn't access the filesystem.
566  *
567  * @deprecated Provided for backward compatibility with the 1.6 API.
568  * New code should use svn_wc_locked2() instead.
569  */
572 svn_wc_adm_locked(const svn_wc_adm_access_t *adm_access);
573 
574 /** @} */
575 
576 
577 /** Gets up to two booleans indicating whether a path is locked for
578  * writing.
579  *
580  * @a locked_here is set to TRUE when a write lock on @a local_abspath
581  * exists in @a wc_ctx. @a locked is set to TRUE when there is a
582  * write_lock on @a local_abspath
583  *
584  * @a locked_here and/or @a locked can be NULL when you are not
585  * interested in a specific value
586  *
587  * @since New in 1.7.
588  */
589 svn_error_t *
590 svn_wc_locked2(svn_boolean_t *locked_here,
591  svn_boolean_t *locked,
592  svn_wc_context_t *wc_ctx,
593  const char *local_abspath,
594  apr_pool_t *scratch_pool);
595 
596 /** Set @a *locked to non-zero if @a path is locked, else set it to zero.
597  *
598  * New code should use svn_wc_locked2() instead.
599  *
600  * @deprecated Provided for backward compatibility with the 1.6 API.
601  */
603 svn_error_t *
605  const char *path,
606  apr_pool_t *pool);
607 
608 
609 /**
610  * @defgroup svn_wc_adm_dir_name Name of Subversion's admin dir
611  * @{
612  */
613 
614 /** The default name of the administrative subdirectory.
615  *
616  * Ideally, this would be completely private to wc internals (in fact,
617  * it used to be that adm_subdir() in adm_files.c was the only function
618  * who knew the adm subdir's name). However, import wants to protect
619  * against importing administrative subdirs, so now the name is a
620  * matter of public record.
621  *
622  * @deprecated Provided for backward compatibility with the 1.2 API.
623  */
624 #define SVN_WC_ADM_DIR_NAME ".svn"
625 
626 
627 /**
628  * Return @c TRUE if @a name is the name of the WC administrative
629  * directory. Use @a pool for any temporary allocations. Only works
630  * with base directory names, not paths or URIs.
631  *
632  * For compatibility, the default name (.svn) will always be treated
633  * as an admin dir name, even if the working copy is actually using an
634  * alternative name.
635  *
636  * @since New in 1.3.
637  */
639 svn_wc_is_adm_dir(const char *name, apr_pool_t *pool);
640 
641 
642 /**
643  * Return the name of the administrative directory.
644  * Use @a pool for any temporary allocations.
645  *
646  * The returned pointer will refer to either a statically allocated
647  * string, or to a string allocated in @a pool.
648  *
649  * @since New in 1.3.
650  */
651 const char *
652 svn_wc_get_adm_dir(apr_pool_t *pool);
653 
654 
655 /**
656  * Use @a name for the administrative directory in the working copy.
657  * Use @a pool for any temporary allocations.
658  *
659  * The list of valid names is limited. Currently only ".svn" (the
660  * default) and "_svn" are allowed.
661  *
662  * @note This function changes global (per-process) state and must be
663  * called in a single-threaded context during the initialization of a
664  * Subversion client.
665  *
666  * @since New in 1.3.
667  */
668 svn_error_t *
669 svn_wc_set_adm_dir(const char *name,
670  apr_pool_t *pool);
671 
672 /** @} */
673 
674 
675 /**
676  * @defgroup svn_wc_externals Externals
677  * @{
678  */
679 
680 /** Callback for external definitions updates
681  *
682  * @a local_abspath is the path on which the external definition was found.
683  * @a old_val and @a new_val are the before and after values of the
684  * SVN_PROP_EXTERNALS property. @a depth is the ambient depth of the
685  * working copy directory at @a local_abspath.
686  *
687  * @since New in 1.7. */
688 typedef svn_error_t *(*svn_wc_external_update_t)(void *baton,
689  const char *local_abspath,
690  const svn_string_t *old_val,
691  const svn_string_t *new_val,
692  svn_depth_t depth,
693  apr_pool_t *scratch_pool);
694 
695 /** Traversal information is information gathered by a working copy
696  * crawl or update. For example, the before and after values of the
697  * svn:externals property are important after an update, and since
698  * we're traversing the working tree anyway (a complete traversal
699  * during the initial crawl, and a traversal of changed paths during
700  * the checkout/update/switch), it makes sense to gather the
701  * property's values then instead of making a second pass.
702  *
703  * New code should use the svn_wc_external_update_t callback instead.
704  *
705  * @deprecated Provided for backward compatibility with the 1.6 API.
706  */
708 
709 
710 /** Return a new, empty traversal info object, allocated in @a pool.
711  *
712  * New code should use the svn_wc_external_update_t callback instead.
713  *
714  * @deprecated Provided for backward compatibility with the 1.6 API.
715  */
718 svn_wc_init_traversal_info(apr_pool_t *pool);
719 
720 /** Set @a *externals_old and @a *externals_new to hash tables representing
721  * changes to values of the svn:externals property on directories
722  * traversed by @a traversal_info.
723  *
724  * @a traversal_info is obtained from svn_wc_init_traversal_info(), but is
725  * only useful after it has been passed through another function, such
726  * as svn_wc_crawl_revisions(), svn_wc_get_update_editor(),
727  * svn_wc_get_switch_editor(), etc.
728  *
729  * Each hash maps <tt>const char *</tt> directory names onto
730  * <tt>const char *</tt> values of the externals property for that directory.
731  * The dir names are full paths -- that is, anchor plus target, not target
732  * alone. The values are not parsed, they are simply copied raw, and are
733  * never NULL: directories that acquired or lost the property are
734  * simply omitted from the appropriate table. Directories whose value
735  * of the property did not change show the same value in each hash.
736  *
737  * The hashes, keys, and values have the same lifetime as @a traversal_info.
738  *
739  * New code should use the svn_wc_external_update_t callback instead.
740  *
741  * @deprecated Provided for backward compatibility with the 1.6 API.
742  */
744 void
745 svn_wc_edited_externals(apr_hash_t **externals_old,
746  apr_hash_t **externals_new,
747  svn_wc_traversal_info_t *traversal_info);
748 
749 
750 /** Set @a *depths to a hash table mapping <tt>const char *</tt>
751  * directory names (directories traversed by @a traversal_info) to
752  * <tt>const char *</tt> values (the depths of those directories, as
753  * converted by svn_depth_to_word()).
754  *
755  * @a traversal_info is obtained from svn_wc_init_traversal_info(), but is
756  * only useful after it has been passed through another function, such
757  * as svn_wc_crawl_revisions(), svn_wc_get_update_editor(),
758  * svn_wc_get_switch_editor(), etc.
759  *
760  * The dir names are full paths -- that is, anchor plus target, not target
761  * alone. The values are not allocated, they are static constant strings.
762  * Although the values are never NULL, not all directories traversed
763  * are necessarily listed. For example, directories which did not
764  * have an svn:externals property set or modified are not included.
765  *
766  * The hashes and keys have the same lifetime as @a traversal_info.
767  *
768  * New code should use the svn_wc_external_update_t callback instead.
769  *
770  * @since New in 1.5.
771  * @deprecated Provided for backward compatibility with the 1.6 API.
772  */
774 void
775 svn_wc_traversed_depths(apr_hash_t **depths,
776  svn_wc_traversal_info_t *traversal_info);
777 
778 
779 /** One external item. This usually represents one line from an
780  * svn:externals description but with the path and URL
781  * canonicalized.
782  *
783  * In order to avoid backwards compatibility problems clients should use
784  * svn_wc_external_item2_create() to allocate and initialize this structure
785  * instead of doing so themselves.
786  *
787  * @since New in 1.5.
788  */
790 {
791  /** The name of the subdirectory into which this external should be
792  checked out. This is relative to the parent directory that
793  holds this external item. (Note that these structs are often
794  stored in hash tables with the target dirs as keys, so this
795  field will often be redundant.) */
796  const char *target_dir;
797 
798  /** Where to check out from. This is possibly a relative external URL, as
799  * allowed in externals definitions, but without the peg revision. */
800  const char *url;
801 
802  /** What revision to check out. The only valid kinds for this are
803  svn_opt_revision_number, svn_opt_revision_date, and
804  svn_opt_revision_head. */
806 
807  /** The peg revision to use when checking out. The only valid kinds are
808  svn_opt_revision_number, svn_opt_revision_date, and
809  svn_opt_revision_head. */
811 
813 
814 /**
815  * Initialize an external item.
816  * Set @a *item to an external item object, allocated in @a pool.
817  *
818  * In order to avoid backwards compatibility problems, this function
819  * is used to initialize and allocate the #svn_wc_external_item2_t
820  * structure rather than doing so explicitly, as the size of this
821  * structure may change in the future.
822  *
823  * The current implementation never returns error, but callers should
824  * still check for error, for compatibility with future versions.
825  *
826  * @since New in 1.8.
827  */
828 svn_error_t *
830  apr_pool_t *pool);
831 
832 /** Same as svn_wc_external_item2_create() except the pointer to the new
833  * empty item is 'const' which is stupid since the next thing you need to do
834  * is fill in its fields.
835  *
836  * @deprecated Provided for backward compatibility with the 1.7 API.
837  * @since New in 1.5.
838  */
840 svn_error_t *
842  apr_pool_t *pool);
843 
844 /**
845  * Return a duplicate of @a item, allocated in @a pool. No part of the new
846  * item will be shared with @a item.
847  *
848  * @since New in 1.5.
849  */
852  apr_pool_t *pool);
853 
854 /**
855  * One external item. Similar to svn_wc_external_item2_t, except
856  * @a revision is interpreted as both the operational revision and the
857  * peg revision.
858  *
859  * @deprecated Provided for backward compatibility with the 1.4 API.
860  */
862 {
863  /** Same as #svn_wc_external_item2_t.target_dir */
864  const char *target_dir;
865 
866  /** Same as #svn_wc_external_item2_t.url */
867  const char *url;
868 
869  /** Same as #svn_wc_external_item2_t.revision */
871 
873 
874 /**
875  * Return a duplicate of @a item, allocated in @a pool. No part of the new
876  * item will be shared with @a item.
877  *
878  * @since New in 1.3.
879  *
880  * @deprecated Provided for backward compatibility with the 1.4 API.
881  */
885  apr_pool_t *pool);
886 
887 /**
888  * If @a externals_p is non-NULL, set @a *externals_p to an array of
889  * #svn_wc_external_item2_t * objects based on @a desc.
890  *
891  * If the format of @a desc is invalid, don't touch @a *externals_p and
892  * return #SVN_ERR_CLIENT_INVALID_EXTERNALS_DESCRIPTION. Thus, if
893  * you just want to check the validity of an externals description,
894  * and don't care about the parsed result, pass NULL for @a externals_p.
895  *
896  * The format of @a desc is the same as for values of the directory
897  * property #SVN_PROP_EXTERNALS. Look there for more details.
898  *
899  * If @a canonicalize_url is @c TRUE, canonicalize the @a url member
900  * of those objects. If the @a url member refers to an absolute URL,
901  * it will be canonicalized as URL consistent with the way URLs are
902  * canonicalized throughout the Subversion API. If, however, the
903  * @a url member makes use of the recognized (SVN-specific) relative
904  * URL syntax for svn:externals, "canonicalization" is an ill-defined
905  * concept which may even result in munging the relative URL syntax
906  * beyond recognition. You've been warned.
907  *
908  * Allocate the table, keys, and values in @a pool.
909  *
910  * Use @a parent_directory only in constructing error strings.
911  *
912  * @since New in 1.5.
913  */
914 svn_error_t *
915 svn_wc_parse_externals_description3(apr_array_header_t **externals_p,
916  const char *parent_directory,
917  const char *desc,
918  svn_boolean_t canonicalize_url,
919  apr_pool_t *pool);
920 
921 /**
922  * Similar to svn_wc_parse_externals_description3() with @a
923  * canonicalize_url set to @c TRUE, but returns an array of
924  * #svn_wc_external_item_t * objects instead of
925  * #svn_wc_external_item2_t * objects
926  *
927  * @since New in 1.1.
928  *
929  * @deprecated Provided for backward compatibility with the 1.4 API.
930  */
932 svn_error_t *
933 svn_wc_parse_externals_description2(apr_array_header_t **externals_p,
934  const char *parent_directory,
935  const char *desc,
936  apr_pool_t *pool);
937 
938 /**
939  * Similar to svn_wc_parse_externals_description2(), but returns the
940  * parsed externals in a hash instead of an array. This function
941  * should not be used, as storing the externals in a hash causes their
942  * order of evaluation to be not easily identifiable.
943  *
944  * @deprecated Provided for backward compatibility with the 1.0 API.
945  */
947 svn_error_t *
948 svn_wc_parse_externals_description(apr_hash_t **externals_p,
949  const char *parent_directory,
950  const char *desc,
951  apr_pool_t *pool);
952 
953 /** @} */
954 
955 
956 /**
957  * @defgroup svn_wc_notifications Notification callback handling
958  * @{
959  *
960  * In many cases, the WC library will scan a working copy and make
961  * changes. The caller usually wants to know when each of these changes
962  * has been made, so that it can display some kind of notification to
963  * the user.
964  *
965  * These notifications have a standard callback function type, which
966  * takes the path of the file that was affected, and a caller-
967  * supplied baton.
968  *
969  * @note The callback is a 'void' return -- this is a simple
970  * reporting mechanism, rather than an opportunity for the caller to
971  * alter the operation of the WC library.
972  *
973  * @note Some of the actions are used across several
974  * different Subversion commands. For example, the update actions are
975  * also used for checkouts, switches, and merges.
976  */
977 
978 /** The type of action occurring. */
980 {
981  /** Adding a path to revision control. */
983 
984  /** Copying a versioned path. */
986 
987  /** Deleting a versioned path. */
989 
990  /** Restoring a missing path from the pristine text-base. */
992 
993  /** Reverting a modified path. */
995 
996  /** A revert operation has failed. */
998 
999  /** Resolving a conflict. */
1001 
1002  /** Skipping a path. */
1004 
1005  /** Got a delete in an update. */
1007 
1008  /** Got an add in an update. */
1010 
1011  /** Got any other action in an update. */
1013 
1014  /** The last notification in an update (including updates of externals). */
1016 
1017  /** Updating an external module. */
1019 
1020  /** The last notification in a status (including status on externals). */
1022 
1023  /** Running status on an external module. */
1025 
1026  /** Committing a modification. */
1028 
1029  /** Committing an addition. */
1031 
1032  /** Committing a deletion. */
1034 
1035  /** Committing a replacement. */
1037 
1038  /** Transmitting post-fix text-delta data for a file. */
1040 
1041  /** Processed a single revision's blame. */
1043 
1044  /** Locking a path. @since New in 1.2. */
1046 
1047  /** Unlocking a path. @since New in 1.2. */
1049 
1050  /** Failed to lock a path. @since New in 1.2. */
1052 
1053  /** Failed to unlock a path. @since New in 1.2. */
1055 
1056  /** Tried adding a path that already exists. @since New in 1.5. */
1058 
1059  /** Changelist name set. @since New in 1.5. */
1061 
1062  /** Changelist name cleared. @since New in 1.5. */
1064 
1065  /** Warn user that a path has moved from one changelist to another.
1066  @since New in 1.5.
1067  @deprecated As of 1.7, separate clear and set notifications are sent. */
1069 
1070  /** A merge operation (to path) has begun. See #svn_wc_notify_t.merge_range.
1071  @since New in 1.5. */
1073 
1074  /** A merge operation (to path) from a foreign repository has begun.
1075  See #svn_wc_notify_t.merge_range. @since New in 1.5. */
1077 
1078  /** Replace notification. @since New in 1.5. */
1080 
1081  /** Property added. @since New in 1.6. */
1083 
1084  /** Property updated. @since New in 1.6. */
1086 
1087  /** Property deleted. @since New in 1.6. */
1089 
1090  /** Nonexistent property deleted. @since New in 1.6. */
1092 
1093  /** Revprop set. @since New in 1.6. */
1095 
1096  /** Revprop deleted. @since New in 1.6. */
1098 
1099  /** The last notification in a merge. @since New in 1.6. */
1101 
1102  /** The path is a tree-conflict victim of the intended action (*not*
1103  * a persistent tree-conflict from an earlier operation, but *this*
1104  * operation caused the tree-conflict). @since New in 1.6. */
1106 
1107  /** The path is a subdirectory referenced in an externals definition
1108  * which is unable to be operated on. @since New in 1.6. */
1110 
1111  /** Starting an update operation. @since New in 1.7. */
1113 
1114  /** An update tried to add a file or directory at a path where
1115  * a separate working copy was found. @since New in 1.7. */
1117 
1118  /** An explicit update tried to update a file or directory that
1119  * doesn't live in the repository and can't be brought in.
1120  * @since New in 1.7. */
1122 
1123  /** An update tried to update a file or directory to which access could
1124  * not be obtained. @since New in 1.7. */
1126 
1127  /** An update operation removed an external working copy.
1128  * @since New in 1.7. */
1130 
1131  /** A node below an existing node was added during update.
1132  * @since New in 1.7. */
1134 
1135  /** A node below an existing node was updated during update.
1136  * @since New in 1.7. */
1138 
1139  /** A node below an existing node was deleted during update.
1140  * @since New in 1.7. */
1142 
1143  /** The mergeinfo on path was updated. @since New in 1.7. */
1145 
1146  /** A working copy directory was upgraded to the latest format.
1147  * @since New in 1.7. */
1149 
1150  /** Mergeinfo describing a merge was recorded.
1151  * @since New in 1.7. */
1153 
1154  /** Mergeinfo was removed due to elision.
1155  * @since New in 1.7. */
1157 
1158  /** A file in the working copy was patched.
1159  * @since New in 1.7. */
1161 
1162  /** A hunk from a patch was applied.
1163  * @since New in 1.7. */
1165 
1166  /** A hunk from a patch was rejected.
1167  * @since New in 1.7. */
1169 
1170  /** A hunk from a patch was found to already be applied.
1171  * @since New in 1.7. */
1173 
1174  /** Committing a non-overwriting copy (path is the target of the
1175  * copy, not the source).
1176  * @since New in 1.7. */
1178 
1179  /** Committing an overwriting (replace) copy (path is the target of
1180  * the copy, not the source).
1181  * @since New in 1.7. */
1183 
1184  /** The server has instructed the client to follow a URL
1185  * redirection.
1186  * @since New in 1.7. */
1188 
1189  /** The operation was attempted on a path which doesn't exist.
1190  * @since New in 1.7. */
1192 
1193  /** Removing a path by excluding it.
1194  * @since New in 1.7. */
1196 
1197  /** Operation failed because the node remains in conflict
1198  * @since New in 1.7. */
1200 
1201  /** Operation failed because an added node is missing
1202  * @since New in 1.7. */
1204 
1205  /** Operation failed because a node is out of date
1206  * @since New in 1.7. */
1208 
1209  /** Operation failed because an added parent is not selected
1210  * @since New in 1.7. */
1212 
1213  /** Operation failed because a node is locked by another user and/or
1214  * working copy. @since New in 1.7. */
1216 
1217  /** Operation failed because the operation was forbidden by the server.
1218  * @since New in 1.7. */
1220 
1221  /** The operation skipped the path because it was conflicted.
1222  * @since New in 1.7. */
1224 
1225  /** Just the lock on a file was removed during update.
1226  * @since New in 1.8. */
1228 
1229  /** Operation failed because a node is obstructed.
1230  * @since New in 1.8. */
1232 
1233  /** Conflict resolver is starting.
1234  * This can be used by clients to detect when to display conflict summary
1235  * information, for example.
1236  * @since New in 1.8. */
1238 
1239  /** Conflict resolver is done.
1240  * This can be used by clients to detect when to display conflict summary
1241  * information, for example.
1242  * @since New in 1.8. */
1244 
1245  /** The current operation left local changes of something that was deleted
1246  * The changes are available on (and below) the notified path
1247  * @since New in 1.8. */
1249 
1250  /** A copy from a foreign repository has started
1251  * @since New in 1.8. */
1253 
1254  /** A move in the working copy has been broken, i.e. degraded into a
1255  * copy + delete. The notified path is the move source (the deleted path).
1256  * ### TODO: Provide path to move destination as well?
1257  * @since New in 1.8. */
1259 
1261 
1262 
1263 /** The type of notification that is occurring. */
1265 {
1266  svn_wc_notify_state_inapplicable = 0,
1267 
1268  /** Notifier doesn't know or isn't saying. */
1270 
1271  /** The state did not change. */
1273 
1274  /** The item wasn't present. */
1276 
1277  /** An unversioned item obstructed work. */
1279 
1280  /** Pristine state was modified. */
1282 
1283  /** Modified state had mods merged in. */
1285 
1286  /** Modified state got conflicting mods. */
1288 
1289  /** The source to copy the file from is missing. */
1291 
1293 
1294 /**
1295  * What happened to a lock during an operation.
1296  *
1297  * @since New in 1.2.
1298  */
1300 {
1301  svn_wc_notify_lock_state_inapplicable = 0,
1302 
1303  svn_wc_notify_lock_state_unknown,
1304 
1305  /** The lock wasn't changed. */
1307 
1308  /** The item was locked. */
1310 
1311  /** The item was unlocked. */
1313 
1315 
1316 /**
1317  * Structure used in the #svn_wc_notify_func2_t function.
1318  *
1319  * @c kind, @c content_state, @c prop_state and @c lock_state are from
1320  * after @c action, not before.
1321  *
1322  * @note If @c action is #svn_wc_notify_update_completed, then @c path has
1323  * already been installed, so it is legitimate for an implementation of
1324  * #svn_wc_notify_func2_t to examine @c path in the working copy.
1325  *
1326  * @note The purpose of the @c kind, @c mime_type, @c content_state, and
1327  * @c prop_state fields is to provide "for free" information that an
1328  * implementation is likely to want, and which it would otherwise be
1329  * forced to deduce via expensive operations such as reading entries
1330  * and properties. However, if the caller does not have this
1331  * information, it will simply pass the corresponding `*_unknown'
1332  * values, and it is up to the implementation how to handle that
1333  * (i.e., whether to attempt deduction, or just to punt and
1334  * give a less informative notification).
1335  *
1336  * @note Callers of notification functions should use svn_wc_create_notify()
1337  * or svn_wc_create_notify_url() to create structures of this type to allow
1338  * for extensibility.
1339  *
1340  * @since New in 1.2.
1341  */
1342 typedef struct svn_wc_notify_t {
1343 
1344  /** Path, either absolute or relative to the current working directory
1345  * (i.e., not relative to an anchor). @c path is "." or another valid path
1346  * value for compatibility reasons when the real target is a url that
1347  * is available in @c url. */
1348  const char *path;
1349 
1350  /** Action that describes what happened to #svn_wc_notify_t.path. */
1352 
1353  /** Node kind of @c path. */
1355 
1356  /** If non-NULL, indicates the mime-type of @c path.
1357  * It is always @c NULL for directories. */
1358  const char *mime_type;
1359 
1360  /** Points to the lock structure received from the repository when
1361  * @c action is #svn_wc_notify_locked. For other actions, it is
1362  * @c NULL. */
1364 
1365  /** Points to an error describing the reason for the failure when @c
1366  * action is one of the following: #svn_wc_notify_failed_lock,
1367  * #svn_wc_notify_failed_unlock, #svn_wc_notify_failed_external.
1368  * Is @c NULL otherwise. */
1370 
1371  /** The type of notification that is occurring about node content. */
1373 
1374  /** The type of notification that is occurring about node properties. */
1376 
1377  /** Reflects the addition or removal of a lock token in the working copy. */
1379 
1380  /** When @c action is #svn_wc_notify_update_completed, target revision
1381  * of the update, or #SVN_INVALID_REVNUM if not available; when @c
1382  * action is #svn_wc_notify_blame_revision, processed revision; Since
1383  * Subversion 1.7 when action is #svn_wc_notify_update_update or
1384  * #svn_wc_notify_update_add, the target revision.
1385  * In all other cases, it is #SVN_INVALID_REVNUM.
1386  */
1388 
1389  /** If @c action pertains to a changelist, this is the changelist name.
1390  * In all other cases, it is @c NULL. @since New in 1.5 */
1391  const char *changelist_name;
1392 
1393  /** When @c action is #svn_wc_notify_merge_begin or
1394  * #svn_wc_notify_foreign_merge_begin or
1395  * #svn_wc_notify_merge_record_info_begin, and both the
1396  * left and right sides of the merge are from the same URL. In all
1397  * other cases, it is @c NULL. @since New in 1.5 */
1399 
1400  /** Similar to @c path, but if non-NULL the notification is about a url.
1401  * @since New in 1.6 */
1402  const char *url;
1403 
1404  /** If non-NULL, specifies an absolute path prefix that can be subtracted
1405  * from the start of the absolute path in @c path or @c url. Its purpose
1406  * is to allow notification to remove a common prefix from all the paths
1407  * displayed for an operation. @since New in 1.6 */
1408  const char *path_prefix;
1409 
1410  /** If @c action relates to properties, specifies the name of the property.
1411  * @since New in 1.6 */
1412  const char *prop_name;
1413 
1414  /** If @c action is #svn_wc_notify_blame_revision, contains a list of
1415  * revision properties for the specified revision
1416  * @since New in 1.6 */
1417  apr_hash_t *rev_props;
1418 
1419  /** If @c action is #svn_wc_notify_update_update or
1420  * #svn_wc_notify_update_add, contains the revision before the update.
1421  * In all other cases, it is #SVN_INVALID_REVNUM.
1422  * @since New in 1.7 */
1424 
1425  /** These fields are used by svn patch to identify the
1426  * hunk the notification is for. They are line-based
1427  * offsets and lengths parsed from the unidiff hunk header.
1428  * @since New in 1.7. */
1429  /* @{ */
1431  svn_linenum_t hunk_original_length;
1432  svn_linenum_t hunk_modified_start;
1433  svn_linenum_t hunk_modified_length;
1434  /* @} */
1435 
1436  /** The line at which a hunk was matched (and applied).
1437  * @since New in 1.7. */
1439 
1440  /** The fuzz factor the hunk was applied with.
1441  * @since New in 1.7 */
1443 
1444  /* NOTE: Add new fields at the end to preserve binary compatibility.
1445  Also, if you add fields here, you have to update svn_wc_create_notify
1446  and svn_wc_dup_notify. */
1447 } svn_wc_notify_t;
1448 
1449 /**
1450  * Allocate an #svn_wc_notify_t structure in @a pool, initialize and return
1451  * it.
1452  *
1453  * Set the @c path field of the created struct to @a path, and @c action to
1454  * @a action. Set all other fields to their @c _unknown, @c NULL or
1455  * invalid value, respectively. Make only a shallow copy of the pointer
1456  * @a path.
1457  *
1458  * @since New in 1.2.
1459  */
1461 svn_wc_create_notify(const char *path,
1462  svn_wc_notify_action_t action,
1463  apr_pool_t *pool);
1464 
1465 /**
1466  * Allocate an #svn_wc_notify_t structure in @a pool, initialize and return
1467  * it.
1468  *
1469  * Set the @c url field of the created struct to @a url, @c path to "." and @c
1470  * action to @a action. Set all other fields to their @c _unknown, @c NULL or
1471  * invalid value, respectively. Make only a shallow copy of the pointer
1472  * @a url.
1473  *
1474  * @since New in 1.6.
1475  */
1477 svn_wc_create_notify_url(const char *url,
1478  svn_wc_notify_action_t action,
1479  apr_pool_t *pool);
1480 
1481 /**
1482  * Return a deep copy of @a notify, allocated in @a pool.
1483  *
1484  * @since New in 1.2.
1485  */
1487 svn_wc_dup_notify(const svn_wc_notify_t *notify,
1488  apr_pool_t *pool);
1489 
1490 /**
1491  * Notify the world that @a notify->action has happened to @a notify->path.
1492  *
1493  * Recommendation: callers of #svn_wc_notify_func2_t should avoid
1494  * invoking it multiple times on the same path within a given
1495  * operation, and implementations should not bother checking for such
1496  * duplicate calls. For example, in an update, the caller should not
1497  * invoke the notify func on receiving a prop change and then again
1498  * on receiving a text change. Instead, wait until all changes have
1499  * been received, and then invoke the notify func once (from within
1500  * an #svn_delta_editor_t's close_file(), for example), passing
1501  * the appropriate @a notify->content_state and @a notify->prop_state flags.
1502  *
1503  * @since New in 1.2.
1504  */
1505 typedef void (*svn_wc_notify_func2_t)(void *baton,
1506  const svn_wc_notify_t *notify,
1507  apr_pool_t *pool);
1508 
1509 /**
1510  * Similar to #svn_wc_notify_func2_t, but takes the information as arguments
1511  * instead of struct fields.
1512  *
1513  * @deprecated Provided for backward compatibility with the 1.1 API.
1514  */
1515 typedef void (*svn_wc_notify_func_t)(void *baton,
1516  const char *path,
1517  svn_wc_notify_action_t action,
1518  svn_node_kind_t kind,
1519  const char *mime_type,
1520  svn_wc_notify_state_t content_state,
1521  svn_wc_notify_state_t prop_state,
1522  svn_revnum_t revision);
1523 
1524 /** @} */
1525 
1526 
1527 /**
1528  * Interactive conflict handling
1529  *
1530  * @defgroup svn_wc_conflict Conflict callback functionality
1531  * @{
1532  *
1533  * This API gives a Subversion client application the opportunity to
1534  * define a callback that allows the user to resolve conflicts
1535  * interactively during updates and merges.
1536  *
1537  * If a conflict is discovered, libsvn_wc invokes the callback with an
1538  * #svn_wc_conflict_description_t. This structure describes the
1539  * path in conflict, whether it's a text or property conflict, and may
1540  * also present up to three files that can be used to resolve the
1541  * conflict (perhaps by launching an editor or 3rd-party merging
1542  * tool). The structure also provides a possible fourth file (@c
1543  * merged_file) which, if not NULL, represents libsvn_wc's attempt to
1544  * contextually merge the first three files. (Note that libsvn_wc
1545  * will not attempt to merge a file that it believes is binary, and it
1546  * will only attempt to merge property values it believes to be a
1547  * series of multi-line text.)
1548  *
1549  * When the callback is finished interacting with the user, it
1550  * responds by returning a #svn_wc_conflict_result_t. This
1551  * structure indicates whether the user wants to postpone the conflict
1552  * for later (allowing libsvn_wc to mark the path "conflicted" as
1553  * usual), or whether the user wants libsvn_wc to use one of the four
1554  * files as the "final" state for resolving the conflict immediately.
1555  *
1556  * Note that the callback is at liberty (and encouraged) to merge the
1557  * three files itself. If it does so, it signals this to libsvn_wc by
1558  * returning a choice of #svn_wc_conflict_choose_merged. To return
1559  * the 'final' merged file to libsvn_wc, the callback has the option of
1560  * either:
1561  *
1562  * - editing the original @c merged_file in-place
1563  *
1564  * or, if libsvn_wc never supplied a merged_file in the
1565  * description structure (i.e. passed NULL for that field),
1566  *
1567  * - return the merged file in the #svn_wc_conflict_result_t.
1568  *
1569  */
1570 
1571 /** The type of action being attempted on an object.
1572  *
1573  * @since New in 1.5.
1574  */
1576 {
1577  svn_wc_conflict_action_edit, /**< attempting to change text or props */
1578  svn_wc_conflict_action_add, /**< attempting to add object */
1579  svn_wc_conflict_action_delete, /**< attempting to delete object */
1580  svn_wc_conflict_action_replace /**< attempting to replace object,
1581  @since New in 1.7 */
1583 
1584 
1585 /** The pre-existing condition which is causing a state of conflict.
1586  *
1587  * @since New in 1.5.
1588  */
1590 {
1591  /** Local edits are already present */
1593  /** Another object is in the way */
1595  /** Object is already schedule-delete */
1597  /** Object is unknown or missing */
1599  /** Object is unversioned */
1601  /** Object is already added or schedule-add. @since New in 1.6. */
1603  /** Object is already replaced. @since New in 1.7. */
1605  /** Object is moved away. @since New in 1.8. */
1607  /** Object is moved here. @since New in 1.8. */
1609 
1611 
1612 
1613 /** The type of conflict being described by an
1614  * #svn_wc_conflict_description2_t (see below).
1615  *
1616  * @since New in 1.5.
1617  */
1619 {
1620  /** textual conflict (on a file) */
1622  /** property conflict (on a file or dir) */
1624  /** tree conflict (on a dir) @since New in 1.6. */
1627 
1628 
1629 /** The user operation that exposed a conflict.
1630  *
1631  * @since New in 1.6.
1632  */
1634 {
1635  svn_wc_operation_none = 0,
1636  svn_wc_operation_update,
1637  svn_wc_operation_switch,
1638  svn_wc_operation_merge
1639 
1641 
1642 
1643 /** Info about one of the conflicting versions of a node. Each field may
1644  * have its respective null/invalid/unknown value if the corresponding
1645  * information is not relevant or not available.
1646  *
1647  * @todo Consider making some or all of the info mandatory, to reduce
1648  * complexity.
1649  *
1650  * @note Fields may be added to the end of this structure in future
1651  * versions. Therefore, to preserve binary compatibility, users
1652  * should not directly allocate structures of this type.
1653  *
1654  * @see svn_wc_conflict_version_create()
1655  * @see svn_wc_conflict_version_dup()
1656  *
1657  * @since New in 1.6.
1658 */
1660 {
1661  /** @name Where to find this node version in a repository */
1662  /**@{*/
1663 
1664  /** URL of repository root */
1665  const char *repos_url;
1666 
1667  /** revision at which to look up path_in_repos */
1669 
1670  /** path within repos; must not start with '/' */
1671  /* ### should have been called repos_relpath, but we can't change this. */
1672  const char *path_in_repos;
1673  /** @} */
1674 
1675  /** The node kind. Can be any kind, including 'none' or 'unknown'. */
1677 
1678  /** UUID of the repository (or NULL if unknown.)
1679  * @since New in 1.8. */
1680  const char *repos_uuid;
1681 
1682  /* @todo Add metadata about a local copy of the node, if and when
1683  * we store one. */
1684 
1685  /* Remember to update svn_wc_conflict_version_create() and
1686  * svn_wc_conflict_version_dup() in case you add fields to this struct. */
1688 
1689 /**
1690  * Allocate an #svn_wc_conflict_version_t structure in @a pool,
1691  * initialize to contain a conflict origin, and return it.
1692  *
1693  * Set the @c repos_url field of the created struct to @a repos_root_url,
1694  * the @c path_in_repos field to @a repos_relpath, the @c peg_rev field to
1695  * @a revision and the @c node_kind to @a kind. Make only shallow
1696  * copies of the pointer arguments.
1697  *
1698  * @a repos_root_url, @a repos_relpath and @a revision must be valid,
1699  * non-null values. @a repos_uuid should be a valid UUID, but can be
1700  * NULL if unknown. @a kind can be any kind, even 'none' or 'unknown'.
1701  *
1702  * @since New in 1.8.
1703  */
1705 svn_wc_conflict_version_create2(const char *repos_root_url,
1706  const char *repos_uuid,
1707  const char *repos_relpath,
1708  svn_revnum_t revision,
1709  svn_node_kind_t kind,
1710  apr_pool_t *result_pool);
1711 
1712 /** Similar to svn_wc_conflict_version_create2(), but doesn't set all
1713  * required values.
1714  *
1715  * @since New in 1.6.
1716  * @deprecated Provided for backward compatibility with the 1.7 API.
1717  */
1720 svn_wc_conflict_version_create(const char *repos_url,
1721  const char *path_in_repos,
1722  svn_revnum_t peg_rev,
1723  svn_node_kind_t node_kind,
1724  apr_pool_t *pool);
1725 
1726 /** Return a duplicate of @a version, allocated in @a pool.
1727  * No part of the new version will be shared with @a version.
1728  *
1729  * @since New in 1.6.
1730  */
1733  apr_pool_t *pool);
1734 
1735 /** A struct that describes a conflict that has occurred in the
1736  * working copy.
1737  *
1738  * The conflict described by this structure is one of:
1739  * - a conflict on the content of the file node @a local_abspath
1740  * - a conflict on the property @a property_name of @a local_abspath
1741  * - a tree conflict, of which @a local_abspath is the victim
1742  * Be aware that the victim of a tree conflict can be a non-existent node.
1743  * The three kinds of conflict are distinguished by @a kind.
1744  *
1745  * @note Fields may be added to the end of this structure in future
1746  * versions. Therefore, to preserve binary compatibility, users
1747  * should not directly allocate structures of this type but should use
1748  * svn_wc_conflict_description_create_text2() or
1749  * svn_wc_conflict_description_create_prop2() or
1750  * svn_wc_conflict_description_create_tree2() instead.
1751  *
1752  * @since New in 1.7.
1753  */
1755 {
1756  /** The path that is in conflict (for a tree conflict, it is the victim) */
1757  const char *local_abspath;
1758 
1759  /** The node type of the path being operated on (for a tree conflict,
1760  * ### which version?) */
1762 
1763  /** What sort of conflict are we describing? */
1765 
1766  /** The name of the property whose conflict is being described.
1767  * (Only if @a kind is 'property'; else undefined.) */
1768  const char *property_name;
1769 
1770  /** Whether svn thinks ('my' version of) @c path is a 'binary' file.
1771  * (Only if @c kind is 'text', else undefined.) */
1773 
1774  /** The svn:mime-type property of ('my' version of) @c path, if available,
1775  * else NULL.
1776  * (Only if @c kind is 'text', else undefined.) */
1777  const char *mime_type;
1778 
1779  /** The action being attempted on the conflicted node or property.
1780  * (When @c kind is 'text', this action must be 'edit'.) */
1782 
1783  /** The state of the target node or property, relative to its merge-left
1784  * source, that is the reason for the conflict.
1785  * (When @c kind is 'text', this reason must be 'edited'.) */
1787 
1788  /** If this is text-conflict and involves the merging of two files
1789  * descended from a common ancestor, here are the paths of up to
1790  * four fulltext files that can be used to interactively resolve the
1791  * conflict.
1792  *
1793  * @a base_abspath, @a their_abspath and @a my_abspath are absolute
1794  * paths.
1795  *
1796  * ### Is @a merged_file relative to some directory, or absolute?
1797  *
1798  * All four files will be in repository-normal form -- LF
1799  * line endings and contracted keywords. (If any of these files are
1800  * not available, they default to NULL.)
1801  *
1802  * On the other hand, if this is a property-conflict, then these
1803  * paths represent temporary files that contain the three different
1804  * property-values in conflict. The fourth path (@c merged_file)
1805  * may or may not be NULL; if set, it represents libsvn_wc's
1806  * attempt to merge the property values together. (Remember that
1807  * property values are technically binary values, and thus can't
1808  * always be merged.)
1809  */
1810  const char *base_abspath; /* common ancestor of the two files being merged */
1811 
1812  /** their version of the file */
1813  /* ### BH: For properties this field contains the reference to
1814  the property rejection (.prej) file */
1815  const char *their_abspath;
1816 
1817  /** my locally-edited version of the file */
1818  const char *my_abspath;
1819 
1820  /** merged version; may contain conflict markers */
1821  const char *merged_file;
1822 
1823  /** The operation that exposed the conflict.
1824  * Used only for tree conflicts.
1825  */
1827 
1828  /** Info on the "merge-left source" or "older" version of incoming change. */
1830 
1831  /** Info on the "merge-right source" or "their" version of incoming change. */
1833 
1834  /* Remember to adjust svn_wc__conflict_description2_dup()
1835  * if you add new fields to this struct. */
1837 
1838 
1839 /** Similar to #svn_wc_conflict_description2_t, but with relative paths and
1840  * adm_access batons. Passed to #svn_wc_conflict_resolver_func_t.
1841  *
1842  * @since New in 1.5.
1843  * @deprecated Provided for backward compatibility with the 1.6 API.
1844  */
1846 {
1847  /** The path that is in conflict (for a tree conflict, it is the victim) */
1848  const char *path;
1849 
1850  /** The node type of the path being operated on (for a tree conflict,
1851  * ### which version?) */
1853 
1854  /** What sort of conflict are we describing? */
1856 
1857  /** The name of the property whose conflict is being described.
1858  * (Only if @a kind is 'property'; else undefined.) */
1859  const char *property_name;
1860 
1861  /** Whether svn thinks ('my' version of) @c path is a 'binary' file.
1862  * (Only if @c kind is 'text', else undefined.) */
1864 
1865  /** The svn:mime-type property of ('my' version of) @c path, if available,
1866  * else NULL.
1867  * (Only if @c kind is 'text', else undefined.) */
1868  const char *mime_type;
1869 
1870  /** If not NULL, an open working copy access baton to either the
1871  * path itself (if @c path is a directory), or to the parent
1872  * directory (if @c path is a file.)
1873  * For a tree conflict, this will always be an access baton
1874  * to the parent directory of the path, even if the path is
1875  * a directory. */
1877 
1878  /** The action being attempted on the conflicted node or property.
1879  * (When @c kind is 'text', this action must be 'edit'.) */
1881 
1882  /** The state of the target node or property, relative to its merge-left
1883  * source, that is the reason for the conflict.
1884  * (When @c kind is 'text', this reason must be 'edited'.) */
1886 
1887  /** If this is text-conflict and involves the merging of two files
1888  * descended from a common ancestor, here are the paths of up to
1889  * four fulltext files that can be used to interactively resolve the
1890  * conflict. All four files will be in repository-normal form -- LF
1891  * line endings and contracted keywords. (If any of these files are
1892  * not available, they default to NULL.)
1893  *
1894  * On the other hand, if this is a property-conflict, then these
1895  * paths represent temporary files that contain the three different
1896  * property-values in conflict. The fourth path (@c merged_file)
1897  * may or may not be NULL; if set, it represents libsvn_wc's
1898  * attempt to merge the property values together. (Remember that
1899  * property values are technically binary values, and thus can't
1900  * always be merged.)
1901  */
1902  const char *base_file; /* common ancestor of the two files being merged */
1903 
1904  /** their version of the file */
1905  const char *their_file;
1906 
1907  /** my locally-edited version of the file */
1908  const char *my_file;
1909 
1910  /** merged version; may contain conflict markers */
1911  const char *merged_file;
1912 
1913  /** The operation that exposed the conflict.
1914  * Used only for tree conflicts.
1915  *
1916  * @since New in 1.6.
1917  */
1919 
1920  /** Info on the "merge-left source" or "older" version of incoming change.
1921  * @since New in 1.6. */
1923 
1924  /** Info on the "merge-right source" or "their" version of incoming change.
1925  * @since New in 1.6. */
1927 
1929 
1930 /**
1931  * Allocate an #svn_wc_conflict_description_t structure in @a result_pool,
1932  * initialize to represent a text conflict, and return it.
1933  *
1934  * Set the @c local_abspath field of the created struct to @a local_abspath
1935  * (which must be an absolute path), the @c kind field to
1936  * #svn_wc_conflict_kind_text, the @c node_kind to #svn_node_file,
1937  * the @c action to #svn_wc_conflict_action_edit, and the @c reason to
1938  * #svn_wc_conflict_reason_edited.
1939  *
1940  * @note It is the caller's responsibility to set the other required fields
1941  * (such as the four file names and @c mime_type and @c is_binary).
1942  *
1943  * @since New in 1.7.
1944  */
1946 svn_wc_conflict_description_create_text2(const char *local_abspath,
1947  apr_pool_t *result_pool);
1948 
1949 
1950 /** Similar to svn_wc_conflict_description_create_text2(), but returns
1951  * a #svn_wc_conflict_description_t *.
1952  *
1953  * @since New in 1.6.
1954  * @deprecated Provided for backward compatibility with the 1.6 API.
1955  */
1959  svn_wc_adm_access_t *adm_access,
1960  apr_pool_t *pool);
1961 
1962 /**
1963  * Allocate an #svn_wc_conflict_description_t structure in @a result_pool,
1964  * initialize to represent a property conflict, and return it.
1965  *
1966  * Set the @c local_abspath field of the created struct to @a local_abspath
1967  * (which must be an absolute path), the @c kind field
1968  * to #svn_wc_conflict_kind_property, the @c node_kind to @a node_kind, and
1969  * the @c property_name to @a property_name.
1970  *
1971  * @note: It is the caller's responsibility to set the other required fields
1972  * (such as the four file names and @c action and @c reason).
1973  *
1974  * @since New in 1.7.
1975  */
1977 svn_wc_conflict_description_create_prop2(const char *local_abspath,
1978  svn_node_kind_t node_kind,
1979  const char *property_name,
1980  apr_pool_t *result_pool);
1981 
1982 /** Similar to svn_wc_conflict_descriptor_create_prop(), but returns
1983  * a #svn_wc_conflict_description_t *.
1984  *
1985  * @since New in 1.6.
1986  * @deprecated Provided for backward compatibility with the 1.6 API.
1987  */
1991  svn_wc_adm_access_t *adm_access,
1992  svn_node_kind_t node_kind,
1993  const char *property_name,
1994  apr_pool_t *pool);
1995 
1996 /**
1997  * Allocate an #svn_wc_conflict_description_t structure in @a pool,
1998  * initialize to represent a tree conflict, and return it.
1999  *
2000  * Set the @c local_abspath field of the created struct to @a local_abspath
2001  * (which must be an absolute path), the @c kind field to
2002  * #svn_wc_conflict_kind_tree, the @c node_kind to @a node_kind, the @c
2003  * operation to @a operation, the @c src_left_version field to
2004  * @a src_left_version, and the @c src_right_version field to
2005  * @a src_right_version.
2006  *
2007  * @note: It is the caller's responsibility to set the other required fields
2008  * (such as the four file names and @c action and @c reason).
2009  *
2010  * @since New in 1.7.
2011  */
2014  const char *local_abspath,
2015  svn_node_kind_t node_kind,
2016  svn_wc_operation_t operation,
2017  const svn_wc_conflict_version_t *src_left_version,
2018  const svn_wc_conflict_version_t *src_right_version,
2019  apr_pool_t *result_pool);
2020 
2021 
2022 /** Similar to svn_wc_conflict_description_create_tree(), but returns
2023  * a #svn_wc_conflict_description_t *.
2024  *
2025  * @since New in 1.6.
2026  * @deprecated Provided for backward compatibility with the 1.6 API.
2027  */
2031  const char *path,
2032  svn_wc_adm_access_t *adm_access,
2033  svn_node_kind_t node_kind,
2034  svn_wc_operation_t operation,
2035  /* non-const */ svn_wc_conflict_version_t *src_left_version,
2036  /* non-const */ svn_wc_conflict_version_t *src_right_version,
2037  apr_pool_t *pool);
2038 
2039 
2040 /** Return a duplicate of @a conflict, allocated in @a result_pool.
2041  * A deep copy of all members will be made.
2042  *
2043  * @since New in 1.7.
2044  */
2047  const svn_wc_conflict_description2_t *conflict,
2048  apr_pool_t *result_pool);
2049 
2050 
2051 /** The way in which the conflict callback chooses a course of action.
2052  *
2053  * @since New in 1.5.
2054  */
2056 {
2057  /** Don't resolve the conflict now. Let libsvn_wc mark the path
2058  'conflicted', so user can run 'svn resolved' later. */
2060 
2061  /** If there were files to choose from, select one as a way of
2062  resolving the conflict here and now. libsvn_wc will then do the
2063  work of "installing" the chosen file.
2064  */
2065  svn_wc_conflict_choose_base, /**< original version */
2066  svn_wc_conflict_choose_theirs_full, /**< incoming version */
2068  svn_wc_conflict_choose_theirs_conflict, /**< incoming (for conflicted hunks) */
2069  svn_wc_conflict_choose_mine_conflict, /**< own (for conflicted hunks) */
2070  svn_wc_conflict_choose_merged, /**< merged version */
2071 
2072  /* @since New in 1.8. */
2074 
2076 
2077 
2078 /** The final result returned by #svn_wc_conflict_resolver_func_t.
2079  *
2080  * @note Fields may be added to the end of this structure in future
2081  * versions. Therefore, to preserve binary compatibility, users
2082  * should not directly allocate structures of this type. Instead,
2083  * construct this structure using svn_wc_create_conflict_result()
2084  * below.
2085  *
2086  * @since New in 1.5.
2087  */
2089 {
2090  /** A choice to either delay the conflict resolution or select a
2091  particular file to resolve the conflict. */
2093 
2094  /** If not NULL, this is a path to a file which contains the client's
2095  (or more likely, the user's) merging of the three values in
2096  conflict. libsvn_wc accepts this file if (and only if) @c choice
2097  is set to #svn_wc_conflict_choose_merged.*/
2098  const char *merged_file;
2099 
2100  /** If true, save a backup copy of merged_file (or the original
2101  merged_file from the conflict description, if merged_file is
2102  NULL) in the user's working copy. */
2104 
2106 
2107 
2108 /**
2109  * Allocate an #svn_wc_conflict_result_t structure in @a pool,
2110  * initialize and return it.
2111  *
2112  * Set the @c choice field of the structure to @a choice, @c merged_file
2113  * to @a merged_file, and @c save_merged to false. Make only a shallow
2114  * copy of the pointer argument @a merged_file.
2115  *
2116  * @since New in 1.5.
2117  */
2120  const char *merged_file,
2121  apr_pool_t *pool);
2122 
2123 
2124 /** A callback used in merge, update and switch for resolving conflicts
2125  * during the application of a tree delta to a working copy.
2126  *
2127  * @a description describes the exact nature of the conflict, and
2128  * provides information to help resolve it. @a baton is a closure
2129  * object; it should be provided by the implementation, and passed by
2130  * the caller. When finished, the callback signals its resolution by
2131  * returning a structure in @a *result, which should be allocated in
2132  * @a result_pool. (See #svn_wc_conflict_result_t.) @a scratch_pool
2133  * should be used for any temporary allocations.
2134  *
2135  * The values #svn_wc_conflict_choose_mine_conflict and
2136  * #svn_wc_conflict_choose_theirs_conflict are not legal for conflicts
2137  * in binary files or binary properties.
2138  *
2139  * Implementations of this callback are free to present the conflict
2140  * using any user interface. This may include simple contextual
2141  * conflicts in a file's text or properties, or more complex
2142  * 'tree'-based conflicts related to obstructed additions, deletions,
2143  * and edits. The callback implementation is free to decide which
2144  * sorts of conflicts to handle; it's also free to decide which types
2145  * of conflicts are automatically resolvable and which require user
2146  * interaction.
2147  *
2148  * @since New in 1.7.
2149  */
2150 typedef svn_error_t *(*svn_wc_conflict_resolver_func2_t)(
2151  svn_wc_conflict_result_t **result,
2152  const svn_wc_conflict_description2_t *description,
2153  void *baton,
2154  apr_pool_t *result_pool,
2155  apr_pool_t *scratch_pool);
2156 
2157 
2158 /** Similar to #svn_wc_conflict_resolver_func2_t, but using
2159  * #svn_wc_conflict_description_t instead of
2160  * #svn_wc_conflict_description2_t
2161  *
2162  * @since New in 1.5.
2163  * @deprecated Provided for backward compatibility with the 1.6 API.
2164  */
2165 typedef svn_error_t *(*svn_wc_conflict_resolver_func_t)(
2166  svn_wc_conflict_result_t **result,
2167  const svn_wc_conflict_description_t *description,
2168  void *baton,
2169  apr_pool_t *pool);
2170 
2171 /** @} */
2172 
2173 
2174 
2175 /**
2176  * A callback vtable invoked by our diff-editors, as they receive diffs
2177  * from the server. 'svn diff' and 'svn merge' implement their own versions
2178  * of this vtable.
2179  *
2180  * Common parameters:
2181  *
2182  * If @a state is non-NULL, set @a *state to the state of the item
2183  * after the operation has been performed. (In practice, this is only
2184  * useful with merge, not diff; diff callbacks will probably set
2185  * @a *state to #svn_wc_notify_state_unknown, since they do not change
2186  * the state and therefore do not bother to know the state after the
2187  * operation.) By default, @a state refers to the item's content
2188  * state. Functions concerned with property state have separate
2189  * @a contentstate and @a propstate arguments.
2190  *
2191  * If @a tree_conflicted is non-NULL, set @a *tree_conflicted to true if
2192  * this operation caused a tree conflict, else to false. (Like with @a
2193  * state, this is only useful with merge, not diff; diff callbacks
2194  * should set this to false.)
2195  *
2196  * @since New in 1.7.
2197  */
2199 {
2200  /**
2201  * This function is called before @a file_changed to allow callbacks to
2202  * skip the most expensive processing of retrieving the file data.
2203  *
2204  */
2205  svn_error_t *(*file_opened)(svn_boolean_t *tree_conflicted,
2206  svn_boolean_t *skip,
2207  const char *path,
2208  svn_revnum_t rev,
2209  void *diff_baton,
2210  apr_pool_t *scratch_pool);
2211 
2212  /**
2213  * A file @a path has changed. If @a tmpfile2 is non-NULL, the
2214  * contents have changed and those changes can be seen by comparing
2215  * @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2 of
2216  * the file, respectively.
2217  *
2218  * If known, the @c svn:mime-type value of each file is passed into
2219  * @a mimetype1 and @a mimetype2; either or both of the values can
2220  * be NULL. The implementor can use this information to decide if
2221  * (or how) to generate differences.
2222  *
2223  * @a propchanges is an array of (#svn_prop_t) structures. If it contains
2224  * any elements, the original list of properties is provided in
2225  * @a originalprops, which is a hash of #svn_string_t values, keyed on the
2226  * property name.
2227  *
2228  */
2229  svn_error_t *(*file_changed)(svn_wc_notify_state_t *contentstate,
2230  svn_wc_notify_state_t *propstate,
2231  svn_boolean_t *tree_conflicted,
2232  const char *path,
2233  const char *tmpfile1,
2234  const char *tmpfile2,
2235  svn_revnum_t rev1,
2236  svn_revnum_t rev2,
2237  const char *mimetype1,
2238  const char *mimetype2,
2239  const apr_array_header_t *propchanges,
2240  apr_hash_t *originalprops,
2241  void *diff_baton,
2242  apr_pool_t *scratch_pool);
2243 
2244  /**
2245  * A file @a path was added. The contents can be seen by comparing
2246  * @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2
2247  * of the file, respectively. (If either file is empty, the rev
2248  * will be 0.)
2249  *
2250  * If known, the @c svn:mime-type value of each file is passed into
2251  * @a mimetype1 and @a mimetype2; either or both of the values can
2252  * be NULL. The implementor can use this information to decide if
2253  * (or how) to generate differences.
2254  *
2255  * @a propchanges is an array of (#svn_prop_t) structures. If it contains
2256  * any elements, the original list of properties is provided in
2257  * @a originalprops, which is a hash of #svn_string_t values, keyed on the
2258  * property name.
2259  * If @a copyfrom_path is non-@c NULL, this add has history (i.e., is a
2260  * copy), and the origin of the copy may be recorded as
2261  * @a copyfrom_path under @a copyfrom_revision.
2262  */
2263  svn_error_t *(*file_added)(svn_wc_notify_state_t *contentstate,
2264  svn_wc_notify_state_t *propstate,
2265  svn_boolean_t *tree_conflicted,
2266  const char *path,
2267  const char *tmpfile1,
2268  const char *tmpfile2,
2269  svn_revnum_t rev1,
2270  svn_revnum_t rev2,
2271  const char *mimetype1,
2272  const char *mimetype2,
2273  const char *copyfrom_path,
2274  svn_revnum_t copyfrom_revision,
2275  const apr_array_header_t *propchanges,
2276  apr_hash_t *originalprops,
2277  void *diff_baton,
2278  apr_pool_t *scratch_pool);
2279 
2280  /**
2281  * A file @a path was deleted. The [loss of] contents can be seen by
2282  * comparing @a tmpfile1 and @a tmpfile2. @a originalprops provides
2283  * the properties of the file.
2284  * ### Some existing callers include WC "entry props" in @a originalprops.
2285  *
2286  * If known, the @c svn:mime-type value of each file is passed into
2287  * @a mimetype1 and @a mimetype2; either or both of the values can
2288  * be NULL. The implementor can use this information to decide if
2289  * (or how) to generate differences.
2290  */
2291  svn_error_t *(*file_deleted)(svn_wc_notify_state_t *state,
2292  svn_boolean_t *tree_conflicted,
2293  const char *path,
2294  const char *tmpfile1,
2295  const char *tmpfile2,
2296  const char *mimetype1,
2297  const char *mimetype2,
2298  apr_hash_t *originalprops,
2299  void *diff_baton,
2300  apr_pool_t *scratch_pool);
2301 
2302  /**
2303  * A directory @a path was deleted.
2304  */
2305  svn_error_t *(*dir_deleted)(svn_wc_notify_state_t *state,
2306  svn_boolean_t *tree_conflicted,
2307  const char *path,
2308  void *diff_baton,
2309  apr_pool_t *scratch_pool);
2310  /**
2311  * A directory @a path has been opened. @a rev is the revision that the
2312  * directory came from.
2313  *
2314  * This function is called for any existing directory @a path before any
2315  * of the callbacks are called for a child of @a path.
2316  *
2317  * If the callback returns @c TRUE in @a *skip_children, children
2318  * of this directory will be skipped.
2319  */
2320  svn_error_t *(*dir_opened)(svn_boolean_t *tree_conflicted,
2321  svn_boolean_t *skip,
2322  svn_boolean_t *skip_children,
2323  const char *path,
2324  svn_revnum_t rev,
2325  void *diff_baton,
2326  apr_pool_t *scratch_pool);
2327 
2328  /**
2329  * A directory @a path was added. @a rev is the revision that the
2330  * directory came from.
2331  *
2332  * This function is called for any new directory @a path before any
2333  * of the callbacks are called for a child of @a path.
2334  *
2335  * If @a copyfrom_path is non-@c NULL, this add has history (i.e., is a
2336  * copy), and the origin of the copy may be recorded as
2337  * @a copyfrom_path under @a copyfrom_revision.
2338  */
2339  svn_error_t *(*dir_added)(svn_wc_notify_state_t *state,
2340  svn_boolean_t *tree_conflicted,
2341  svn_boolean_t *skip,
2342  svn_boolean_t *skip_children,
2343  const char *path,
2344  svn_revnum_t rev,
2345  const char *copyfrom_path,
2346  svn_revnum_t copyfrom_revision,
2347  void *diff_baton,
2348  apr_pool_t *scratch_pool);
2349 
2350  /**
2351  * A list of property changes (@a propchanges) was applied to the
2352  * directory @a path.
2353  *
2354  * The array is a list of (#svn_prop_t) structures.
2355  *
2356  * @a dir_was_added is set to #TRUE if the directory was added, and
2357  * to #FALSE if the directory pre-existed.
2358  */
2359  svn_error_t *(*dir_props_changed)(svn_wc_notify_state_t *propstate,
2360  svn_boolean_t *tree_conflicted,
2361  const char *path,
2362  svn_boolean_t dir_was_added,
2363  const apr_array_header_t *propchanges,
2364  apr_hash_t *original_props,
2365  void *diff_baton,
2366  apr_pool_t *scratch_pool);
2367 
2368  /**
2369  * A directory @a path which has been opened with @a dir_opened or @a
2370  * dir_added has been closed.
2371  *
2372  * @a dir_was_added is set to #TRUE if the directory was added, and
2373  * to #FALSE if the directory pre-existed.
2374  */
2375  svn_error_t *(*dir_closed)(svn_wc_notify_state_t *contentstate,
2376  svn_wc_notify_state_t *propstate,
2377  svn_boolean_t *tree_conflicted,
2378  const char *path,
2379  svn_boolean_t dir_was_added,
2380  void *diff_baton,
2381  apr_pool_t *scratch_pool);
2382 
2384 
2385 
2386 /**
2387  * Similar to #svn_wc_diff_callbacks4_t, but without @a copyfrom_path and
2388  * @a copyfrom_revision arguments to @c file_added and @c dir_added functions.
2389  *
2390  * @since New in 1.6.
2391  * @deprecated Provided for backward compatibility with the 1.6 API.
2392  */
2394 {
2395  /** The same as #svn_wc_diff_callbacks4_t.file_changed. */
2396  svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access,
2397  svn_wc_notify_state_t *contentstate,
2398  svn_wc_notify_state_t *propstate,
2399  svn_boolean_t *tree_conflicted,
2400  const char *path,
2401  const char *tmpfile1,
2402  const char *tmpfile2,
2403  svn_revnum_t rev1,
2404  svn_revnum_t rev2,
2405  const char *mimetype1,
2406  const char *mimetype2,
2407  const apr_array_header_t *propchanges,
2408  apr_hash_t *originalprops,
2409  void *diff_baton);
2410 
2411  /** Similar to #svn_wc_diff_callbacks4_t.file_added but without
2412  * @a copyfrom_path and @a copyfrom_revision arguments. */
2413  svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access,
2414  svn_wc_notify_state_t *contentstate,
2415  svn_wc_notify_state_t *propstate,
2416  svn_boolean_t *tree_conflicted,
2417  const char *path,
2418  const char *tmpfile1,
2419  const char *tmpfile2,
2420  svn_revnum_t rev1,
2421  svn_revnum_t rev2,
2422  const char *mimetype1,
2423  const char *mimetype2,
2424  const apr_array_header_t *propchanges,
2425  apr_hash_t *originalprops,
2426  void *diff_baton);
2427 
2428  /** The same as #svn_wc_diff_callbacks4_t.file_deleted. */
2429  svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access,
2430  svn_wc_notify_state_t *state,
2431  svn_boolean_t *tree_conflicted,
2432  const char *path,
2433  const char *tmpfile1,
2434  const char *tmpfile2,
2435  const char *mimetype1,
2436  const char *mimetype2,
2437  apr_hash_t *originalprops,
2438  void *diff_baton);
2439 
2440  /** Similar to #svn_wc_diff_callbacks4_t.dir_added but without
2441  * @a copyfrom_path and @a copyfrom_revision arguments. */
2442  svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access,
2443  svn_wc_notify_state_t *state,
2444  svn_boolean_t *tree_conflicted,
2445  const char *path,
2446  svn_revnum_t rev,
2447  void *diff_baton);
2448 
2449  /** The same as #svn_wc_diff_callbacks4_t.dir_deleted. */
2450  svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access,
2451  svn_wc_notify_state_t *state,
2452  svn_boolean_t *tree_conflicted,
2453  const char *path,
2454  void *diff_baton);
2455 
2456  /** The same as #svn_wc_diff_callbacks4_t.dir_props_changed. */
2457  svn_error_t *(*dir_props_changed)(svn_wc_adm_access_t *adm_access,
2458  svn_wc_notify_state_t *propstate,
2459  svn_boolean_t *tree_conflicted,
2460  const char *path,
2461  const apr_array_header_t *propchanges,
2462  apr_hash_t *original_props,
2463  void *diff_baton);
2464 
2465  /** The same as #svn_wc_diff_callbacks4_t.dir_opened. */
2466  svn_error_t *(*dir_opened)(svn_wc_adm_access_t *adm_access,
2467  svn_boolean_t *tree_conflicted,
2468  const char *path,
2469  svn_revnum_t rev,
2470  void *diff_baton);
2471 
2472  /** The same as #svn_wc_diff_callbacks4_t.dir_closed. */
2473  svn_error_t *(*dir_closed)(svn_wc_adm_access_t *adm_access,
2474  svn_wc_notify_state_t *contentstate,
2475  svn_wc_notify_state_t *propstate,
2476  svn_boolean_t *tree_conflicted,
2477  const char *path,
2478  void *diff_baton);
2479 
2481 
2482 /**
2483  * Similar to #svn_wc_diff_callbacks3_t, but without the @c dir_opened
2484  * and @c dir_closed functions, and without the @a tree_conflicted argument
2485  * to the functions.
2486  *
2487  * @deprecated Provided for backward compatibility with the 1.2 API.
2488  */
2490 {
2491  /** The same as @c file_changed in #svn_wc_diff_callbacks3_t. */
2492  svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access,
2493  svn_wc_notify_state_t *contentstate,
2494  svn_wc_notify_state_t *propstate,
2495  const char *path,
2496  const char *tmpfile1,
2497  const char *tmpfile2,
2498  svn_revnum_t rev1,
2499  svn_revnum_t rev2,
2500  const char *mimetype1,
2501  const char *mimetype2,
2502  const apr_array_header_t *propchanges,
2503  apr_hash_t *originalprops,
2504  void *diff_baton);
2505 
2506  /** The same as @c file_added in #svn_wc_diff_callbacks3_t. */
2507  svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access,
2508  svn_wc_notify_state_t *contentstate,
2509  svn_wc_notify_state_t *propstate,
2510  const char *path,
2511  const char *tmpfile1,
2512  const char *tmpfile2,
2513  svn_revnum_t rev1,
2514  svn_revnum_t rev2,
2515  const char *mimetype1,
2516  const char *mimetype2,
2517  const apr_array_header_t *propchanges,
2518  apr_hash_t *originalprops,
2519  void *diff_baton);
2520 
2521  /** The same as @c file_deleted in #svn_wc_diff_callbacks3_t. */
2522  svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access,
2523  svn_wc_notify_state_t *state,
2524  const char *path,
2525  const char *tmpfile1,
2526  const char *tmpfile2,
2527  const char *mimetype1,
2528  const char *mimetype2,
2529  apr_hash_t *originalprops,
2530  void *diff_baton);
2531 
2532  /** The same as @c dir_added in #svn_wc_diff_callbacks3_t. */
2533  svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access,
2534  svn_wc_notify_state_t *state,
2535  const char *path,
2536  svn_revnum_t rev,
2537  void *diff_baton);
2538 
2539  /** The same as @c dir_deleted in #svn_wc_diff_callbacks3_t. */
2540  svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access,
2541  svn_wc_notify_state_t *state,
2542  const char *path,
2543  void *diff_baton);
2544 
2545  /** The same as @c dir_props_changed in #svn_wc_diff_callbacks3_t. */
2546  svn_error_t *(*dir_props_changed)(svn_wc_adm_access_t *adm_access,
2547  svn_wc_notify_state_t *state,
2548  const char *path,
2549  const apr_array_header_t *propchanges,
2550  apr_hash_t *original_props,
2551  void *diff_baton);
2552 
2554 
2555 /**
2556  * Similar to #svn_wc_diff_callbacks2_t, but with file additions/content
2557  * changes and property changes split into different functions.
2558  *
2559  * @deprecated Provided for backward compatibility with the 1.1 API.
2560  */
2562 {
2563  /** Similar to @c file_changed in #svn_wc_diff_callbacks2_t, but without
2564  * property change information. @a tmpfile2 is never NULL. @a state applies
2565  * to the file contents. */
2566  svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access,
2567  svn_wc_notify_state_t *state,
2568  const char *path,
2569  const char *tmpfile1,
2570  const char *tmpfile2,
2571  svn_revnum_t rev1,
2572  svn_revnum_t rev2,
2573  const char *mimetype1,
2574  const char *mimetype2,
2575  void *diff_baton);
2576 
2577  /** Similar to @c file_added in #svn_wc_diff_callbacks2_t, but without
2578  * property change information. @a *state applies to the file contents. */
2579  svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access,
2580  svn_wc_notify_state_t *state,
2581  const char *path,
2582  const char *tmpfile1,
2583  const char *tmpfile2,
2584  svn_revnum_t rev1,
2585  svn_revnum_t rev2,
2586  const char *mimetype1,
2587  const char *mimetype2,
2588  void *diff_baton);
2589 
2590  /** Similar to @c file_deleted in #svn_wc_diff_callbacks2_t, but without
2591  * the properties. */
2592  svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access,
2593  svn_wc_notify_state_t *state,
2594  const char *path,
2595  const char *tmpfile1,
2596  const char *tmpfile2,
2597  const char *mimetype1,
2598  const char *mimetype2,
2599  void *diff_baton);
2600 
2601  /** The same as @c dir_added in #svn_wc_diff_callbacks2_t. */
2602  svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access,
2603  svn_wc_notify_state_t *state,
2604  const char *path,
2605  svn_revnum_t rev,
2606  void *diff_baton);
2607 
2608  /** The same as @c dir_deleted in #svn_wc_diff_callbacks2_t. */
2609  svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access,
2610  svn_wc_notify_state_t *state,
2611  const char *path,
2612  void *diff_baton);
2613 
2614  /** Similar to @c dir_props_changed in #svn_wc_diff_callbacks2_t, but this
2615  * function is called for files as well as directories. */
2616  svn_error_t *(*props_changed)(svn_wc_adm_access_t *adm_access,
2617  svn_wc_notify_state_t *state,
2618  const char *path,
2619  const apr_array_header_t *propchanges,
2620  apr_hash_t *original_props,
2621  void *diff_baton);
2622 
2624 
2625 
2626 /* Asking questions about a working copy. */
2627 
2628 /** Set @a *wc_format to @a local_abspath's working copy format version
2629  * number if @a local_abspath is a valid working copy directory, else set it
2630  * to 0.
2631  *
2632  * Return error @c APR_ENOENT if @a local_abspath does not exist at all.
2633  *
2634  * @since New in 1.7.
2635  */
2636 svn_error_t *
2637 svn_wc_check_wc2(int *wc_format,
2638  svn_wc_context_t *wc_ctx,
2639  const char *local_abspath,
2640  apr_pool_t *scratch_pool);
2641 
2642 /**
2643  * Similar to svn_wc_check_wc2(), but with a relative path and no supplied
2644  * working copy context.
2645  *
2646  * @deprecated Provided for backward compatibility with the 1.6 API.
2647  */
2649 svn_error_t *
2650 svn_wc_check_wc(const char *path,
2651  int *wc_format,
2652  apr_pool_t *pool);
2653 
2654 
2655 /** Set @a *has_binary_prop to @c TRUE iff @a path has been marked
2656  * with a property indicating that it is non-text (in other words, binary).
2657  * @a adm_access is an access baton set that contains @a path.
2658  *
2659  * @deprecated Provided for backward compatibility with the 1.6 API. As a
2660  * replacement for this functionality, @see svn_mime_type_is_binary and
2661  * #SVN_PROP_MIME_TYPE.
2662  */
2664 svn_error_t *
2665 svn_wc_has_binary_prop(svn_boolean_t *has_binary_prop,
2666  const char *path,
2667  svn_wc_adm_access_t *adm_access,
2668  apr_pool_t *pool);
2669 
2670 
2671 /* Detecting modification. */
2672 
2673 /** Set @a *modified_p to non-zero if @a local_abspath's text is modified
2674  * with regard to the base revision, else set @a *modified_p to zero.
2675  * @a local_abspath is the absolute path to the file.
2676  *
2677  * This function uses some heuristics to avoid byte-by-byte comparisons
2678  * against the base text (eg. file size and its modification time).
2679  *
2680  * If @a local_abspath does not exist, consider it unmodified. If it exists
2681  * but is not under revision control (not even scheduled for
2682  * addition), return the error #SVN_ERR_ENTRY_NOT_FOUND.
2683  *
2684  * @a unused is ignored.
2685  *
2686  * @since New in 1.7.
2687  */
2688 svn_error_t *
2690  svn_wc_context_t *wc_ctx,
2691  const char *local_abspath,
2692  svn_boolean_t unused,
2693  apr_pool_t *scratch_pool);
2694 
2695 /** Similar to svn_wc_text_modified_p2(), but with a relative path and
2696  * adm_access baton?
2697  *
2698  * @deprecated Provided for backward compatibility with the 1.6 API.
2699  */
2701 svn_error_t *
2703  const char *filename,
2704  svn_boolean_t force_comparison,
2705  svn_wc_adm_access_t *adm_access,
2706  apr_pool_t *pool);
2707 
2708 /** Set @a *modified_p to non-zero if @a path's properties are modified
2709  * with regard to the base revision, else set @a modified_p to zero.
2710  * @a adm_access must be an access baton for @a path.
2711  *
2712  * @since New in 1.7.
2713  */
2714 svn_error_t *
2716  svn_wc_context_t *wc_ctx,
2717  const char *local_abspath,
2718  apr_pool_t *scratch_pool);
2719 
2720 /** Similar to svn_wc_props_modified_p2(), but with a relative path and
2721  * adm_access baton.
2722  *
2723  * @deprecated Provided for backward compatibility with the 1.6 API.
2724  */
2726 svn_error_t *
2728  const char *path,
2729  svn_wc_adm_access_t *adm_access,
2730  apr_pool_t *pool);
2731 
2732 
2733 /**
2734  * @defgroup svn_wc_entries Entries and status (deprecated)
2735  * @{
2736  */
2737 
2738 /** The schedule states an entry can be in.
2739  * @deprecated Provided for backward compatibility with the 1.6 API. */
2740 typedef enum svn_wc_schedule_t
2741 {
2742  /** Nothing special here */
2744 
2745  /** Slated for addition */
2747 
2748  /** Slated for deletion */
2750 
2751  /** Slated for replacement (delete + add) */
2753 
2755 
2756 
2757 /**
2758  * Values for the working_size field in svn_wc_entry_t
2759  * when it isn't set to the actual size value of the unchanged
2760  * working file.
2761  *
2762  * The value of the working size is unknown (hasn't been
2763  * calculated and stored in the past for whatever reason).
2764  *
2765  * @since New in 1.5
2766  * @deprecated Provided for backward compatibility with the 1.6 API.
2767  */
2768 #define SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN (-1)
2769 
2770 /** A working copy entry -- that is, revision control information about
2771  * one versioned entity.
2772  *
2773  * @deprecated Provided for backward compatibility with the 1.6 API.
2774  */
2775 /* SVN_DEPRECATED */
2776 typedef struct svn_wc_entry_t
2777 {
2778  /* IMPORTANT: If you extend this structure, add new fields to the end. */
2779 
2780  /* General Attributes */
2781 
2782  /** entry's name */
2783  const char *name;
2784 
2785  /** base revision */
2787 
2788  /** url in repository */
2789  const char *url;
2790 
2791  /** canonical repository URL or NULL if not known */
2792  const char *repos;
2793 
2794  /** repository uuid */
2795  const char *uuid;
2796 
2797  /** node kind (file, dir, ...) */
2799 
2800  /* State information */
2801 
2802  /** scheduling (add, delete, replace ...) */
2804 
2805  /** in a copied state (possibly because the entry is a child of a
2806  * path that is #svn_wc_schedule_add or #svn_wc_schedule_replace,
2807  * when the entry itself is #svn_wc_schedule_normal).
2808  * COPIED is true for nodes under a directory that was copied, but
2809  * COPYFROM_URL is null there. They are both set for the root
2810  * destination of the copy.
2811  */
2813 
2814  /** The directory containing this entry had a versioned child of this
2815  * name, but this entry represents a different revision or a switched
2816  * path at which no item exists in the repository. This typically
2817  * arises from committing or updating to a deletion of this entry
2818  * without committing or updating the parent directory.
2819  *
2820  * The schedule can be 'normal' or 'add'. */
2822 
2823  /** absent -- we know an entry of this name exists, but that's all
2824  (usually this happens because of authz restrictions) */
2826 
2827  /** for THIS_DIR entry, implies whole entries file is incomplete */
2829 
2830  /** copyfrom location */
2831  const char *copyfrom_url;
2832 
2833  /** copyfrom revision */
2835 
2836  /** old version of conflicted file. A file basename, relative to the
2837  * user's directory that the THIS_DIR entry refers to. */
2838  const char *conflict_old;
2839 
2840  /** new version of conflicted file. A file basename, relative to the
2841  * user's directory that the THIS_DIR entry refers to. */
2842  const char *conflict_new;
2843 
2844  /** working version of conflicted file. A file basename, relative to the
2845  * user's directory that the THIS_DIR entry refers to. */
2846  const char *conflict_wrk;
2847 
2848  /** property reject file. A file basename, relative to the user's
2849  * directory that the THIS_DIR entry refers to. */
2850  const char *prejfile;
2851 
2852  /** last up-to-date time for text contents (0 means no information available)
2853  */
2854  apr_time_t text_time;
2855 
2856  /** last up-to-date time for properties (0 means no information available)
2857  *
2858  * @deprecated This value will always be 0 in version 1.4 and later.
2859  */
2860  apr_time_t prop_time;
2861 
2862  /** Hex MD5 checksum for the untranslated text base file,
2863  * can be @c NULL for backwards compatibility.
2864  */
2865  const char *checksum;
2866 
2867  /* "Entry props" */
2868 
2869  /** last revision this was changed */
2871 
2872  /** last date this was changed */
2873  apr_time_t cmt_date;
2874 
2875  /** last commit author of this item */
2876  const char *cmt_author;
2877 
2878  /** lock token or NULL if path not locked in this WC
2879  * @since New in 1.2.
2880  */
2881  const char *lock_token;
2882 
2883  /** lock owner, or NULL if not locked in this WC
2884  * @since New in 1.2.
2885  */
2886  const char *lock_owner;
2887 
2888  /** lock comment or NULL if not locked in this WC or no comment
2889  * @since New in 1.2.
2890  */
2891  const char *lock_comment;
2892 
2893  /** Lock creation date or 0 if not locked in this WC
2894  * @since New in 1.2.
2895  */
2897 
2898  /** Whether this entry has any working properties.
2899  * False if this information is not stored in the entry.
2900  *
2901  * @since New in 1.4. */
2903 
2904  /** Whether this entry has property modifications.
2905  *
2906  * @note For working copies in older formats, this flag is not valid.
2907  *
2908  * @see svn_wc_props_modified_p().
2909  *
2910  * @since New in 1.4. */
2912 
2913  /** A space-separated list of all properties whose presence/absence is cached
2914  * in this entry.
2915  *
2916  * @see @c present_props.
2917  *
2918  * @since New in 1.4.
2919  * @deprecated This value will always be "" in version 1.7 and later. */
2920  const char *cachable_props;
2921 
2922  /** Cached property existence for this entry.
2923  * This is a space-separated list of property names. If a name exists in
2924  * @c cachable_props but not in this list, this entry does not have that
2925  * property. If a name exists in both lists, the property is present on this
2926  * entry.
2927  *
2928  * @since New in 1.4.
2929  * @deprecated This value will always be "" in version 1.7 and later. */
2930  const char *present_props;
2931 
2932  /** which changelist this item is part of, or NULL if not part of any.
2933  * @since New in 1.5.
2934  */
2935  const char *changelist;
2936 
2937  /** Size of the file after being translated into local
2938  * representation, or #SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN if
2939  * unknown.
2940  *
2941  * @since New in 1.5.
2942  */
2943  apr_off_t working_size;
2944 
2945  /** Whether a local copy of this entry should be kept in the working copy
2946  * after a deletion has been committed, Only valid for the this-dir entry
2947  * when it is scheduled for deletion.
2948  *
2949  * @since New in 1.5. */
2951 
2952  /** The depth of this entry.
2953  *
2954  * ### It's a bit annoying that we only use this on this_dir
2955  * ### entries, yet it will exist (with value svn_depth_infinity) on
2956  * ### all entries. Maybe some future extensibility would make this
2957  * ### field meaningful on entries besides this_dir.
2958  *
2959  * @since New in 1.5. */
2961 
2962  /** Serialized data for all of the tree conflicts detected in this_dir.
2963  *
2964  * @since New in 1.6. */
2965  const char *tree_conflict_data;
2966 
2967  /** The entry is a intra-repository file external and this is the
2968  * repository root relative path to the file specified in the
2969  * externals definition, otherwise NULL if the entry is not a file
2970  * external.
2971  *
2972  * @since New in 1.6. */
2973  const char *file_external_path;
2974 
2975  /** The entry is a intra-repository file external and this is the
2976  * peg revision number specified in the externals definition. This
2977  * field is only valid when the file_external_path field is
2978  * non-NULL. The only permissible values are
2979  * svn_opt_revision_unspecified if the entry is not an external,
2980  * svn_opt_revision_head if the external revision is unspecified or
2981  * specified with -r HEAD or svn_opt_revision_number for a specific
2982  * revision number.
2983  *
2984  * @since New in 1.6. */
2986 
2987  /** The entry is an intra-repository file external and this is the
2988  * operative revision number specified in the externals definition.
2989  * This field is only valid when the file_external_path field is
2990  * non-NULL. The only permissible values are
2991  * svn_opt_revision_unspecified if the entry is not an external,
2992  * svn_opt_revision_head if the external revision is unspecified or
2993  * specified with -r HEAD or svn_opt_revision_number for a specific
2994  * revision number.
2995  *
2996  * @since New in 1.6. */
2998 
2999  /* IMPORTANT: If you extend this structure, check the following functions in
3000  * subversion/libsvn_wc/entries.c, to see if you need to extend them as well.
3001  *
3002  * svn_wc__atts_to_entry()
3003  * svn_wc_entry_dup()
3004  * alloc_entry()
3005  * read_entry()
3006  * write_entry()
3007  * fold_entry()
3008  */
3009 } svn_wc_entry_t;
3010 
3011 
3012 /** How an entries file's owner dir is named in the entries file.
3013  * @deprecated Provided for backward compatibility with the 1.6 API. */
3014 #define SVN_WC_ENTRY_THIS_DIR ""
3015 
3016 
3017 /** Set @a *entry to an entry for @a path, allocated in the access baton pool.
3018  * If @a show_hidden is TRUE, return the entry even if it's in 'excluded',
3019  * 'deleted' or 'absent' state. Excluded entries are those with their depth
3020  * set to #svn_depth_exclude. If @a path is not under revision control, or
3021  * if entry is hidden, not scheduled for re-addition, and @a show_hidden is @c
3022  * FALSE, then set @a *entry to @c NULL.
3023  *
3024  * @a *entry should not be modified, since doing so modifies the entries
3025  * cache in @a adm_access without changing the entries file on disk.
3026  *
3027  * If @a path is not a directory then @a adm_access must be an access baton
3028  * for the parent directory of @a path. To avoid needing to know whether
3029  * @a path is a directory or not, if @a path is a directory @a adm_access
3030  * can still be an access baton for the parent of @a path so long as the
3031  * access baton for @a path itself is in the same access baton set.
3032  *
3033  * @a path can be relative or absolute but must share the same base used
3034  * to open @a adm_access.
3035  *
3036  * Note that it is possible for @a path to be absent from disk but still
3037  * under revision control; and conversely, it is possible for @a path to
3038  * be present, but not under revision control.
3039  *
3040  * Use @a pool only for local processing.
3041  *
3042  * @deprecated Provided for backward compatibility with the 1.6 API.
3043  */
3045 svn_error_t *
3046 svn_wc_entry(const svn_wc_entry_t **entry,
3047  const char *path,
3048  svn_wc_adm_access_t *adm_access,
3049  svn_boolean_t show_hidden,
3050  apr_pool_t *pool);
3051 
3052 
3053 /** Parse the `entries' file for @a adm_access and return a hash @a entries,
3054  * whose keys are (<tt>const char *</tt>) entry names and values are
3055  * (<tt>svn_wc_entry_t *</tt>). The hash @a entries, and its keys and
3056  * values, are allocated from the pool used to open the @a adm_access
3057  * baton (that's how the entries caching works). @a pool is used for
3058  * transient allocations.
3059  *
3060  * Entries that are in a 'excluded', 'deleted' or 'absent' state (and not
3061  * scheduled for re-addition) are not returned in the hash, unless
3062  * @a show_hidden is TRUE. Excluded entries are those with their depth set to
3063  * #svn_depth_exclude.
3064  *
3065  * @par Important:
3066  * The @a entries hash is the entries cache in @a adm_access
3067  * and so usually the hash itself, the keys and the values should be treated
3068  * as read-only. If any of these are modified then it is the caller's
3069  * responsibility to ensure that the entries file on disk is updated. Treat
3070  * the hash values as type (<tt>const svn_wc_entry_t *</tt>) if you wish to
3071  * avoid accidental modification. Modifying the schedule member is a
3072  * particularly bad idea, as the entries writing process relies on having
3073  * access to the original schedule. Use a duplicate entry to modify the
3074  * schedule.
3075  *
3076  * @par Important:
3077  * Only the entry structures representing files and
3078  * #SVN_WC_ENTRY_THIS_DIR contain complete information. The entry
3079  * structures representing subdirs have only the `kind' and `state'
3080  * fields filled in. If you want info on a subdir, you must use this
3081  * routine to open its @a path and read the #SVN_WC_ENTRY_THIS_DIR
3082  * structure, or call svn_wc_entry() on its @a path.
3083  *
3084  * @deprecated Provided for backward compatibility with the 1.6 API.
3085  */
3087 svn_error_t *
3088 svn_wc_entries_read(apr_hash_t **entries,
3089  svn_wc_adm_access_t *adm_access,
3090  svn_boolean_t show_hidden,
3091  apr_pool_t *pool);
3092 
3093 
3094 /** Return a duplicate of @a entry, allocated in @a pool. No part of the new
3095  * entry will be shared with @a entry.
3096  *
3097  * @deprecated Provided for backward compatibility with the 1.6 API.
3098  */
3101 svn_wc_entry_dup(const svn_wc_entry_t *entry,
3102  apr_pool_t *pool);
3103 
3104 /** @} */
3105 
3106 
3107 /**
3108  * This struct contains information about a working copy node.
3109  *
3110  * @note Fields may be added to the end of this structure in future
3111  * versions. Therefore, users shouldn't allocate structures of this
3112  * type, to preserve binary compatibility.
3113  *
3114  * @since New in 1.7.
3115  */
3116 typedef struct svn_wc_info_t
3117 {
3118  /** The schedule of this item
3119  * ### Do we still need schedule? */
3121 
3122  /** If copied, the URL from which the copy was made, else @c NULL. */
3123  const char *copyfrom_url;
3124 
3125  /** If copied, the revision from which the copy was made,
3126  * else #SVN_INVALID_REVNUM. */
3128 
3129  /** The checksum of the node, if it is a file. */
3131 
3132  /** A changelist the item is in, @c NULL if this node is not in a
3133  * changelist. */
3134  const char *changelist;
3135 
3136  /** The depth of the item, see #svn_depth_t */
3138 
3139  /**
3140  * The size of the file after being translated into its local
3141  * representation, or #SVN_INVALID_FILESIZE if unknown.
3142  * Not applicable for directories.
3143  */
3145 
3146  /**
3147  * The time at which the file had the recorded size recorded_size and was
3148  * considered unmodified. */
3149  apr_time_t recorded_time;
3150 
3151  /** Array of const svn_wc_conflict_description2_t * which contains info
3152  * on any conflict of which this node is a victim. Otherwise NULL. */
3153  const apr_array_header_t *conflicts;
3154 
3155  /** The local absolute path of the working copy root. */
3156  const char *wcroot_abspath;
3157 
3158  /** The path the node was moved from, if it was moved here. Else NULL.
3159  * @since New in 1.8. */
3160  const char *moved_from_abspath;
3161 
3162  /** The path the node was moved to, if it was moved away. Else NULL.
3163  * @since New in 1.8. */
3164  const char *moved_to_abspath;
3165 } svn_wc_info_t;
3166 
3167 /**
3168  * Return a duplicate of @a info, allocated in @a pool. No part of the new
3169  * structure will be shared with @a info.
3170  *
3171  * @since New in 1.7.
3172  */
3173 svn_wc_info_t *
3174 svn_wc_info_dup(const svn_wc_info_t *info,
3175  apr_pool_t *pool);
3176 
3177 
3178 /** Given @a local_abspath in a dir under version control, decide if it is
3179  * in a state of conflict; return the answers in @a *text_conflicted_p, @a
3180  * *prop_conflicted_p, and @a *tree_conflicted_p. If one or two of the
3181  * answers are uninteresting, simply pass @c NULL pointers for those.
3182  *
3183  * If @a local_abspath is unversioned or does not exist, return
3184  * #SVN_ERR_WC_PATH_NOT_FOUND.
3185  *
3186  * If the @a local_abspath has corresponding text conflict files (with suffix
3187  * .mine, .theirs, etc.) that cannot be found, assume that the text conflict
3188  * has been resolved by the user and return @c FALSE in @a
3189  * *text_conflicted_p.
3190  *
3191  * Similarly, if a property conflicts file (.prej suffix) is said to exist,
3192  * but it cannot be found, assume that the property conflicts have been
3193  * resolved by the user and return @c FALSE in @a *prop_conflicted_p.
3194  *
3195  * @a *tree_conflicted_p can't be auto-resolved in this fashion. An
3196  * explicit `resolved' is needed.
3197  *
3198  * @since New in 1.7.
3199  */
3200 svn_error_t *
3201 svn_wc_conflicted_p3(svn_boolean_t *text_conflicted_p,
3202  svn_boolean_t *prop_conflicted_p,
3203  svn_boolean_t *tree_conflicted_p,
3204  svn_wc_context_t *wc_ctx,
3205  const char *local_abspath,
3206  apr_pool_t *scratch_pool);
3207 
3208 /** Similar to svn_wc_conflicted_p3(), but with a path/adm_access parameter
3209  * pair in place of a wc_ctx/local_abspath pair.
3210  *
3211  * @since New in 1.6.
3212  * @deprecated Provided for backward compatibility with the 1.6 API.
3213  */
3215 svn_error_t *
3216 svn_wc_conflicted_p2(svn_boolean_t *text_conflicted_p,
3217  svn_boolean_t *prop_conflicted_p,
3218  svn_boolean_t *tree_conflicted_p,
3219  const char *path,
3220  svn_wc_adm_access_t *adm_access,
3221  apr_pool_t *pool);
3222 
3223 /** Given a @a dir_path under version control, decide if one of its entries
3224  * (@a entry) is in a state of conflict; return the answers in @a
3225  * text_conflicted_p and @a prop_conflicted_p. These pointers must not be
3226  * null.
3227  *
3228  * If the @a entry mentions that text conflict files (with suffix .mine,
3229  * .theirs, etc.) exist, but they cannot be found, assume the text conflict
3230  * has been resolved by the user and return FALSE in @a *text_conflicted_p.
3231  *
3232  * Similarly, if the @a entry mentions that a property conflicts file (.prej
3233  * suffix) exists, but it cannot be found, assume the property conflicts
3234  * have been resolved by the user and return FALSE in @a *prop_conflicted_p.
3235  *
3236  * The @a entry is not updated.
3237  *
3238  * @deprecated Provided for backward compatibility with the 1.5 API.
3239  */
3241 svn_error_t *
3242 svn_wc_conflicted_p(svn_boolean_t *text_conflicted_p,
3243  svn_boolean_t *prop_conflicted_p,
3244  const char *dir_path,
3245  const svn_wc_entry_t *entry,
3246  apr_pool_t *pool);
3247 
3248 
3249 /** Set @a *url and @a *rev to the ancestor URL and revision for @a path,
3250  * allocating in @a pool. @a adm_access must be an access baton for @a path.
3251  *
3252  * If @a url or @a rev is NULL, then ignore it (just don't return the
3253  * corresponding information).
3254  *
3255  * @deprecated Provided for backward compatibility with the 1.6 API.
3256  */
3258 svn_error_t *
3259 svn_wc_get_ancestry(char **url,
3260  svn_revnum_t *rev,
3261  const char *path,
3262  svn_wc_adm_access_t *adm_access,
3263  apr_pool_t *pool);
3264 
3265 
3266 /** A callback vtable invoked by the generic entry-walker function.
3267  * @since New in 1.5.
3268  */
3270 {
3271  /** An @a entry was found at @a path. */
3272  svn_error_t *(*found_entry)(const char *path,
3273  const svn_wc_entry_t *entry,
3274  void *walk_baton,
3275  apr_pool_t *pool);
3276 
3277  /** Handle the error @a err encountered while processing @a path.
3278  * Wrap or squelch @a err as desired, and return an #svn_error_t
3279  * *, or #SVN_NO_ERROR.
3280  */
3281  svn_error_t *(*handle_error)(const char *path,
3282  svn_error_t *err,
3283  void *walk_baton,
3284  apr_pool_t *pool);
3285 
3287 
3288 /** @deprecated Provided for backward compatibility with the 1.4 API. */
3290 {
3291  /** An @a entry was found at @a path. */
3292  svn_error_t *(*found_entry)(const char *path,
3293  const svn_wc_entry_t *entry,
3294  void *walk_baton,
3295  apr_pool_t *pool);
3296 
3298 
3299 /**
3300  * A generic entry-walker.
3301  *
3302  * Do a potentially recursive depth-first entry-walk beginning on
3303  * @a path, which can be a file or dir. Call callbacks in
3304  * @a walk_callbacks, passing @a walk_baton to each. Use @a pool for
3305  * looping, recursion, and to allocate all entries returned.
3306  * @a adm_access must be an access baton for @a path. The pool
3307  * passed to @a walk_callbacks is a temporary subpool of @a pool.
3308  *
3309  * If @a depth is #svn_depth_empty, invoke the callbacks on @a path
3310  * and return without recursing further. If #svn_depth_files, do
3311  * the same and invoke the callbacks on file children (if any) of
3312  * @a path, then return. If #svn_depth_immediates, do the preceding
3313  * but also invoke callbacks on immediate subdirectories, then return.
3314  * If #svn_depth_infinity, recurse fully starting from @a path.
3315  *
3316  * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
3317  * if the client has canceled the operation.
3318  *
3319  * Like our other entries interfaces, entries that are in a 'excluded',
3320  * 'deleted' or 'absent' state (and not scheduled for re-addition) are not
3321  * discovered, unless @a show_hidden is TRUE. Excluded entries are those with
3322  * their depth set to #svn_depth_exclude.
3323  *
3324  * When a new directory is entered, #SVN_WC_ENTRY_THIS_DIR will always
3325  * be returned first.
3326  *
3327  * @note Callers should be aware that each directory will be
3328  * returned *twice*: first as an entry within its parent, and
3329  * subsequently as the '.' entry within itself. The two calls can be
3330  * distinguished by looking for #SVN_WC_ENTRY_THIS_DIR in the 'name'
3331  * field of the entry.
3332  *
3333  * @since New in 1.5.
3334  * @deprecated Provided for backward compatibility with the 1.6 API.
3335  */
3337 svn_error_t *
3338 svn_wc_walk_entries3(const char *path,
3339  svn_wc_adm_access_t *adm_access,
3340  const svn_wc_entry_callbacks2_t *walk_callbacks,
3341  void *walk_baton,
3342  svn_depth_t depth,
3343  svn_boolean_t show_hidden,
3344  svn_cancel_func_t cancel_func,
3345  void *cancel_baton,
3346  apr_pool_t *pool);
3347 
3348 /**
3349  * Similar to svn_wc_walk_entries3(), but without cancellation support
3350  * or error handling from @a walk_callbacks, and with @a depth always
3351  * set to #svn_depth_infinity.
3352  *
3353  * @since New in 1.2.
3354  * @deprecated Provided for backward compatibility with the 1.4 API.
3355  */
3357 svn_error_t *
3358 svn_wc_walk_entries2(const char *path,
3359  svn_wc_adm_access_t *adm_access,
3360  const svn_wc_entry_callbacks_t *walk_callbacks,
3361  void *walk_baton,
3362  svn_boolean_t show_hidden,
3363  svn_cancel_func_t cancel_func,
3364  void *cancel_baton,
3365  apr_pool_t *pool);
3366 
3367 /**
3368  * Similar to svn_wc_walk_entries2(), but without cancellation support.
3369  *
3370  * @deprecated Provided for backward compatibility with the 1.1 API.
3371  */
3373 svn_error_t *
3374 svn_wc_walk_entries(const char *path,
3375  svn_wc_adm_access_t *adm_access,
3376  const svn_wc_entry_callbacks_t *walk_callbacks,
3377  void *walk_baton,
3378  svn_boolean_t show_hidden,
3379  apr_pool_t *pool);
3380 
3381 
3382 /** Mark missing @a path as 'deleted' in its @a parent's list of
3383  * entries. @a path should be a directory that is both deleted (via
3384  * svn_wc_delete4) and removed (via a system call). This function
3385  * should only be called during post-commit processing following a
3386  * successful commit editor drive.
3387  *
3388  * Return #SVN_ERR_WC_PATH_FOUND if @a path isn't actually missing.
3389  *
3390  * @deprecated Provided for backward compatibility with the 1.6 API.
3391  */
3393 svn_error_t *
3394 svn_wc_mark_missing_deleted(const char *path,
3395  svn_wc_adm_access_t *parent,
3396  apr_pool_t *pool);
3397 
3398 
3399 /** Ensure that an administrative area exists for @a local_abspath, so
3400  * that @a local_abspath is a working copy subdir based on @a url at @a
3401  * revision, with depth @a depth, and with repository UUID @a repos_uuid
3402  * and repository root URL @a repos_root_url.
3403  *
3404  * @a depth must be a definite depth, it cannot be #svn_depth_unknown.
3405  * @a repos_uuid and @a repos_root_url MUST NOT be @c NULL, and
3406  * @a repos_root_url must be a prefix of @a url.
3407  *
3408  * If the administrative area does not exist, then create it and
3409  * initialize it to an unlocked state.
3410  *
3411  * If the administrative area already exists then the given @a url
3412  * must match the URL in the administrative area and the given
3413  * @a revision must match the BASE of the working copy dir unless
3414  * the admin directory is scheduled for deletion or the
3415  * #SVN_ERR_WC_OBSTRUCTED_UPDATE error will be returned.
3416  *
3417  * Do not ensure existence of @a local_abspath itself; if @a local_abspath
3418  * does not exist, return error.
3419  *
3420  * Use @a scratch_pool for temporary allocations.
3421  *
3422  * @since New in 1.7.
3423  */
3424 svn_error_t *
3426  const char *local_abspath,
3427  const char *url,
3428  const char *repos_root_url,
3429  const char *repos_uuid,
3430  svn_revnum_t revision,
3431  svn_depth_t depth,
3432  apr_pool_t *scratch_pool);
3433 
3434 /**
3435  * Similar to svn_wc_ensure_adm4(), but without the wc context parameter.
3436  *
3437  * @note the @a uuid and @a repos parameters were documented as allowing
3438  * @c NULL to be passed. Beginning with 1.7, this will return an error,
3439  * contrary to prior documented behavior: see 'notes/api-errata/1.7/wc005.txt'.
3440  *
3441  * @since New in 1.5.
3442  * @deprecated Provided for backwards compatibility with the 1.6 API.
3443  */
3445 svn_error_t *
3446 svn_wc_ensure_adm3(const char *path,
3447  const char *uuid,
3448  const char *url,
3449  const char *repos,
3450  svn_revnum_t revision,
3451  svn_depth_t depth,
3452  apr_pool_t *pool);
3453 
3454 
3455 /**
3456  * Similar to svn_wc_ensure_adm3(), but with @a depth set to
3457  * #svn_depth_infinity.
3458  *
3459  * See the note on svn_wc_ensure_adm3() regarding the @a repos and @a uuid
3460  * parameters.
3461  *
3462  * @since New in 1.3.
3463  * @deprecated Provided for backwards compatibility with the 1.4 API.
3464  */
3466 svn_error_t *
3467 svn_wc_ensure_adm2(const char *path,
3468  const char *uuid,
3469  const char *url,
3470  const char *repos,
3471  svn_revnum_t revision,
3472  apr_pool_t *pool);
3473 
3474 
3475 /**
3476  * Similar to svn_wc_ensure_adm2(), but with @a repos set to @c NULL.
3477  *
3478  * @note as of 1.7, this function always returns #SVN_ERR_BAD_URL since
3479  * the @a repos parameter may not be @c NULL.
3480  *
3481  * @deprecated Provided for backwards compatibility with the 1.2 API.
3482  */
3484 svn_error_t *
3485 svn_wc_ensure_adm(const char *path,
3486  const char *uuid,
3487  const char *url,
3488  svn_revnum_t revision,
3489  apr_pool_t *pool);
3490 
3491 
3492 /** Set the repository root URL of @a path to @a repos, if possible.
3493  *
3494  * Before Subversion 1.7 there could be working copy directories that
3495  * didn't have a stored repository root in some specific circumstances.
3496  * This function allowed setting this root later.
3497  *
3498  * Since Subversion 1.7 this function just returns #SVN_NO_ERROR.
3499  *
3500  * @since New in 1.3.
3501  * @deprecated Provided for backwards compatibility with the 1.6 API.
3502  */
3504 svn_error_t *
3506  const char *path,
3507  const char *repos,
3508  apr_pool_t *pool);
3509 
3510 
3511 /**
3512  * @defgroup svn_wc_status Working copy status.
3513  * @{
3514  *
3515  * We have three functions for getting working copy status: one function
3516  * for getting the status of exactly one thing, another for
3517  * getting the statuses of (potentially) multiple things and a third for
3518  * getting the working copy out-of-dateness with respect to the repository.
3519  *
3520  * Why do we have two different functions for getting working copy status?
3521  * The concept of depth, as explained in the documentation for
3522  * svn_depth_t, may be useful in understanding this. Suppose we're
3523  * getting the status of directory D:
3524  *
3525  * To offer all three levels, we could have one unified function,
3526  * taking a `depth' parameter. Unfortunately, because this function
3527  * would have to handle multiple return values as well as the single
3528  * return value case, getting the status of just one entity would
3529  * become cumbersome: you'd have to roll through a hash to find one
3530  * lone status.
3531  *
3532  * So we have svn_wc_status3() for depth-empty (just D itself), and
3533  * svn_wc_walk_status() for depth-immediates and depth-infinity,
3534  * since the latter two involve multiple return values. And for
3535  * out-of-dateness information we have svn_wc_get_status_editor5().
3536  */
3537 
3538 /** The type of status for the working copy. */
3540 {
3541  /** does not exist */
3543 
3544  /** is not a versioned thing in this wc */
3546 
3547  /** exists, but uninteresting */
3549 
3550  /** is scheduled for addition */
3552 
3553  /** under v.c., but is missing */
3555 
3556  /** scheduled for deletion */
3558 
3559  /** was deleted and then re-added */
3561 
3562  /** text or props have been modified */
3564 
3565  /** local mods received repos mods (### unused) */
3567 
3568  /** local mods received conflicting repos mods */
3570 
3571  /** is unversioned but configured to be ignored */
3573 
3574  /** an unversioned resource is in the way of the versioned resource */
3576 
3577  /** an unversioned directory path populated by an svn:externals
3578  property; this status is not used for file externals */
3580 
3581  /** a directory doesn't contain a complete entries list */
3583 };
3584 
3585 /**
3586  * Structure for holding the "status" of a working copy item.
3587  *
3588  * @note Fields may be added to the end of this structure in future
3589  * versions. Therefore, to preserve binary compatibility, users
3590  * should not directly allocate structures of this type.
3591  *
3592  * @since New in 1.7.
3593  */
3594 typedef struct svn_wc_status3_t
3595 {
3596  /** The kind of node as recorded in the working copy */
3598 
3599  /** The depth of the node as recorded in the working copy
3600  * (#svn_depth_unknown for files or when no depth is set) */
3602 
3603  /** The actual size of the working file on disk, or SVN_INVALID_FILESIZE
3604  * if unknown (or if the item isn't a file at all). */
3606 
3607  /** If the path is under version control, versioned is TRUE, otherwise
3608  * FALSE. */
3610 
3611  /** Set to TRUE if the item is the victim of a conflict. */
3613 
3614  /** The status of the node itself. In order of precedence: Obstructions,
3615  * structural changes, text changes. */
3617 
3618  /** The status of the entry's text. */
3620 
3621  /** The status of the entry's properties. */
3623 
3624  /** a file or directory can be 'copied' if it's scheduled for
3625  * addition-with-history (or part of a subtree that is scheduled as such.).
3626  */
3628 
3629  /** Base revision. */
3631 
3632  /** Last revision this was changed */
3634 
3635  /** Date of last commit. */
3636  apr_time_t changed_date;
3637 
3638  /** Last commit author of this item */
3639  const char *changed_author;
3640 
3641  /** The URL of the repository */
3642  const char *repos_root_url;
3643 
3644  /** The UUID of the repository */
3645  const char *repos_uuid;
3646 
3647  /** The in-repository path relative to the repository root. */
3648  const char *repos_relpath;
3649 
3650  /** a file or directory can be 'switched' if the switch command has been
3651  * used. If this is TRUE, then file_external will be FALSE.
3652  */
3654 
3655  /** This directory has a working copy lock */
3657 
3658  /** The repository file lock. (Values of path, token, owner, comment
3659  * and are available if a lock is present) */
3661 
3662  /** Which changelist this item is part of, or NULL if not part of any. */
3663  const char *changelist;
3664 
3665  /**
3666  * @defgroup svn_wc_status_ood WC out-of-date info from the repository
3667  * @{
3668  *
3669  * When the working copy item is out-of-date compared to the
3670  * repository, the following fields represent the state of the
3671  * youngest revision of the item in the repository. If the working
3672  * copy is not out of date, the fields are initialized as described
3673  * below.
3674  */
3675 
3676  /** Set to the node kind of the youngest commit, or #svn_node_none
3677  * if not out of date. */
3679 
3680  /** The status of the node, based on the text status if the node has no
3681  * restructuring changes */
3683 
3684  /** The entry's text status in the repository. */
3686 
3687  /** The entry's property status in the repository. */
3689 
3690  /** The entry's lock in the repository, if any. */
3692 
3693  /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM
3694  * if not out of date. */
3696 
3697  /** Set to the most recent commit date, or @c 0 if not out of date. */
3698  apr_time_t ood_changed_date;
3699 
3700  /** Set to the user name of the youngest commit, or @c NULL if not
3701  * out of date or non-existent. Because a non-existent @c
3702  * svn:author property has the same behavior as an out-of-date
3703  * working copy, examine @c ood_last_cmt_rev to determine whether
3704  * the working copy is out of date. */
3705  const char *ood_changed_author;
3706 
3707  /** @} */
3708 
3709  /** Set to the local absolute path that this node was moved from, if this
3710  * file or directory has been moved here locally and is the root of that
3711  * move. Otherwise set to NULL.
3712  *
3713  * This will be NULL for moved-here nodes that are just part of a subtree
3714  * that was moved along (and are not themselves a root of a different move
3715  * operation).
3716  *
3717  * @since New in 1.8. */
3718  const char *moved_from_abspath;
3719 
3720  /** Set to the local absolute path that this node was moved to, if this file
3721  * or directory has been moved away locally and corresponds to the root
3722  * of the destination side of the move. Otherwise set to NULL.
3723  *
3724  * Note: Saying just "root" here could be misleading. For example:
3725  * svn mv A AA;
3726  * svn mv AA/B BB;
3727  * creates a situation where A/B is moved-to BB, but one could argue that
3728  * the move source's root actually was AA/B. Note that, as far as the
3729  * working copy is concerned, above case is exactly identical to:
3730  * svn mv A/B BB;
3731  * svn mv A AA;
3732  * In both situations, @a moved_to_abspath would be set for nodes A (moved
3733  * to AA) and A/B (moved to BB), only.
3734  *
3735  * This will be NULL for moved-away nodes that were just part of a subtree
3736  * that was moved along (and are not themselves a root of a different move
3737  * operation).
3738  *
3739  * @since New in 1.8. */
3740  const char *moved_to_abspath;
3741 
3742  /** @c TRUE iff the item is a file brought in by an svn:externals definition.
3743  * @since New in 1.8. */
3745 
3746  /* NOTE! Please update svn_wc_dup_status3() when adding new fields here. */
3748 
3749 /**
3750  * ### All diffs are not yet known.
3751  * Same as svn_wc_status3_t, but without the #svn_boolean_t 'versioned'
3752  * field. Instead an item that is not versioned has the 'entry' field set to
3753  * @c NULL.
3754  *
3755  * @since New in 1.2.
3756  * @deprecated Provided for backward compatibility with the 1.6 API.
3757  */
3758 typedef struct svn_wc_status2_t
3759 {
3760  /** Can be @c NULL if not under version control. */
3762 
3763  /** The status of the entry itself, including its text if it is a file. */
3765 
3766  /** The status of the entry's properties. */
3768 
3769  /** a directory can be 'locked' if a working copy update was interrupted. */
3771 
3772  /** a file or directory can be 'copied' if it's scheduled for
3773  * addition-with-history (or part of a subtree that is scheduled as such.).
3774  */
3776 
3777  /** a file or directory can be 'switched' if the switch command has been
3778  * used. If this is TRUE, then file_external will be FALSE.
3779  */
3781 
3782  /** The entry's text status in the repository. */
3784 
3785  /** The entry's property status in the repository. */
3787 
3788  /** The entry's lock in the repository, if any. */
3790 
3791  /** Set to the URI (actual or expected) of the item.
3792  * @since New in 1.3
3793  */
3794  const char *url;
3795 
3796  /**
3797  * @defgroup svn_wc_status_ood WC out-of-date info from the repository
3798  * @{
3799  *
3800  * When the working copy item is out-of-date compared to the
3801  * repository, the following fields represent the state of the
3802  * youngest revision of the item in the repository. If the working
3803  * copy is not out of date, the fields are initialized as described
3804  * below.
3805  */
3806 
3807  /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM
3808  * if not out of date.
3809  * @since New in 1.3
3810  */
3812 
3813  /** Set to the most recent commit date, or @c 0 if not out of date.
3814  * @since New in 1.3
3815  */
3816  apr_time_t ood_last_cmt_date;
3817 
3818  /** Set to the node kind of the youngest commit, or #svn_node_none
3819  * if not out of date.
3820  * @since New in 1.3
3821  */
3823 
3824  /** Set to the user name of the youngest commit, or @c NULL if not
3825  * out of date or non-existent. Because a non-existent @c
3826  * svn:author property has the same behavior as an out-of-date
3827  * working copy, examine @c ood_last_cmt_rev to determine whether
3828  * the working copy is out of date.
3829  * @since New in 1.3
3830  */
3831  const char *ood_last_cmt_author;
3832 
3833  /** @} */
3834 
3835  /** Non-NULL if the entry is the victim of a tree conflict.
3836  * @since New in 1.6
3837  */
3839 
3840  /** If the item is a file that was added to the working copy with an
3841  * svn:externals; if file_external is TRUE, then switched is always
3842  * FALSE.
3843  * @since New in 1.6
3844  */
3846 
3847  /** The actual status of the text compared to the pristine base of the
3848  * file. This value isn't masked by other working copy statuses.
3849  * @c pristine_text_status is #svn_wc_status_none if this value was
3850  * not calculated during the status walk.
3851  * @since New in 1.6
3852  */
3854 
3855  /** The actual status of the properties compared to the pristine base of
3856  * the node. This value isn't masked by other working copy statuses.
3857  * @c pristine_prop_status is #svn_wc_status_none if this value was
3858  * not calculated during the status walk.
3859  * @since New in 1.6
3860  */
3862 
3864 
3865 
3866 
3867 /**
3868  * Same as #svn_wc_status2_t, but without the #svn_lock_t 'repos_lock', const char 'url', #svn_revnum_t 'ood_last_cmt_rev', apr_time_t 'ood_last_cmt_date', #svn_node_kind_t 'ood_kind', const char 'ood_last_cmt_author', #svn_wc_conflict_description_t 'tree_conflict', #svn_boolean_t 'file_external', #svn_wc_status_kind 'pristine_text_status', and #svn_wc_status_kind 'pristine_prop_status' fields.
3869  *
3870  * @deprecated Provided for backward compatibility with the 1.1 API.
3871  */
3872 typedef struct svn_wc_status_t
3873 {
3874  /** Can be @c NULL if not under version control. */
3876 
3877  /** The status of the entries text. */
3879 
3880  /** The status of the entries properties. */
3882 
3883  /** a directory can be 'locked' if a working copy update was interrupted. */
3885 
3886  /** a file or directory can be 'copied' if it's scheduled for
3887  * addition-with-history (or part of a subtree that is scheduled as such.).
3888  */
3890 
3891  /** a file or directory can be 'switched' if the switch command has been
3892  * used.
3893  */
3895 
3896  /** The entry's text status in the repository. */
3898 
3899  /** The entry's property status in the repository. */
3901 
3902 } svn_wc_status_t;
3903 
3904 
3905 /**
3906  * Return a deep copy of the @a orig_stat status structure, allocated
3907  * in @a pool.
3908  *
3909  * @since New in 1.7.
3910  */
3912 svn_wc_dup_status3(const svn_wc_status3_t *orig_stat,
3913  apr_pool_t *pool);
3914 
3915 /**
3916  * Same as svn_wc_dup_status3(), but for older svn_wc_status_t structures.
3917  *
3918  * @since New in 1.2
3919  * @deprecated Provided for backward compatibility with the 1.6 API.
3920  */
3923 svn_wc_dup_status2(const svn_wc_status2_t *orig_stat,
3924  apr_pool_t *pool);
3925 
3926 
3927 /**
3928  * Same as svn_wc_dup_status2(), but for older svn_wc_status_t structures.
3929  *
3930  * @deprecated Provided for backward compatibility with the 1.1 API.
3931  */
3934 svn_wc_dup_status(const svn_wc_status_t *orig_stat,
3935  apr_pool_t *pool);
3936 
3937 
3938 /**
3939  * Fill @a *status for @a local_abspath, allocating in @a result_pool.
3940  * Use @a scratch_pool for temporary allocations.
3941  *
3942  * Here are some things to note about the returned structure. A quick
3943  * examination of the @c status->text_status after a successful return of
3944  * this function can reveal the following things:
3945  *
3946  * - #svn_wc_status_none : @a local_abspath is not versioned, and is
3947  * not present on disk
3948  *
3949  * - #svn_wc_status_missing : @a local_abspath is versioned, but is
3950  * missing from the working copy.
3951  *
3952  * - #svn_wc_status_unversioned : @a local_abspath is not versioned,
3953  * but is present on disk and not being
3954  * ignored (see above).
3955  *
3956  * The other available results for the @c text_status field are more
3957  * straightforward in their meanings. See the comments on the
3958  * #svn_wc_status_kind structure for some hints.
3959  *
3960  * @since New in 1.7.
3961  */
3962 svn_error_t *
3964  svn_wc_context_t *wc_ctx,
3965  const char *local_abspath,
3966  apr_pool_t *result_pool,
3967  apr_pool_t *scratch_pool);
3968 
3969 /** Similar to svn_wc_status3(), but with a adm_access baton and absolute
3970  * path.
3971  *
3972  * @since New in 1.2.
3973  * @deprecated Provided for backward compatibility with the 1.6 API.
3974  */
3976 svn_error_t *
3978  const char *path,
3979  svn_wc_adm_access_t *adm_access,
3980  apr_pool_t *pool);
3981 
3982 
3983 /**
3984  * Same as svn_wc_status2(), but for older svn_wc_status_t structures.
3985  *
3986  * @deprecated Provided for backward compatibility with the 1.1 API.
3987  */
3989 svn_error_t *
3991  const char *path,
3992  svn_wc_adm_access_t *adm_access,
3993  apr_pool_t *pool);
3994 
3995 
3996 
3997 
3998 /**
3999  * A callback for reporting a @a status about @a local_abspath.
4000  *
4001  * @a baton is a closure object; it should be provided by the
4002  * implementation, and passed by the caller.
4003  *
4004  * @a scratch_pool will be cleared between invocations to the callback.
4005  *
4006  * @since New in 1.7.
4007  */
4008 typedef svn_error_t *(*svn_wc_status_func4_t)(void *baton,
4009  const char *local_abspath,
4010  const svn_wc_status3_t *status,
4011  apr_pool_t *scratch_pool);
4012 
4013 /**
4014  * Same as svn_wc_status_func4_t, but with a non-const status and a relative
4015  * path.
4016  *
4017  * @since New in 1.6.
4018  * @deprecated Provided for backward compatibility with the 1.6 API.
4019  */
4020 typedef svn_error_t *(*svn_wc_status_func3_t)(void *baton,
4021  const char *path,
4022  svn_wc_status2_t *status,
4023  apr_pool_t *pool);
4024 
4025 /**
4026  * Same as svn_wc_status_func3_t, but without a provided pool or
4027  * the ability to propagate errors.
4028  *
4029  * @since New in 1.2.
4030  * @deprecated Provided for backward compatibility with the 1.5 API.
4031  */
4032 typedef void (*svn_wc_status_func2_t)(void *baton,
4033  const char *path,
4034  svn_wc_status2_t *status);
4035 
4036 /**
4037  * Same as svn_wc_status_func2_t, but for older svn_wc_status_t structures.
4038  *
4039  * @deprecated Provided for backward compatibility with the 1.1 API.
4040  */
4041 typedef void (*svn_wc_status_func_t)(void *baton,
4042  const char *path,
4043  svn_wc_status_t *status);
4044 
4045 /**
4046  * Walk the working copy status of @a local_abspath using @a wc_ctx, by
4047  * creating #svn_wc_status3_t structures and sending these through
4048  * @a status_func / @a status_baton.
4049  *
4050  * * Assuming the target is a directory, then:
4051  *
4052  * - If @a get_all is FALSE, then only locally-modified entries will be
4053  * returned. If TRUE, then all entries will be returned.
4054  *
4055  * - If @a ignore_text_mods is TRUE, then the walk will not check for
4056  * modified files. Any #svn_wc_status3_t structures returned for files
4057  * will always have a text_status field set to svn_wc_status_normal.
4058  * If @a ignore_text_mods is FALSE, the walk checks for text changes
4059  * and returns #svn_wc_status3_t structures describing any changes.
4060  *
4061  * - If @a depth is #svn_depth_empty, a status structure will
4062  * be returned for the target only; if #svn_depth_files, for the
4063  * target and its immediate file children; if
4064  * #svn_depth_immediates, for the target and its immediate
4065  * children; if #svn_depth_infinity, for the target and
4066  * everything underneath it, fully recursively.
4067  *
4068  * If @a depth is #svn_depth_unknown, take depths from the
4069  * working copy and behave as above in each directory's case.
4070  *
4071  * If the given @a depth is incompatible with the depth found in a
4072  * working copy directory, the found depth always governs.
4073  *
4074  * If @a no_ignore is set, statuses that would typically be ignored
4075  * will instead be reported.
4076  *
4077  * @a ignore_patterns is an array of file patterns matching
4078  * unversioned files to ignore for the purposes of status reporting,
4079  * or @c NULL if the default set of ignorable file patterns should be used.
4080  * Patterns from #SVN_PROP_IGNORE (and, as of 1.8,
4081  * #SVN_PROP_INHERITABLE_IGNORES) properties are always used, even if not
4082  * specified in @a ignore_patterns.
4083  *
4084  * If @a cancel_func is non-NULL, call it with @a cancel_baton while walking
4085  * to determine if the client has canceled the operation.
4086  *
4087  * This function uses @a scratch_pool for temporary allocations.
4088  *
4089  * @since New in 1.7.
4090  */
4091 svn_error_t *
4093  const char *local_abspath,
4094  svn_depth_t depth,
4095  svn_boolean_t get_all,
4096  svn_boolean_t no_ignore,
4097  svn_boolean_t ignore_text_mods,
4098  const apr_array_header_t *ignore_patterns,
4099  svn_wc_status_func4_t status_func,
4100  void *status_baton,
4101  svn_cancel_func_t cancel_func,
4102  void *cancel_baton,
4103  apr_pool_t *scratch_pool);
4104 
4105 /**
4106  * DEPRECATED -- please use APIs from svn_client.h
4107  *
4108  * ---
4109  *
4110  * Set @a *editor and @a *edit_baton to an editor that generates
4111  * #svn_wc_status3_t structures and sends them through @a status_func /
4112  * @a status_baton. @a anchor_abspath is a working copy directory
4113  * directory which will be used as the root of our editor. If @a
4114  * target_basename is not "", it represents a node in the @a anchor_abspath
4115  * which is the subject of the editor drive (otherwise, the @a
4116  * anchor_abspath is the subject).
4117  *
4118  * If @a set_locks_baton is non-@c NULL, it will be set to a baton that can
4119  * be used in a call to the svn_wc_status_set_repos_locks() function.
4120  *
4121  * Callers drive this editor to describe working copy out-of-dateness
4122  * with respect to the repository. If this information is not
4123  * available or not desired, callers should simply call the
4124  * close_edit() function of the @a editor vtable.
4125  *
4126  * If the editor driver calls @a editor's set_target_revision() vtable
4127  * function, then when the edit drive is completed, @a *edit_revision
4128  * will contain the revision delivered via that interface.
4129  *
4130  * Assuming the target is a directory, then:
4131  *
4132  * - If @a get_all is FALSE, then only locally-modified entries will be
4133  * returned. If TRUE, then all entries will be returned.
4134  *
4135  * - If @a depth is #svn_depth_empty, a status structure will
4136  * be returned for the target only; if #svn_depth_files, for the
4137  * target and its immediate file children; if
4138  * #svn_depth_immediates, for the target and its immediate
4139  * children; if #svn_depth_infinity, for the target and
4140  * everything underneath it, fully recursively.
4141  *
4142  * If @a depth is #svn_depth_unknown, take depths from the
4143  * working copy and behave as above in each directory's case.
4144  *
4145  * If the given @a depth is incompatible with the depth found in a
4146  * working copy directory, the found depth always governs.
4147  *
4148  * If @a no_ignore is set, statuses that would typically be ignored
4149  * will instead be reported.
4150  *
4151  * @a ignore_patterns is an array of file patterns matching
4152  * unversioned files to ignore for the purposes of status reporting,
4153  * or @c NULL if the default set of ignorable file patterns should be used.
4154  *
4155  * If @a cancel_func is non-NULL, call it with @a cancel_baton while building
4156  * the @a statushash to determine if the client has canceled the operation.
4157  *
4158  * If @a depth_as_sticky is set handle @a depth like when depth_is_sticky is
4159  * passed for updating. This will show excluded nodes show up as added in the
4160  * repository.
4161  *
4162  * If @a server_performs_filtering is TRUE, assume that the server handles
4163  * the ambient depth filtering, so this doesn't have to be handled in the
4164  * editor.
4165  *
4166  * Allocate the editor itself in @a result_pool, and use @a scratch_pool
4167  * for temporary allocations. The editor will do its temporary allocations
4168  * in a subpool of @a result_pool.
4169  *
4170  * @since New in 1.7.
4171  * @deprecated Provided for backward compatibility with the 1.7 API.
4172  */
4174 svn_error_t *
4176  void **edit_baton,
4177  void **set_locks_baton,
4178  svn_revnum_t *edit_revision,
4179  svn_wc_context_t *wc_ctx,
4180  const char *anchor_abspath,
4181  const char *target_basename,
4182  svn_depth_t depth,
4183  svn_boolean_t get_all,
4184  svn_boolean_t no_ignore,
4185  svn_boolean_t depth_as_sticky,
4186  svn_boolean_t server_performs_filtering,
4187  const apr_array_header_t *ignore_patterns,
4188  svn_wc_status_func4_t status_func,
4189  void *status_baton,
4190  svn_cancel_func_t cancel_func,
4191  void *cancel_baton,
4192  apr_pool_t *result_pool,
4193  apr_pool_t *scratch_pool);
4194 
4195 /**
4196  * Same as svn_wc_get_status_editor5, but using #svn_wc_status_func3_t
4197  * instead of #svn_wc_status_func4_t. And @a server_performs_filtering
4198  * always set to #TRUE.
4199  *
4200  * This also uses a single pool parameter, stating that all temporary
4201  * allocations are performed in manually constructed/destroyed subpool.
4202  *
4203  * @since New in 1.6.
4204  * @deprecated Provided for backward compatibility with the 1.6 API.
4205  */
4207 svn_error_t *
4209  void **edit_baton,
4210  void **set_locks_baton,
4211  svn_revnum_t *edit_revision,
4212  svn_wc_adm_access_t *anchor,
4213  const char *target,
4214  svn_depth_t depth,
4215  svn_boolean_t get_all,
4216  svn_boolean_t no_ignore,
4217  const apr_array_header_t *ignore_patterns,
4218  svn_wc_status_func3_t status_func,
4219  void *status_baton,
4220  svn_cancel_func_t cancel_func,
4221  void *cancel_baton,
4222  svn_wc_traversal_info_t *traversal_info,
4223  apr_pool_t *pool);
4224 
4225 /**
4226  * Same as svn_wc_get_status_editor4(), but using #svn_wc_status_func2_t
4227  * instead of #svn_wc_status_func3_t.
4228  *
4229  * @since New in 1.5.
4230  * @deprecated Provided for backward compatibility with the 1.5 API.
4231  */
4233 svn_error_t *
4235  void **edit_baton,
4236  void **set_locks_baton,
4237  svn_revnum_t *edit_revision,
4238  svn_wc_adm_access_t *anchor,
4239  const char *target,
4240  svn_depth_t depth,
4241  svn_boolean_t get_all,
4242  svn_boolean_t no_ignore,
4243  const apr_array_header_t *ignore_patterns,
4244  svn_wc_status_func2_t status_func,
4245  void *status_baton,
4246  svn_cancel_func_t cancel_func,
4247  void *cancel_baton,
4248  svn_wc_traversal_info_t *traversal_info,
4249  apr_pool_t *pool);
4250 
4251 /**
4252  * Like svn_wc_get_status_editor3(), but with @a ignore_patterns
4253  * provided from the corresponding value in @a config, and @a recurse
4254  * instead of @a depth. If @a recurse is TRUE, behave as if for
4255  * #svn_depth_infinity; else if @a recurse is FALSE, behave as if for
4256  * #svn_depth_immediates.
4257  *
4258  * @since New in 1.2.
4259  * @deprecated Provided for backward compatibility with the 1.4 API.
4260  */
4262 svn_error_t *
4264  void **edit_baton,
4265  void **set_locks_baton,
4266  svn_revnum_t *edit_revision,
4267  svn_wc_adm_access_t *anchor,
4268  const char *target,
4269  apr_hash_t *config,
4270  svn_boolean_t recurse,
4271  svn_boolean_t get_all,
4272  svn_boolean_t no_ignore,
4273  svn_wc_status_func2_t status_func,
4274  void *status_baton,
4275  svn_cancel_func_t cancel_func,
4276  void *cancel_baton,
4277  svn_wc_traversal_info_t *traversal_info,
4278  apr_pool_t *pool);
4279 
4280 /**
4281  * Same as svn_wc_get_status_editor2(), but with @a set_locks_baton set
4282  * to @c NULL, and taking a deprecated svn_wc_status_func_t argument.
4283  *
4284  * @deprecated Provided for backward compatibility with the 1.1 API.
4285  */
4287 svn_error_t *
4289  void **edit_baton,
4290  svn_revnum_t *edit_revision,
4291  svn_wc_adm_access_t *anchor,
4292  const char *target,
4293  apr_hash_t *config,
4294  svn_boolean_t recurse,
4295  svn_boolean_t get_all,
4296  svn_boolean_t no_ignore,
4297  svn_wc_status_func_t status_func,
4298  void *status_baton,
4299  svn_cancel_func_t cancel_func,
4300  void *cancel_baton,
4301  svn_wc_traversal_info_t *traversal_info,
4302  apr_pool_t *pool);
4303 
4304 
4305 /**
4306  * Associate @a locks, a hash table mapping <tt>const char*</tt>
4307  * absolute repository paths to <tt>svn_lock_t</tt> objects, with a
4308  * @a set_locks_baton returned by an earlier call to
4309  * svn_wc_get_status_editor3(). @a repos_root is the repository root URL.
4310  * Perform all allocations in @a pool.
4311  *
4312  * @note @a locks will not be copied, so it must be valid throughout the
4313  * edit. @a pool must also not be destroyed or cleared before the edit is
4314  * finished.
4315  *
4316  * @since New in 1.2.
4317  */
4318 svn_error_t *
4319 svn_wc_status_set_repos_locks(void *set_locks_baton,
4320  apr_hash_t *locks,
4321  const char *repos_root,
4322  apr_pool_t *pool);
4323 
4324 /** @} */
4325 
4326 
4327 /**
4328  * Copy @a src_abspath to @a dst_abspath, and schedule @a dst_abspath
4329  * for addition to the repository, remembering the copy history. @a wc_ctx
4330  * is used for accessing the working copy and must contain a write lock for
4331  * the parent directory of @a dst_abspath,
4332  *
4333  * If @a metadata_only is TRUE then this is a database-only operation and
4334  * the working directories and files are not copied.
4335  *
4336  * @a src_abspath must be a file or directory under version control;
4337  * the parent of @a dst_abspath must be a directory under version control
4338  * in the same working copy; @a dst_abspath will be the name of the copied
4339  * item, and it must not exist already if @a metadata_only is FALSE. Note that
4340  * when @a src points to a versioned file, the working file doesn't
4341  * necessarily exist in which case its text-base is used instead.
4342  *
4343  * If @a cancel_func is non-NULL, call it with @a cancel_baton at
4344  * various points during the operation. If it returns an error
4345  * (typically #SVN_ERR_CANCELLED), return that error immediately.
4346  *
4347  * If @a notify_func is non-NULL, call it with @a notify_baton and the path
4348  * of the root node (only) of the destination.
4349  *
4350  * Use @a scratch_pool for temporary allocations.
4351  *
4352  * @since New in 1.7.
4353  */
4354 svn_error_t *
4356  const char *src_abspath,
4357  const char *dst_abspath,
4358  svn_boolean_t metadata_only,
4359  svn_cancel_func_t cancel_func,
4360  void *cancel_baton,
4361  svn_wc_notify_func2_t notify_func,
4362  void *notify_baton,
4363  apr_pool_t *scratch_pool);
4364 
4365 /** Similar to svn_wc_copy3(), but takes access batons and a relative path
4366  * and a basename instead of absolute paths and a working copy context.
4367  *
4368  * @since New in 1.2.
4369  * @deprecated Provided for backward compatibility with the 1.6 API.
4370  */
4372 svn_error_t *
4373 svn_wc_copy2(const char *src,
4374  svn_wc_adm_access_t *dst_parent,
4375  const char *dst_basename,
4376  svn_cancel_func_t cancel_func,
4377  void *cancel_baton,
4378  svn_wc_notify_func2_t notify_func,
4379  void *notify_baton,
4380  apr_pool_t *pool);
4381 
4382 /**
4383  * Similar to svn_wc_copy2(), but takes an #svn_wc_notify_func_t instead.
4384  *
4385  * @deprecated Provided for backward compatibility with the 1.1 API.
4386  */
4388 svn_error_t *
4389 svn_wc_copy(const char *src,
4390  svn_wc_adm_access_t *dst_parent,
4391  const char *dst_basename,
4392  svn_cancel_func_t cancel_func,
4393  void *cancel_baton,
4394  svn_wc_notify_func_t notify_func,
4395  void *notify_baton,
4396  apr_pool_t *pool);
4397 
4398 /**
4399  * Move @a src_abspath to @a dst_abspath, by scheduling @a dst_abspath
4400  * for addition to the repository, remembering the history. Mark @a src_abspath
4401  * as deleted after moving.@a wc_ctx is used for accessing the working copy and
4402  * must contain a write lock for the parent directory of @a src_abspath and
4403  * @a dst_abspath.
4404  *
4405  * If @a metadata_only is TRUE then this is a database-only operation and
4406  * the working directories and files are not changed.
4407  *
4408  * @a src_abspath must be a file or directory under version control;
4409  * the parent of @a dst_abspath must be a directory under version control
4410  * in the same working copy; @a dst_abspath will be the name of the copied
4411  * item, and it must not exist already if @a metadata_only is FALSE. Note that
4412  * when @a src points to a versioned file, the working file doesn't
4413  * necessarily exist in which case its text-base is used instead.
4414  *
4415  * If @a cancel_func is non-NULL, call it with @a cancel_baton at
4416  * various points during the operation. If it returns an error
4417  * (typically #SVN_ERR_CANCELLED), return that error immediately.
4418  *
4419  * If @a notify_func is non-NULL, call it with @a notify_baton and the path
4420  * of the root node (only) of the destination.
4421  *
4422  * Use @a scratch_pool for temporary allocations.
4423  *
4424  * @since New in 1.7.
4425  * @deprecated Provided for backward compatibility with the 1.7 API.
4426  * @see svn_client_move7()
4427  */
4429 svn_error_t *
4431  const char *src_abspath,
4432  const char *dst_abspath,
4433  svn_boolean_t metadata_only,
4434  svn_cancel_func_t cancel_func,
4435  void *cancel_baton,
4436  svn_wc_notify_func2_t notify_func,
4437  void *notify_baton,
4438  apr_pool_t *scratch_pool);
4439 
4440 /**
4441  * Schedule @a local_abspath for deletion. It will be deleted from the
4442  * repository on the next commit. If @a local_abspath refers to a
4443  * directory, then a recursive deletion will occur. @a wc_ctx must hold
4444  * a write lock for the parent of @a local_abspath, @a local_abspath itself
4445  * and everything below @a local_abspath.
4446  *
4447  * If @a keep_local is FALSE, this function immediately deletes all files,
4448  * modified and unmodified, versioned and of @a delete_unversioned is TRUE,
4449  * unversioned from the working copy.
4450  * It also immediately deletes unversioned directories and directories that
4451  * are scheduled to be added below @a local_abspath. Only versioned may
4452  * remain in the working copy, these get deleted by the update following
4453  * the commit.
4454  *
4455  * If @a keep_local is TRUE, all files and directories will be kept in the
4456  * working copy (and will become unversioned on the next commit).
4457  *
4458  * If @a delete_unversioned_target is TRUE and @a local_abspath is not
4459  * versioned, @a local_abspath will be handled as an added files without
4460  * history. So it will be deleted if @a keep_local is FALSE. If @a
4461  * delete_unversioned is FALSE and @a local_abspath is not versioned a
4462  * #SVN_ERR_WC_PATH_NOT_FOUND error will be returned.
4463  *
4464  * If @a cancel_func is non-NULL, call it with @a cancel_baton at
4465  * various points during the operation. If it returns an error
4466  * (typically #SVN_ERR_CANCELLED), return that error immediately.
4467  *
4468  * For each path marked for deletion, @a notify_func will be called with
4469  * the @a notify_baton and that path. The @a notify_func callback may be
4470  * @c NULL if notification is not needed.
4471  *
4472  * Use @a scratch_pool for temporary allocations. It may be cleared
4473  * immediately upon returning from this function.
4474  *
4475  * @since New in 1.7.
4476  */
4477  /* ### BH: Maybe add a delete_switched flag that allows deny switched
4478  nodes like file externals? */
4479 svn_error_t *
4481  const char *local_abspath,
4482  svn_boolean_t keep_local,
4483  svn_boolean_t delete_unversioned_target,
4484  svn_cancel_func_t cancel_func,
4485  void *cancel_baton,
4486  svn_wc_notify_func2_t notify_func,
4487  void *notify_baton,
4488  apr_pool_t *scratch_pool);
4489 
4490 /**
4491  * Similar to svn_wc_delete4, but uses an access baton and relative path
4492  * instead of a working copy context and absolute path. @a adm_access
4493  * must hold a write lock for the parent of @a path.
4494  *
4495  * @c delete_unversioned_target will always be set to TRUE.
4496  *
4497  * @since New in 1.5.
4498  * @deprecated Provided for backward compatibility with the 1.6 API.
4499  */
4501 svn_error_t *
4502 svn_wc_delete3(const char *path,
4503  svn_wc_adm_access_t *adm_access,
4504  svn_cancel_func_t cancel_func,
4505  void *cancel_baton,
4506  svn_wc_notify_func2_t notify_func,
4507  void *notify_baton,
4508  svn_boolean_t keep_local,
4509  apr_pool_t *pool);
4510 
4511 /**
4512  * Similar to svn_wc_delete3(), but with @a keep_local always set to FALSE.
4513  *
4514  * @deprecated Provided for backward compatibility with the 1.4 API.
4515  */
4517 svn_error_t *
4518 svn_wc_delete2(const char *path,
4519  svn_wc_adm_access_t *adm_access,
4520  svn_cancel_func_t cancel_func,
4521  void *cancel_baton,
4522  svn_wc_notify_func2_t notify_func,
4523  void *notify_baton,
4524  apr_pool_t *pool);
4525 
4526 /**
4527  * Similar to svn_wc_delete2(), but takes an #svn_wc_notify_func_t instead.
4528  *
4529  * @deprecated Provided for backward compatibility with the 1.1 API.
4530  */
4532 svn_error_t *
4533 svn_wc_delete(const char *path,
4534  svn_wc_adm_access_t *adm_access,
4535  svn_cancel_func_t cancel_func,
4536  void *cancel_baton,
4537  svn_wc_notify_func_t notify_func,
4538  void *notify_baton,
4539  apr_pool_t *pool);
4540 
4541 
4542 /**
4543  * Schedule the single node that exists on disk at @a local_abspath for
4544  * addition to the working copy. The added node will have the properties
4545  * provided in @a props, or none if that is NULL.
4546  *
4547  * Check and canonicalize the properties in the same way as
4548  * svn_wc_prop_set4(). Return an error and don't add the node if the
4549  * properties are not valid on this node. Unlike svn_wc_prop_set4()
4550  * there is no option to skip some of the checks and canonicalizations.
4551  *
4552  * ### The error code on validity check failure should be specified, and
4553  * preferably should be a single code.
4554  *
4555  * The versioned state of the parent path must be a modifiable directory,
4556  * and the versioned state of @a local_abspath must be either nonexistent or
4557  * deleted; if deleted, the new node will be a replacement.
4558  *
4559  * If @a local_abspath does not exist as file, directory or symlink, return
4560  * #SVN_ERR_WC_PATH_NOT_FOUND.
4561  *
4562  * ### TODO: Split into add_dir, add_file, add_symlink?
4563  *
4564  * @since New in 1.8.
4565  */
4566 svn_error_t *
4568  const char *local_abspath,
4569  const apr_hash_t *props,
4570  svn_wc_notify_func2_t notify_func,
4571  void *notify_baton,
4572  apr_pool_t *scratch_pool);
4573 
4574 
4575 /**
4576  * Similar to svn_wc_add_from_disk2(), but always passes NULL for @a
4577  * props.
4578  *
4579  * This is a replacement for svn_wc_add4() case 2a (which see for
4580  * details).
4581 
4582  * @see svn_wc_add4()
4583  *
4584  * @since New in 1.7.
4585  * @deprecated Provided for backward compatibility with the 1.7 API.
4586  */
4588 svn_error_t *
4590  const char *local_abspath,
4591  svn_wc_notify_func2_t notify_func,
4592  void *notify_baton,
4593  apr_pool_t *scratch_pool);
4594 
4595 
4596 /**
4597  * Put @a local_abspath under version control by registering it as addition
4598  * or copy in the database containing its parent. The new node is scheduled
4599  * for addition to the repository below its parent node.
4600  *
4601  * 1) If the node is already versioned, it MUST BE the root of a separate
4602  * working copy from the same repository as the parent WC. The new node
4603  * and anything below it will be scheduled for addition inside the parent
4604  * working copy as a copy of the original location. The separate working
4605  * copy will be integrated by this step. In this case, which is only used
4606  * by code like that of "svn cp URL@rev path" @a copyfrom_url and
4607  * @a copyfrom_rev MUST BE the url and revision of @a local_abspath
4608  * in the separate working copy.
4609  *
4610  * 2a) If the node was not versioned before it will be scheduled as a local
4611  * addition or 2b) if @a copyfrom_url and @a copyfrom_rev are set as a copy
4612  * of that location. In this last case the function doesn't set the pristine
4613  * version (of a file) and/or pristine properties, which callers should
4614  * handle via different APIs. Usually it is easier to call
4615  * svn_wc_add_repos_file4() (### or a possible svn_wc_add_repos_dir()) than
4616  * using this variant.
4617  *
4618  * If @a local_abspath does not exist as file, directory or symlink, return
4619  * #SVN_ERR_WC_PATH_NOT_FOUND.
4620  *
4621  * If @a local_abspath is an unversioned directory, record @a depth on it;
4622  * otherwise, ignore @a depth. (Use #svn_depth_infinity unless you exactly
4623  * know what you are doing, or you may create an unexpected sparse working
4624  * copy)
4625  *
4626  * If @a cancel_func is non-NULL, call it with @a cancel_baton at
4627  * various points during the operation. If it returns an error
4628  * (typically #SVN_ERR_CANCELLED), return that error immediately.
4629  *
4630  * When the @a local_abspath has been added, then @a notify_func will be
4631  * called (if it is not @c NULL) with the @a notify_baton and the path.
4632  *
4633  * @note Case 1 is deprecated. Consider doing a WC-to-WC copy instead.
4634  * @note For case 2a, prefer svn_wc_add_from_disk().
4635  *
4636  * @since New in 1.7.
4637  */
4638 svn_error_t *
4640  const char *local_abspath,
4641  svn_depth_t depth,
4642  const char *copyfrom_url,
4643  svn_revnum_t copyfrom_rev,
4644  svn_cancel_func_t cancel_func,
4645  void *cancel_baton,
4646  svn_wc_notify_func2_t notify_func,
4647  void *notify_baton,
4648  apr_pool_t *scratch_pool);
4649 
4650 /**
4651  * Similar to svn_wc_add4(), but with an access baton
4652  * and relative path instead of a context and absolute path.
4653  * @since New in 1.6.
4654  * @deprecated Provided for backward compatibility with the 1.6 API.
4655  */
4657 svn_error_t *
4658 svn_wc_add3(const char *path,
4659  svn_wc_adm_access_t *parent_access,
4660  svn_depth_t depth,
4661  const char *copyfrom_url,
4662  svn_revnum_t copyfrom_rev,
4663  svn_cancel_func_t cancel_func,
4664  void *cancel_baton,
4665  svn_wc_notify_func2_t notify_func,
4666  void *notify_baton,
4667  apr_pool_t *pool);
4668 
4669 /**
4670  * Similar to svn_wc_add3(), but with the @a depth parameter always
4671  * #svn_depth_infinity.
4672  *
4673  * @since New in 1.2.
4674  * @deprecated Provided for backward compatibility with the 1.5 API.
4675  */
4677 svn_error_t *
4678 svn_wc_add2(const char *path,
4679  svn_wc_adm_access_t *parent_access,
4680  const char *copyfrom_url,
4681  svn_revnum_t copyfrom_rev,
4682  svn_cancel_func_t cancel_func,
4683  void *cancel_baton,
4684  svn_wc_notify_func2_t notify_func,
4685  void *notify_baton,
4686  apr_pool_t *pool);
4687 
4688 /**
4689  * Similar to svn_wc_add2(), but takes an #svn_wc_notify_func_t instead.
4690  *
4691  * @deprecated Provided for backward compatibility with the 1.1 API.
4692  */
4694 svn_error_t *
4695 svn_wc_add(const char *path,
4696  svn_wc_adm_access_t *parent_access,
4697  const char *copyfrom_url,
4698  svn_revnum_t copyfrom_rev,
4699  svn_cancel_func_t cancel_func,
4700  void *cancel_baton,
4701  svn_wc_notify_func_t notify_func,
4702  void *notify_baton,
4703  apr_pool_t *pool);
4704 
4705 /** Add a file to a working copy at @a local_abspath, obtaining the
4706  * text-base's contents from @a new_base_contents, the wc file's
4707  * content from @a new_contents, its unmodified properties from @a
4708  * new_base_props and its actual properties from @a new_props. Use
4709  * @a wc_ctx for accessing the working copy.
4710  *
4711  * The unmodified text and props normally come from the repository
4712  * file represented by the copyfrom args, see below. The new file
4713  * will be marked as copy.
4714  *
4715  * @a new_contents and @a new_props may be NULL, in which case
4716  * the working copy text and props are taken from the base files with
4717  * appropriate translation of the file's content.
4718  *
4719  * @a new_contents must be provided in Normal Form. This is required
4720  * in order to pass both special and non-special files through a stream.
4721  *
4722  * @a wc_ctx must contain a write lock for the parent of @a local_abspath.
4723  *
4724  * If @a copyfrom_url is non-NULL, then @a copyfrom_rev must be a
4725  * valid revision number, and together they are the copyfrom history
4726  * for the new file.
4727  *
4728  * The @a cancel_func and @a cancel_baton are a standard cancellation
4729  * callback, or NULL if no callback is needed. @a notify_func and
4730  * @a notify_baton are a notification callback, and (if not NULL)
4731  * will be notified of the addition of this file.
4732  *
4733  * Use @a scratch_pool for temporary allocations.
4734  *
4735  * ### This function is very redundant with svn_wc_add(). Ideally,
4736  * we'd merge them, so that svn_wc_add() would just take optional
4737  * new_props and optional copyfrom information. That way it could be
4738  * used for both 'svn add somefilesittingonmydisk' and for adding
4739  * files from repositories, with or without copyfrom history.
4740  *
4741  * The problem with this Ideal Plan is that svn_wc_add() also takes
4742  * care of recursive URL-rewriting. There's a whole comment in its
4743  * doc string about how that's really weird, outside its core mission,
4744  * etc, etc. So another part of the Ideal Plan is that that
4745  * functionality of svn_wc_add() would move into a separate function.
4746  *
4747  * @since New in 1.7.
4748  */
4749 svn_error_t *
4751  const char *local_abspath,
4752  svn_stream_t *new_base_contents,
4753  svn_stream_t *new_contents,
4754  apr_hash_t *new_base_props,
4755  apr_hash_t *new_props,
4756  const char *copyfrom_url,
4757  svn_revnum_t copyfrom_rev,
4758  svn_cancel_func_t cancel_func,
4759  void *cancel_baton,
4760  apr_pool_t *scratch_pool);
4761 
4762 /** Similar to svn_wc_add_repos_file4, but uses access batons and a
4763  * relative path instead of a working copy context and absolute path.
4764  *
4765  * ### NOTE: the notification callback/baton is not yet used.
4766  *
4767  * @since New in 1.6.
4768  * @deprecated Provided for compatibility with the 1.6 API.
4769  */
4771 svn_error_t *
4772 svn_wc_add_repos_file3(const char *dst_path,
4773  svn_wc_adm_access_t *adm_access,
4774  svn_stream_t *new_base_contents,
4775  svn_stream_t *new_contents,
4776  apr_hash_t *new_base_props,
4777  apr_hash_t *new_props,
4778  const char *copyfrom_url,
4779  svn_revnum_t copyfrom_rev,
4780  svn_cancel_func_t cancel_func,
4781  void *cancel_baton,
4782  svn_wc_notify_func2_t notify_func,
4783  void *notify_baton,
4784  apr_pool_t *scratch_pool);
4785 
4786 
4787 /** Same as svn_wc_add_repos_file3(), except that it has pathnames rather
4788  * than streams for the text base, and actual text, and has no cancellation.
4789  *
4790  * @since New in 1.4.
4791  * @deprecated Provided for compatibility with the 1.5 API
4792  */
4794 svn_error_t *
4795 svn_wc_add_repos_file2(const char *dst_path,
4796  svn_wc_adm_access_t *adm_access,
4797  const char *new_text_base_path,
4798  const char *new_text_path,
4799  apr_hash_t *new_base_props,
4800  apr_hash_t *new_props,
4801  const char *copyfrom_url,
4802  svn_revnum_t copyfrom_rev,
4803  apr_pool_t *pool);
4804 
4805 /** Same as svn_wc_add_repos_file3(), except that it doesn't have the
4806  * BASE arguments or cancellation.
4807  *
4808  * @deprecated Provided for compatibility with the 1.3 API
4809  */
4811 svn_error_t *
4812 svn_wc_add_repos_file(const char *dst_path,
4813  svn_wc_adm_access_t *adm_access,
4814  const char *new_text_path,
4815  apr_hash_t *new_props,
4816  const char *copyfrom_url,
4817  svn_revnum_t copyfrom_rev,
4818  apr_pool_t *pool);
4819 
4820 
4821 /** Remove @a local_abspath from revision control. @a wc_ctx must
4822  * hold a write lock on the parent of @a local_abspath, or if that is a
4823  * WC root then on @a local_abspath itself.
4824  *
4825  * If @a local_abspath is a file, all its info will be removed from the
4826  * administrative area. If @a local_abspath is a directory, then the
4827  * administrative area will be deleted, along with *all* the administrative
4828  * areas anywhere in the tree below @a adm_access.
4829  *
4830  * Normally, only administrative data is removed. However, if
4831  * @a destroy_wf is TRUE, then all working file(s) and dirs are deleted
4832  * from disk as well. When called with @a destroy_wf, any locally
4833  * modified files will *not* be deleted, and the special error
4834  * #SVN_ERR_WC_LEFT_LOCAL_MOD might be returned. (Callers only need to
4835  * check for this special return value if @a destroy_wf is TRUE.)
4836  *
4837  * If @a instant_error is TRUE, then return
4838  * #SVN_ERR_WC_LEFT_LOCAL_MOD the instant a locally modified file is
4839  * encountered. Otherwise, leave locally modified files in place and
4840  * return the error only after all the recursion is complete.
4841  *
4842  * If @a cancel_func is non-NULL, call it with @a cancel_baton at
4843  * various points during the removal. If it returns an error
4844  * (typically #SVN_ERR_CANCELLED), return that error immediately.
4845  *
4846  * WARNING: This routine is exported for careful, measured use by
4847  * libsvn_client. Do *not* call this routine unless you really
4848  * understand what the heck you're doing.
4849  *
4850  * @since New in 1.7.
4851  */
4852 svn_error_t *
4854  const char *local_abspath,
4855  svn_boolean_t destroy_wf,
4856  svn_boolean_t instant_error,
4857  svn_cancel_func_t cancel_func,
4858  void *cancel_baton,
4859  apr_pool_t *pool);
4860 
4861 /**
4862  * Similar to svn_wc_remove_from_revision_control2() but with a name
4863  * and access baton.
4864  *
4865  * WARNING: This routine was exported for careful, measured use by
4866  * libsvn_client. Do *not* call this routine unless you really
4867  * understand what the heck you're doing.
4868  *
4869  * @deprecated Provided for compatibility with the 1.6 API
4870  */
4872 svn_error_t *
4874  const char *name,
4875  svn_boolean_t destroy_wf,
4876  svn_boolean_t instant_error,
4877  svn_cancel_func_t cancel_func,
4878  void *cancel_baton,
4879  apr_pool_t *pool);
4880 
4881 
4882 /**
4883  * Assuming @a local_abspath is under version control or a tree conflict
4884  * victim and in a state of conflict, then take @a local_abspath *out*
4885  * of this state. If @a resolve_text is TRUE then any text conflict is
4886  * resolved, if @a resolve_tree is TRUE then any tree conflicts are
4887  * resolved. If @a resolve_prop is set to "" all property conflicts are
4888  * resolved, if it is set to any other string value, conflicts on that
4889  * specific property are resolved and when resolve_prop is NULL, no
4890  * property conflicts are resolved.
4891  *
4892  * If @a depth is #svn_depth_empty, act only on @a local_abspath; if
4893  * #svn_depth_files, resolve @a local_abspath and its conflicted file
4894  * children (if any); if #svn_depth_immediates, resolve @a local_abspath
4895  * and all its immediate conflicted children (both files and directories,
4896  * if any); if #svn_depth_infinity, resolve @a local_abspath and every
4897  * conflicted file or directory anywhere beneath it.
4898  *
4899  * If @a conflict_choice is #svn_wc_conflict_choose_base, resolve the
4900  * conflict with the old file contents; if
4901  * #svn_wc_conflict_choose_mine_full, use the original working contents;
4902  * if #svn_wc_conflict_choose_theirs_full, the new contents; and if
4903  * #svn_wc_conflict_choose_merged, don't change the contents at all,
4904  * just remove the conflict status, which is the pre-1.5 behavior.
4905  *
4906  * #svn_wc_conflict_choose_theirs_conflict and
4907  * #svn_wc_conflict_choose_mine_conflict are not legal for binary
4908  * files or properties.
4909  *
4910  * @a wc_ctx is a working copy context, with a write lock, for @a
4911  * local_abspath.
4912  *
4913  * Needless to say, this function doesn't touch conflict markers or
4914  * anything of that sort -- only a human can semantically resolve a
4915  * conflict. Instead, this function simply marks a file as "having
4916  * been resolved", clearing the way for a commit.
4917  *
4918  * The implementation details are opaque, as our "conflicted" criteria
4919  * might change over time. (At the moment, this routine removes the
4920  * three fulltext 'backup' files and any .prej file created in a conflict,
4921  * and modifies @a local_abspath's entry.)
4922  *
4923  * If @a local_abspath is not under version control and not a tree
4924  * conflict, return #SVN_ERR_ENTRY_NOT_FOUND. If @a path isn't in a
4925  * state of conflict to begin with, do nothing, and return #SVN_NO_ERROR.
4926  *
4927  * If @c local_abspath was successfully taken out of a state of conflict,
4928  * report this information to @c notify_func (if non-@c NULL.) If only
4929  * text, only property, or only tree conflict resolution was requested,
4930  * and it was successful, then success gets reported.
4931  *
4932  * Temporary allocations will be performed in @a scratch_pool.
4933  *
4934  * @since New in 1.7.
4935  */
4936 svn_error_t *
4938  const char *local_abspath,
4939  svn_depth_t depth,
4940  svn_boolean_t resolve_text,
4941  const char *resolve_prop,
4942  svn_boolean_t resolve_tree,
4943  svn_wc_conflict_choice_t conflict_choice,
4944  svn_cancel_func_t cancel_func,
4945  void *cancel_baton,
4946  svn_wc_notify_func2_t notify_func,
4947  void *notify_baton,
4948  apr_pool_t *scratch_pool);
4949 
4950 /** Similar to svn_wc_resolved_conflict5, but takes an absolute path
4951  * and an access baton. This version doesn't support resolving a specific
4952  * property.conflict.
4953  *
4954  * @since New in 1.6.
4955  * @deprecated Provided for backward compatibility with the 1.6 API.
4956  */
4958 svn_error_t *
4959 svn_wc_resolved_conflict4(const char *path,
4960  svn_wc_adm_access_t *adm_access,
4961  svn_boolean_t resolve_text,
4962  svn_boolean_t resolve_props,
4963  svn_boolean_t resolve_tree,
4964  svn_depth_t depth,
4965  svn_wc_conflict_choice_t conflict_choice,
4966  svn_wc_notify_func2_t notify_func,
4967  void *notify_baton,
4968  svn_cancel_func_t cancel_func,
4969  void *cancel_baton,
4970  apr_pool_t *pool);
4971 
4972 
4973 /**
4974  * Similar to svn_wc_resolved_conflict4(), but without tree-conflict
4975  * resolution support.
4976  *
4977  * @since New in 1.5.
4978  * @deprecated Provided for backward compatibility with the 1.5 API.
4979  */
4981 svn_error_t *
4982 svn_wc_resolved_conflict3(const char *path,
4983  svn_wc_adm_access_t *adm_access,
4984  svn_boolean_t resolve_text,
4985  svn_boolean_t resolve_props,
4986  svn_depth_t depth,
4987  svn_wc_conflict_choice_t conflict_choice,
4988  svn_wc_notify_func2_t notify_func,
4989  void *notify_baton,
4990  svn_cancel_func_t cancel_func,
4991  void *cancel_baton,
4992  apr_pool_t *pool);
4993 
4994 
4995 /**
4996  * Similar to svn_wc_resolved_conflict3(), but without automatic conflict
4997  * resolution support, and with @a depth set according to @a recurse:
4998  * if @a recurse is TRUE, @a depth is #svn_depth_infinity, else it is
4999  * #svn_depth_files.
5000  *
5001  * @since New in 1.2.
5002  * @deprecated Provided for backward compatibility with the 1.4 API.
5003  */
5005 svn_error_t *
5006 svn_wc_resolved_conflict2(const char *path,
5007  svn_wc_adm_access_t *adm_access,
5008  svn_boolean_t resolve_text,
5009  svn_boolean_t resolve_props,
5010  svn_boolean_t recurse,
5011  svn_wc_notify_func2_t notify_func,
5012  void *notify_baton,
5013  svn_cancel_func_t cancel_func,
5014  void *cancel_baton,
5015  apr_pool_t *pool);
5016 
5017 /**
5018  * Similar to svn_wc_resolved_conflict2(), but takes an
5019  * svn_wc_notify_func_t and doesn't have cancellation support.
5020  *
5021  * @deprecated Provided for backward compatibility with the 1.1 API.
5022  */
5024 svn_error_t *
5025 svn_wc_resolved_conflict(const char *path,
5026  svn_wc_adm_access_t *adm_access,
5027  svn_boolean_t resolve_text,
5028  svn_boolean_t resolve_props,
5029  svn_boolean_t recurse,
5030  svn_wc_notify_func_t notify_func,
5031  void *notify_baton,
5032  apr_pool_t *pool);
5033 
5034 
5035 /* Commits. */
5036 
5037 
5038 /**
5039  * Storage type for queued post-commit data.
5040  *
5041  * @since New in 1.5.
5042  */
5044 
5045 
5046 /**
5047  * Create a queue for use with svn_wc_queue_committed() and
5048  * svn_wc_process_committed_queue().
5049  *
5050  * The returned queue and all further allocations required for queuing
5051  * new items will also be done from @a pool.
5052  *
5053  * @since New in 1.5.
5054  */
5056 svn_wc_committed_queue_create(apr_pool_t *pool);
5057 
5058 
5059 /**
5060  * Queue committed items to be processed later by
5061  * svn_wc_process_committed_queue2().
5062  *
5063  * Record in @a queue that @a local_abspath will need to be bumped
5064  * after a commit succeeds.
5065  *
5066  * If non-NULL, @a wcprop_changes is an array of <tt>svn_prop_t *</tt>
5067  * changes to wc properties; if an #svn_prop_t->value is NULL, then
5068  * that property is deleted.
5069  * ### [JAF] No, a prop whose value is NULL is ignored, not deleted. This
5070  * ### seems to be not a set of changes but rather the new complete set of
5071  * ### props. And it's renamed to 'new_dav_cache' inside; why?
5072  *
5073  * If @a remove_lock is @c TRUE, any entryprops related to a repository
5074  * lock will be removed.
5075  *
5076  * If @a remove_changelist is @c TRUE, any association with a
5077  * changelist will be removed.
5078  *
5079  *
5080  * If @a sha1_checksum is non-NULL, use it to identify the node's pristine
5081  * text.
5082  *
5083  * If @a recurse is TRUE and @a local_abspath is a directory, then bump every
5084  * versioned object at or under @a local_abspath. This is usually done for
5085  * copied trees.
5086  *
5087  * ### In the present implementation, if a recursive directory item is in
5088  * the queue, then any children (at any depth) of that directory that
5089  * are also in the queue as separate items will get:
5090  * 'wcprop_changes' = NULL;
5091  * 'remove_lock' = FALSE;
5092  * 'remove_changelist' from the recursive parent item;
5093  * and any children (at any depth) of that directory that are NOT in
5094  * the queue as separate items will get:
5095  * 'wcprop_changes' = NULL;
5096  * 'remove_lock' = FALSE;
5097  * 'remove_changelist' from the recursive parent item;
5098  *
5099  * @note the @a recurse parameter should be used with extreme care since
5100  * it will bump ALL nodes under the directory, regardless of their
5101  * actual inclusion in the new revision.
5102  *
5103  * All pointer data passed to this function (@a local_abspath,
5104  * @a wcprop_changes and the checksums) should remain valid until the
5105  * queue has been processed by svn_wc_process_committed_queue2().
5106  *
5107  * Temporary allocations will be performed in @a scratch_pool, and persistent
5108  * allocations will use the same pool as @a queue used when it was created.
5109  *
5110  * @since New in 1.7.
5111  */
5112 svn_error_t *
5114  svn_wc_context_t *wc_ctx,
5115  const char *local_abspath,
5116  svn_boolean_t recurse,
5117  const apr_array_header_t *wcprop_changes,
5118  svn_boolean_t remove_lock,
5119  svn_boolean_t remove_changelist,
5120  const svn_checksum_t *sha1_checksum,
5121  apr_pool_t *scratch_pool);
5122 
5123 /** Same as svn_wc_queue_committed3() except @a path doesn't have to be an
5124  * abspath and @a adm_access is unused and a SHA-1 checksum cannot be
5125  * specified.
5126  *
5127  * @since New in 1.6.
5128  *
5129  * @deprecated Provided for backwards compatibility with the 1.6 API.
5130  */
5132 svn_error_t *
5134  const char *path,
5135  svn_wc_adm_access_t *adm_access,
5136  svn_boolean_t recurse,
5137  const apr_array_header_t *wcprop_changes,
5138  svn_boolean_t remove_lock,
5139  svn_boolean_t remove_changelist,
5140  const svn_checksum_t *md5_checksum,
5141  apr_pool_t *scratch_pool);
5142 
5143 
5144 /** Same as svn_wc_queue_committed2() but the @a queue parameter has an
5145  * extra indirection and @a digest is supplied instead of a checksum type.
5146  *
5147  * @note despite the extra indirection, this function does NOT allocate
5148  * the queue for you. svn_wc_committed_queue_create() must be called.
5149  *
5150  * @since New in 1.5
5151  *
5152  * @deprecated Provided for backwards compatibility with 1.5
5153  */
5155 svn_error_t *
5157  const char *path,
5158  svn_wc_adm_access_t *adm_access,
5159  svn_boolean_t recurse,
5160  const apr_array_header_t *wcprop_changes,
5161  svn_boolean_t remove_lock,
5162  svn_boolean_t remove_changelist,
5163  const unsigned char *digest,
5164  apr_pool_t *pool);
5165 
5166 
5167 /**
5168  * Bump all items in @a queue to @a new_revnum after a commit succeeds.
5169  * @a rev_date and @a rev_author are the (server-side) date and author
5170  * of the new revision; one or both may be @c NULL.
5171  *
5172  * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
5173  * if the client wants to cancel the operation.
5174  *
5175  * @since New in 1.7.
5176  */
5177 svn_error_t *
5179  svn_wc_context_t *wc_ctx,
5180  svn_revnum_t new_revnum,
5181  const char *rev_date,
5182  const char *rev_author,
5183  svn_cancel_func_t cancel_func,
5184  void *cancel_baton,
5185  apr_pool_t *scratch_pool);
5186 
5187 /** @see svn_wc_process_committed_queue2()
5188  *
5189  * @since New in 1.5.
5190  * @deprecated Provided for backwards compatibility with the 1.6 API.
5191  */
5193 svn_error_t *
5195  svn_wc_adm_access_t *adm_access,
5196  svn_revnum_t new_revnum,
5197  const char *rev_date,
5198  const char *rev_author,
5199  apr_pool_t *pool);
5200 
5201 
5202 /**
5203  * @note this function has improper expectations around the operation and
5204  * execution of other parts of the Subversion WC library. The resulting
5205  * coupling makes this interface near-impossible to support. Documentation
5206  * has been removed, as a result.
5207  *
5208  * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided
5209  * for backwards compatibility with the 1.5 API.
5210  */
5212 svn_error_t *
5213 svn_wc_process_committed4(const char *path,
5214  svn_wc_adm_access_t *adm_access,
5215  svn_boolean_t recurse,
5216  svn_revnum_t new_revnum,
5217  const char *rev_date,
5218  const char *rev_author,
5219  const apr_array_header_t *wcprop_changes,
5220  svn_boolean_t remove_lock,
5221  svn_boolean_t remove_changelist,
5222  const unsigned char *digest,
5223  apr_pool_t *pool);
5224 
5225 /** @see svn_wc_process_committed4()
5226  *
5227  * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided
5228  * for backwards compatibility with the 1.4 API.
5229  */
5231 svn_error_t *
5232 svn_wc_process_committed3(const char *path,
5233  svn_wc_adm_access_t *adm_access,
5234  svn_boolean_t recurse,
5235  svn_revnum_t new_revnum,
5236  const char *rev_date,
5237  const char *rev_author,
5238  const apr_array_header_t *wcprop_changes,
5239  svn_boolean_t remove_lock,
5240  const unsigned char *digest,
5241  apr_pool_t *pool);
5242 
5243 /** @see svn_wc_process_committed4()
5244  *
5245  * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided
5246  * for backwards compatibility with the 1.3 API.
5247  */
5249 svn_error_t *
5250 svn_wc_process_committed2(const char *path,
5251  svn_wc_adm_access_t *adm_access,
5252  svn_boolean_t recurse,
5253  svn_revnum_t new_revnum,
5254  const char *rev_date,
5255  const char *rev_author,
5256  const apr_array_header_t *wcprop_changes,
5257  svn_boolean_t remove_lock,
5258  apr_pool_t *pool);
5259 
5260 /** @see svn_wc_process_committed4()
5261  *
5262  * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided
5263  * for backward compatibility with the 1.1 API.
5264  */
5266 svn_error_t *
5267 svn_wc_process_committed(const char *path,
5268  svn_wc_adm_access_t *adm_access,
5269  svn_boolean_t recurse,
5270  svn_revnum_t new_revnum,
5271  const char *rev_date,
5272  const char *rev_author,
5273  const apr_array_header_t *wcprop_changes,
5274  apr_pool_t *pool);
5275 
5276 
5277 
5278 
5279 
5280 /**
5281  * Do a depth-first crawl in a working copy, beginning at @a local_abspath,
5282  * using @a wc_ctx for accessing the working copy.
5283  *
5284  * Communicate the `state' of the working copy's revisions and depths
5285  * to @a reporter/@a report_baton. Obviously, if @a local_abspath is a
5286  * file instead of a directory, this depth-first crawl will be a short one.
5287  *
5288  * No locks or logs are created, nor are any animals harmed in the
5289  * process unless @a restore_files is TRUE. No cleanup is necessary.
5290  *
5291  * After all revisions are reported, @a reporter->finish_report() is
5292  * called, which immediately causes the RA layer to update the working
5293  * copy. Thus the return value may very well reflect the result of
5294  * the update!
5295  *
5296  * If @a depth is #svn_depth_empty, then report state only for
5297  * @a path itself. If #svn_depth_files, do the same and include
5298  * immediate file children of @a path. If #svn_depth_immediates,
5299  * then behave as if for #svn_depth_files but also report the
5300  * property states of immediate subdirectories. If @a depth is
5301  * #svn_depth_infinity, then report state fully recursively. All
5302  * descents are only as deep as @a path's own depth permits, of
5303  * course. If @a depth is #svn_depth_unknown, then just use
5304  * #svn_depth_infinity, which in practice means depth of @a path.
5305  *
5306  * Iff @a honor_depth_exclude is TRUE, the crawler will report paths
5307  * whose ambient depth is #svn_depth_exclude as being excluded, and
5308  * thus prevent the server from pushing update data for those paths;
5309  * therefore, don't set this flag if you wish to pull in excluded paths.
5310  * Note that #svn_depth_exclude on the target @a path is never
5311  * honored, even if @a honor_depth_exclude is TRUE, because we need to
5312  * be able to explicitly pull in a target. For example, if this is
5313  * the working copy...
5314  *
5315  * svn co greek_tree_repos wc_dir
5316  * svn up --set-depth exclude wc_dir/A/B/E # now A/B/E is excluded
5317  *
5318  * ...then 'svn up wc_dir/A/B' would report E as excluded (assuming
5319  * @a honor_depth_exclude is TRUE), but 'svn up wc_dir/A/B/E' would
5320  * not, because the latter is trying to explicitly pull in E. In
5321  * general, we never report the update target as excluded.
5322  *
5323  * Iff @a depth_compatibility_trick is TRUE, then set the @c start_empty
5324  * flag on @a reporter->set_path() and @a reporter->link_path() calls
5325  * as necessary to trick a pre-1.5 (i.e., depth-unaware) server into
5326  * sending back all the items the client might need to upgrade a
5327  * working copy from a shallower depth to a deeper one.
5328  *
5329  * If @a restore_files is TRUE, then unexpectedly missing working files
5330  * will be restored from the administrative directory's cache. For each
5331  * file restored, the @a notify_func function will be called with the
5332  * @a notify_baton and the path of the restored file. @a notify_func may
5333  * be @c NULL if this notification is not required. If @a
5334  * use_commit_times is TRUE, then set restored files' timestamps to
5335  * their last-commit-times.
5336  *
5337  * @since New in 1.7.
5338  */
5339 svn_error_t *
5341  const char *local_abspath,
5342  const svn_ra_reporter3_t *reporter,
5343  void *report_baton,
5344  svn_boolean_t restore_files,
5345  svn_depth_t depth,
5346  svn_boolean_t honor_depth_exclude,
5347  svn_boolean_t depth_compatibility_trick,
5348  svn_boolean_t use_commit_times,
5349  svn_cancel_func_t cancel_func,
5350  void *cancel_baton,
5351  svn_wc_notify_func2_t notify_func,
5352  void *notify_baton,
5353  apr_pool_t *scratch_pool);
5354 
5355 /**
5356  * Similar to svn_wc_crawl_revisions5, but with a relative path and
5357  * access baton instead of an absolute path and wc_ctx.
5358  *
5359  * Passes NULL for @a cancel_func and @a cancel_baton.
5360  *
5361  * @since New in 1.6.
5362  * @deprecated Provided for compatibility with the 1.6 API.
5363  */
5365 svn_error_t *
5366 svn_wc_crawl_revisions4(const char *path,
5367  svn_wc_adm_access_t *adm_access,
5368  const svn_ra_reporter3_t *reporter,
5369  void *report_baton,
5370  svn_boolean_t restore_files,
5371  svn_depth_t depth,
5372  svn_boolean_t honor_depth_exclude,
5373  svn_boolean_t depth_compatibility_trick,
5374  svn_boolean_t use_commit_times,
5375  svn_wc_notify_func2_t notify_func,
5376  void *notify_baton,
5377  svn_wc_traversal_info_t *traversal_info,
5378  apr_pool_t *pool);
5379 
5380 
5381 /**
5382  * Similar to svn_wc_crawl_revisions4, but with @a honor_depth_exclude always
5383  * set to false.
5384  *
5385  * @deprecated Provided for compatibility with the 1.5 API.
5386  */
5388 svn_error_t *
5389 svn_wc_crawl_revisions3(const char *path,
5390  svn_wc_adm_access_t *adm_access,
5391  const svn_ra_reporter3_t *reporter,
5392  void *report_baton,
5393  svn_boolean_t restore_files,
5394  svn_depth_t depth,
5395  svn_boolean_t depth_compatibility_trick,
5396  svn_boolean_t use_commit_times,
5397  svn_wc_notify_func2_t notify_func,
5398  void *notify_baton,
5399  svn_wc_traversal_info_t *traversal_info,
5400  apr_pool_t *pool);
5401 
5402 /**
5403  * Similar to svn_wc_crawl_revisions3, but taking svn_ra_reporter2_t
5404  * instead of svn_ra_reporter3_t, and therefore only able to report
5405  * #svn_depth_infinity for depths; and taking @a recurse instead of @a
5406  * depth; and with @a depth_compatibility_trick always false.
5407  *
5408  * @deprecated Provided for compatibility with the 1.4 API.
5409  */
5411 svn_error_t *
5412 svn_wc_crawl_revisions2(const char *path,
5413  svn_wc_adm_access_t *adm_access,
5414  const svn_ra_reporter2_t *reporter,
5415  void *report_baton,
5416  svn_boolean_t restore_files,
5417  svn_boolean_t recurse,
5418  svn_boolean_t use_commit_times,
5419  svn_wc_notify_func2_t notify_func,
5420  void *notify_baton,
5421  svn_wc_traversal_info_t *traversal_info,
5422  apr_pool_t *pool);
5423 
5424 /**
5425  * Similar to svn_wc_crawl_revisions2(), but takes an #svn_wc_notify_func_t
5426  * and a #svn_ra_reporter_t instead.
5427  *
5428  * @deprecated Provided for backward compatibility with the 1.1 API.
5429  */
5431 svn_error_t *
5432 svn_wc_crawl_revisions(const char *path,
5433  svn_wc_adm_access_t *adm_access,
5434  const svn_ra_reporter_t *reporter,
5435  void *report_baton,
5436  svn_boolean_t restore_files,
5437  svn_boolean_t recurse,
5438  svn_boolean_t use_commit_times,
5439  svn_wc_notify_func_t notify_func,
5440  void *notify_baton,
5441  svn_wc_traversal_info_t *traversal_info,
5442  apr_pool_t *pool);
5443 
5444 
5445 /**
5446  * @defgroup svn_wc_roots Working copy roots
5447  * @{
5448  */
5449 
5450 /** If @a is_wcroot is not @c NULL, set @a *is_wcroot to @c TRUE if @a
5451  * local_abspath is the root of the working copy, otherwise to @c FALSE.
5452  *
5453  * If @a is_switched is not @c NULL, set @a *is_switched to @c TRUE if @a
5454  * local_abspath is not the root of the working copy, and switched against its
5455  * parent.
5456  *
5457  * If @a kind is not @c NULL, set @a *kind to the node kind of @a
5458  * local_abspath.
5459  *
5460  * Use @a scratch_pool for any temporary allocations.
5461  *
5462  * @since New in 1.8.
5463  */
5464 svn_error_t *
5465 svn_wc_check_root(svn_boolean_t *is_wcroot,
5466  svn_boolean_t *is_switched,
5467  svn_node_kind_t *kind,
5468  svn_wc_context_t *wc_ctx,
5469  const char *local_abspath,
5470  apr_pool_t *scratch_pool);
5471 
5472 /** Set @a *wc_root to @c TRUE if @a local_abspath represents a "working copy
5473  * root", @c FALSE otherwise. Here, @a local_abspath is a "working copy root"
5474  * if its parent directory is not a WC or if it is switched. Also, a deleted
5475  * tree-conflict victim is considered a "working copy root" because it has no
5476  * URL.
5477  *
5478  * If @a local_abspath is not found, return the error #SVN_ERR_ENTRY_NOT_FOUND.
5479  *
5480  * Use @a scratch_pool for any temporary allocations.
5481  *
5482  * @note For legacy reasons only a directory can be a wc-root. However, this
5483  * function will also set wc_root to @c TRUE for a switched file.
5484  *
5485  * @since New in 1.7.
5486  * @deprecated Provided for backward compatibility with the 1.7 API. Consider
5487  * using svn_wc_check_root() instead.
5488  */
5490 svn_error_t *
5492  svn_wc_context_t *wc_ctx,
5493  const char *local_abspath,
5494  apr_pool_t *scratch_pool);
5495 
5496 
5497 /**
5498  * Similar to svn_wc_is_wc_root2(), but with an access baton and relative
5499  * path.
5500  *
5501  * @note If @a path is '', this function will always return @c TRUE.
5502  *
5503  * @deprecated Provided for backward compatibility with the 1.6 API.
5504  */
5506 svn_error_t *
5508  const char *path,
5509  svn_wc_adm_access_t *adm_access,
5510  apr_pool_t *pool);
5511 
5512 /** @} */
5513 
5514 
5515 /* Updates. */
5516 
5517 /** Conditionally split @a path into an @a anchor and @a target for the
5518  * purpose of updating and committing.
5519  *
5520  * @a anchor is the directory at which the update or commit editor
5521  * should be rooted.
5522  *
5523  * @a target is the actual subject (relative to the @a anchor) of the
5524  * update/commit, or "" if the @a anchor itself is the subject.
5525  *
5526  * Allocate @a anchor and @a target in @a result_pool; @a scratch_pool
5527  * is used for temporary allocations.
5528  *
5529  * @note Even though this API uses a #svn_wc_context_t, it accepts a
5530  * (possibly) relative path and returns a (possibly) relative path in
5531  * @a *anchor. The reason being that the outputs are generally used to
5532  * open access batons, and such opening currently requires relative paths.
5533  * In the long-run, I expect this API to be removed from 1.7, due to the
5534  * remove of access batons, but for the time being, the #svn_wc_context_t
5535  * parameter allows us to avoid opening a duplicate database, just for this
5536  * function.
5537  *
5538  * @since New in 1.7.
5539  */
5540 svn_error_t *
5541 svn_wc_get_actual_target2(const char **anchor,
5542  const char **target,
5543  svn_wc_context_t *wc_ctx,
5544  const char *path,
5545  apr_pool_t *result_pool,
5546  apr_pool_t *scratch_pool);
5547 
5548 
5549 /** Similar to svn_wc_get_actual_target2(), but without the wc context, and
5550  * with a absolute path.
5551  *
5552  * @deprecated Provided for backward compatibility with the 1.6 API.
5553  */
5555 svn_error_t *
5556 svn_wc_get_actual_target(const char *path,
5557  const char **anchor,
5558  const char **target,
5559  apr_pool_t *pool);
5560 
5561 
5562 /**
5563  * @defgroup svn_wc_update_switch Update and switch (update-like functionality)
5564  * @{
5565  */
5566 
5567 /**
5568  * A simple callback type to wrap svn_ra_get_file(); see that
5569  * docstring for more information.
5570  *
5571  * This technique allows libsvn_client to 'wrap' svn_ra_get_file() and
5572  * pass it down into libsvn_wc functions, thus allowing the WC layer
5573  * to legally call the RA function via (blind) callback.
5574  *
5575  * @since New in 1.5
5576  * @deprecated Provided for backward compatibility with the 1.6 API.
5577  */
5578 typedef svn_error_t *(*svn_wc_get_file_t)(void *baton,
5579  const char *path,
5580  svn_revnum_t revision,
5581  svn_stream_t *stream,
5582  svn_revnum_t *fetched_rev,
5583  apr_hash_t **props,
5584  apr_pool_t *pool);
5585 
5586 /**
5587  * A simple callback type to wrap svn_ra_get_dir2() for avoiding issue #3569,
5588  * where a directory is updated to a revision without some of its children
5589  * recorded in the working copy. A future update won't bring these files in
5590  * because the repository assumes they are already there.
5591  *
5592  * We really only need the names of the dirents for a not-present marking,
5593  * but we also store the node-kind if we receive one.
5594  *
5595  * @a *dirents should be set to a hash mapping <tt>const char *</tt> child
5596  * names, to <tt>const svn_dirent_t *</tt> instances.
5597  *
5598  * @since New in 1.7.
5599  */
5600 typedef svn_error_t *(*svn_wc_dirents_func_t)(void *baton,
5601  apr_hash_t **dirents,
5602  const char *repos_root_url,
5603  const char *repos_relpath,
5604  apr_pool_t *result_pool,
5605  apr_pool_t *scratch_pool);
5606 
5607 
5608 /**
5609  * DEPRECATED -- please use APIs from svn_client.h
5610  *
5611  * ---
5612  *
5613  * Set @a *editor and @a *edit_baton to an editor and baton for updating a
5614  * working copy.
5615  *
5616  * @a anchor_abspath is a local working copy directory, with a fully recursive
5617  * write lock in @a wc_ctx, which will be used as the root of our editor.
5618  *
5619  * @a target_basename is the entry in @a anchor_abspath that will actually be
5620  * updated, or the empty string if all of @a anchor_abspath should be updated.
5621  *
5622  * The editor invokes @a notify_func with @a notify_baton as the update
5623  * progresses, if @a notify_func is non-NULL.
5624  *
5625  * If @a cancel_func is non-NULL, the editor will invoke @a cancel_func with
5626  * @a cancel_baton as the update progresses to see if it should continue.
5627  *
5628  * If @a conflict_func is non-NULL, then invoke it with @a
5629  * conflict_baton whenever a conflict is encountered, giving the
5630  * callback a chance to resolve the conflict before the editor takes
5631  * more drastic measures (such as marking a file conflicted, or
5632  * bailing out of the update).
5633  *
5634  * If @a external_func is non-NULL, then invoke it with @a external_baton
5635  * whenever external changes are encountered, giving the callback a chance
5636  * to store the external information for processing.
5637  *
5638  * If @a diff3_cmd is non-NULL, then use it as the diff3 command for
5639  * any merging; otherwise, use the built-in merge code.
5640  *
5641  * @a preserved_exts is an array of filename patterns which, when
5642  * matched against the extensions of versioned files, determine for
5643  * which such files any related generated conflict files will preserve
5644  * the original file's extension as their own. If a file's extension
5645  * does not match any of the patterns in @a preserved_exts (which is
5646  * certainly the case if @a preserved_exts is @c NULL or empty),
5647  * generated conflict files will carry Subversion's custom extensions.
5648  *
5649  * @a target_revision is a pointer to a revision location which, after
5650  * successful completion of the drive of this editor, will be
5651  * populated with the revision to which the working copy was updated.
5652  *
5653  * If @a use_commit_times is TRUE, then all edited/added files will
5654  * have their working timestamp set to the last-committed-time. If
5655  * FALSE, the working files will be touched with the 'now' time.
5656  *
5657  * If @a allow_unver_obstructions is TRUE, then allow unversioned
5658  * obstructions when adding a path.
5659  *
5660  * If @a adds_as_modification is TRUE, a local addition at the same path
5661  * as an incoming addition of the same node kind results in a normal node
5662  * with a possible local modification, instead of a tree conflict.
5663  *
5664  * If @a depth is #svn_depth_infinity, update fully recursively.
5665  * Else if it is #svn_depth_immediates, update the uppermost
5666  * directory, its file entries, and the presence or absence of
5667  * subdirectories (but do not descend into the subdirectories).
5668  * Else if it is #svn_depth_files, update the uppermost directory
5669  * and its immediate file entries, but not subdirectories.
5670  * Else if it is #svn_depth_empty, update exactly the uppermost
5671  * target, and don't touch its entries.
5672  *
5673  * If @a depth_is_sticky is set and @a depth is not
5674  * #svn_depth_unknown, then in addition to updating PATHS, also set
5675  * their sticky ambient depth value to @a depth.
5676  *
5677  * If @a server_performs_filtering is TRUE, assume that the server handles
5678  * the ambient depth filtering, so this doesn't have to be handled in the
5679  * editor.
5680  *
5681  * If @a clean_checkout is TRUE, assume that we are checking out into an
5682  * empty directory, and so bypass a number of conflict checks that are
5683  * unnecessary in this case.
5684  *
5685  * If @a fetch_dirents_func is not NULL, the update editor may call this
5686  * callback, when asked to perform a depth restricted update. It will do this
5687  * before returning the editor to allow using the primary ra session for this.
5688  *
5689  * @since New in 1.7.
5690  * @deprecated Provided for backward compatibility with the 1.7 API.
5691  */
5693 svn_error_t *
5695  void **edit_baton,
5696  svn_revnum_t *target_revision,
5697  svn_wc_context_t *wc_ctx,
5698  const char *anchor_abspath,
5699  const char *target_basename,
5700  svn_boolean_t use_commit_times,
5701  svn_depth_t depth,
5702  svn_boolean_t depth_is_sticky,
5703  svn_boolean_t allow_unver_obstructions,
5704  svn_boolean_t adds_as_modification,
5705  svn_boolean_t server_performs_filtering,
5706  svn_boolean_t clean_checkout,
5707  const char *diff3_cmd,
5708  const apr_array_header_t *preserved_exts,
5709  svn_wc_dirents_func_t fetch_dirents_func,
5710  void *fetch_dirents_baton,
5711  svn_wc_conflict_resolver_func2_t conflict_func,
5712  void *conflict_baton,
5713  svn_wc_external_update_t external_func,
5714  void *external_baton,
5715  svn_cancel_func_t cancel_func,
5716  void *cancel_baton,
5717  svn_wc_notify_func2_t notify_func,
5718  void *notify_baton,
5719  apr_pool_t *result_pool,
5720  apr_pool_t *scratch_pool);
5721 
5722 /** Similar to svn_wc_get_update_editor4, but uses access batons and relative
5723  * path instead of a working copy context-abspath pair and
5724  * svn_wc_traversal_info_t instead of an externals callback. Also,
5725  * @a fetch_func and @a fetch_baton are ignored.
5726  *
5727  * If @a ti is non-NULL, record traversal info in @a ti, for use by
5728  * post-traversal accessors such as svn_wc_edited_externals().
5729  *
5730  * All locks, both those in @a anchor and newly acquired ones, will be
5731  * released when the editor driver calls @c close_edit.
5732  *
5733  * Always sets @a adds_as_modification to TRUE, @a server_performs_filtering
5734  * and @a clean_checkout to FALSE.
5735  *
5736  * Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a
5737  * svn_wc_conflict_resolver_func2_t.
5738  *
5739  * This function assumes that @a diff3_cmd is path encoded. Later versions
5740  * assume utf-8.
5741  *
5742  * Always passes a null dirent function.
5743  *
5744  * @since New in 1.5.
5745  * @deprecated Provided for backward compatibility with the 1.6 API.
5746  */
5748 svn_error_t *
5749 svn_wc_get_update_editor3(svn_revnum_t *target_revision,
5750  svn_wc_adm_access_t *anchor,
5751  const char *target,
5752  svn_boolean_t use_commit_times,
5753  svn_depth_t depth,
5754  svn_boolean_t depth_is_sticky,
5755  svn_boolean_t allow_unver_obstructions,
5756  svn_wc_notify_func2_t notify_func,
5757  void *notify_baton,
5758  svn_cancel_func_t cancel_func,
5759  void *cancel_baton,
5760  svn_wc_conflict_resolver_func_t conflict_func,
5761  void *conflict_baton,
5762  svn_wc_get_file_t fetch_func,
5763  void *fetch_baton,
5764  const char *diff3_cmd,
5765  const apr_array_header_t *preserved_exts,
5766  const svn_delta_editor_t **editor,
5767  void **edit_baton,
5769  apr_pool_t *pool);
5770 
5771 
5772 /**
5773  * Similar to svn_wc_get_update_editor3() but with the @a
5774  * allow_unver_obstructions parameter always set to FALSE, @a
5775  * conflict_func and baton set to NULL, @a fetch_func and baton set to
5776  * NULL, @a preserved_exts set to NULL, @a depth_is_sticky set to
5777  * FALSE, and @a depth set according to @a recurse: if @a recurse is
5778  * TRUE, pass #svn_depth_infinity, if FALSE, pass #svn_depth_files.
5779  *
5780  * @deprecated Provided for backward compatibility with the 1.4 API.
5781  */
5783 svn_error_t *
5784 svn_wc_get_update_editor2(svn_revnum_t *target_revision,
5785  svn_wc_adm_access_t *anchor,
5786  const char *target,
5787  svn_boolean_t use_commit_times,
5788  svn_boolean_t recurse,
5789  svn_wc_notify_func2_t notify_func,
5790  void *notify_baton,
5791  svn_cancel_func_t cancel_func,
5792  void *cancel_baton,
5793  const char *diff3_cmd,
5794  const svn_delta_editor_t **editor,
5795  void **edit_baton,
5797  apr_pool_t *pool);
5798 
5799 /**
5800  * Similar to svn_wc_get_update_editor2(), but takes an svn_wc_notify_func_t
5801  * instead.
5802  *
5803  * @deprecated Provided for backward compatibility with the 1.1 API.
5804  */
5806 svn_error_t *
5807 svn_wc_get_update_editor(svn_revnum_t *target_revision,
5808  svn_wc_adm_access_t *anchor,
5809  const char *target,
5810  svn_boolean_t use_commit_times,
5811  svn_boolean_t recurse,
5812  svn_wc_notify_func_t notify_func,
5813  void *notify_baton,
5814  svn_cancel_func_t cancel_func,
5815  void *cancel_baton,
5816  const char *diff3_cmd,
5817  const svn_delta_editor_t **editor,
5818  void **edit_baton,
5820  apr_pool_t *pool);
5821 
5822 /**
5823  * DEPRECATED -- please use APIs from svn_client.h
5824  *
5825  * ---
5826  *
5827  * A variant of svn_wc_get_update_editor4().
5828  *
5829  * Set @a *editor and @a *edit_baton to an editor and baton for "switching"
5830  * a working copy to a new @a switch_url. (Right now, this URL must be
5831  * within the same repository that the working copy already comes
5832  * from.) @a switch_url must not be @c NULL.
5833  *
5834  * All other parameters behave as for svn_wc_get_update_editor4().
5835  *
5836  * @since New in 1.7.
5837  * @deprecated Provided for backward compatibility with the 1.7 API.
5838  */
5840 svn_error_t *
5842  void **edit_baton,
5843  svn_revnum_t *target_revision,
5844  svn_wc_context_t *wc_ctx,
5845  const char *anchor_abspath,
5846  const char *target_basename,
5847  const char *switch_url,
5848  svn_boolean_t use_commit_times,
5849  svn_depth_t depth,
5850  svn_boolean_t depth_is_sticky,
5851  svn_boolean_t allow_unver_obstructions,
5852  svn_boolean_t server_performs_filtering,
5853  const char *diff3_cmd,
5854  const apr_array_header_t *preserved_exts,
5855  svn_wc_dirents_func_t fetch_dirents_func,
5856  void *fetch_dirents_baton,
5857  svn_wc_conflict_resolver_func2_t conflict_func,
5858  void *conflict_baton,
5859  svn_wc_external_update_t external_func,
5860  void *external_baton,
5861  svn_cancel_func_t cancel_func,
5862  void *cancel_baton,
5863  svn_wc_notify_func2_t notify_func,
5864  void *notify_baton,
5865  apr_pool_t *result_pool,
5866  apr_pool_t *scratch_pool);
5867 
5868 /** Similar to svn_wc_get_switch_editor4, but uses access batons and relative
5869  * path instead of a working copy context and svn_wc_traversal_info_t instead
5870  * of an externals callback.
5871  *
5872  * If @a ti is non-NULL, record traversal info in @a ti, for use by
5873  * post-traversal accessors such as svn_wc_edited_externals().
5874  *
5875  * All locks, both those in @a anchor and newly acquired ones, will be
5876  * released when the editor driver calls @c close_edit.
5877  *
5878  * Always sets @a server_performs_filtering to FALSE.
5879  *
5880  * Uses a svn_wc_conflict_resolver_func_t conflict resolver instead of a
5881  * svn_wc_conflict_resolver_func2_t.
5882  *
5883  * This function assumes that @a diff3_cmd is path encoded. Later versions
5884  * assume utf-8.
5885  *
5886  * @since New in 1.5.
5887  * @deprecated Provided for backward compatibility with the 1.6 API.
5888  */
5890 svn_error_t *
5891 svn_wc_get_switch_editor3(svn_revnum_t *target_revision,
5892  svn_wc_adm_access_t *anchor,
5893  const char *target,
5894  const char *switch_url,
5895  svn_boolean_t use_commit_times,
5896  svn_depth_t depth,
5897  svn_boolean_t depth_is_sticky,
5898  svn_boolean_t allow_unver_obstructions,
5899  svn_wc_notify_func2_t notify_func,
5900  void *notify_baton,
5901  svn_cancel_func_t cancel_func,
5902  void *cancel_baton,
5903  svn_wc_conflict_resolver_func_t conflict_func,
5904  void *conflict_baton,
5905  const char *diff3_cmd,
5906  const apr_array_header_t *preserved_exts,
5907  const svn_delta_editor_t **editor,
5908  void **edit_baton,
5910  apr_pool_t *pool);
5911 
5912 /**
5913  * Similar to svn_wc_get_switch_editor3() but with the
5914  * @a allow_unver_obstructions parameter always set to FALSE,
5915  * @a preserved_exts set to NULL, @a conflict_func and baton set to NULL,
5916  * @a depth_is_sticky set to FALSE, and @a depth set according to @a
5917  * recurse: if @a recurse is TRUE, pass #svn_depth_infinity, if
5918  * FALSE, pass #svn_depth_files.
5919  *
5920  * @deprecated Provided for backward compatibility with the 1.4 API.
5921  */
5923 svn_error_t *
5924 svn_wc_get_switch_editor2(svn_revnum_t *target_revision,
5925  svn_wc_adm_access_t *anchor,
5926  const char *target,
5927  const char *switch_url,
5928  svn_boolean_t use_commit_times,
5929  svn_boolean_t recurse,
5930  svn_wc_notify_func2_t notify_func,
5931  void *notify_baton,
5932  svn_cancel_func_t cancel_func,
5933  void *cancel_baton,
5934  const char *diff3_cmd,
5935  const svn_delta_editor_t **editor,
5936  void **edit_baton,
5938  apr_pool_t *pool);
5939 
5940 /**
5941  * Similar to svn_wc_get_switch_editor2(), but takes an
5942  * #svn_wc_notify_func_t instead.
5943  *
5944  * @deprecated Provided for backward compatibility with the 1.1 API.
5945  */
5947 svn_error_t *
5948 svn_wc_get_switch_editor(svn_revnum_t *target_revision,
5949  svn_wc_adm_access_t *anchor,
5950  const char *target,
5951  const char *switch_url,
5952  svn_boolean_t use_commit_times,
5953  svn_boolean_t recurse,
5954  svn_wc_notify_func_t notify_func,
5955  void *notify_baton,
5956  svn_cancel_func_t cancel_func,
5957  void *cancel_baton,
5958  const char *diff3_cmd,
5959  const