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  * @a defining_directory is the path or URL of the directory on which
911  * the svn:externals property corresponding to @a desc is set.
912  * @a defining_directory is only used when constructing error strings.
913  *
914  * @since New in 1.5.
915  */
916 svn_error_t *
917 svn_wc_parse_externals_description3(apr_array_header_t **externals_p,
918  const char *defining_directory,
919  const char *desc,
920  svn_boolean_t canonicalize_url,
921  apr_pool_t *pool);
922 
923 /**
924  * Similar to svn_wc_parse_externals_description3() with @a
925  * canonicalize_url set to @c TRUE, but returns an array of
926  * #svn_wc_external_item_t * objects instead of
927  * #svn_wc_external_item2_t * objects
928  *
929  * @since New in 1.1.
930  *
931  * @deprecated Provided for backward compatibility with the 1.4 API.
932  */
934 svn_error_t *
935 svn_wc_parse_externals_description2(apr_array_header_t **externals_p,
936  const char *parent_directory,
937  const char *desc,
938  apr_pool_t *pool);
939 
940 /**
941  * Similar to svn_wc_parse_externals_description2(), but returns the
942  * parsed externals in a hash instead of an array. This function
943  * should not be used, as storing the externals in a hash causes their
944  * order of evaluation to be not easily identifiable.
945  *
946  * @deprecated Provided for backward compatibility with the 1.0 API.
947  */
949 svn_error_t *
950 svn_wc_parse_externals_description(apr_hash_t **externals_p,
951  const char *parent_directory,
952  const char *desc,
953  apr_pool_t *pool);
954 
955 /** @} */
956 
957 
958 /**
959  * @defgroup svn_wc_notifications Notification callback handling
960  * @{
961  *
962  * In many cases, the WC library will scan a working copy and make
963  * changes. The caller usually wants to know when each of these changes
964  * has been made, so that it can display some kind of notification to
965  * the user.
966  *
967  * These notifications have a standard callback function type, which
968  * takes the path of the file that was affected, and a caller-
969  * supplied baton.
970  *
971  * @note The callback is a 'void' return -- this is a simple
972  * reporting mechanism, rather than an opportunity for the caller to
973  * alter the operation of the WC library.
974  *
975  * @note Some of the actions are used across several
976  * different Subversion commands. For example, the update actions are
977  * also used for checkouts, switches, and merges.
978  */
979 
980 /** The type of action occurring. */
982 {
983  /** Adding a path to revision control. */
985 
986  /** Copying a versioned path. */
988 
989  /** Deleting a versioned path. */
991 
992  /** Restoring a missing path from the pristine text-base. */
994 
995  /** Reverting a modified path. */
997 
998  /** A revert operation has failed. */
1000 
1001  /** Resolving a conflict. */
1003 
1004  /** Skipping a path. */
1006 
1007  /** Got a delete in an update. */
1009 
1010  /** Got an add in an update. */
1012 
1013  /** Got any other action in an update. */
1015 
1016  /** The last notification in an update (including updates of externals). */
1018 
1019  /** Updating an external module. */
1021 
1022  /** The last notification in a status (including status on externals). */
1024 
1025  /** Running status on an external module. */
1027 
1028  /** Committing a modification. */
1030 
1031  /** Committing an addition. */
1033 
1034  /** Committing a deletion. */
1036 
1037  /** Committing a replacement. */
1039 
1040  /** Transmitting post-fix text-delta data for a file. */
1042 
1043  /** Processed a single revision's blame. */
1045 
1046  /** Locking a path. @since New in 1.2. */
1048 
1049  /** Unlocking a path. @since New in 1.2. */
1051 
1052  /** Failed to lock a path. @since New in 1.2. */
1054 
1055  /** Failed to unlock a path. @since New in 1.2. */
1057 
1058  /** Tried adding a path that already exists. @since New in 1.5. */
1060 
1061  /** Changelist name set. @since New in 1.5. */
1063 
1064  /** Changelist name cleared. @since New in 1.5. */
1066 
1067  /** Warn user that a path has moved from one changelist to another.
1068  @since New in 1.5.
1069  @deprecated As of 1.7, separate clear and set notifications are sent. */
1071 
1072  /** A merge operation (to path) has begun. See #svn_wc_notify_t.merge_range.
1073  @since New in 1.5. */
1075 
1076  /** A merge operation (to path) from a foreign repository has begun.
1077  See #svn_wc_notify_t.merge_range. @since New in 1.5. */
1079 
1080  /** Replace notification. @since New in 1.5. */
1082 
1083  /** Property added. @since New in 1.6. */
1085 
1086  /** Property updated. @since New in 1.6. */
1088 
1089  /** Property deleted. @since New in 1.6. */
1091 
1092  /** Nonexistent property deleted. @since New in 1.6. */
1094 
1095  /** Revprop set. @since New in 1.6. */
1097 
1098  /** Revprop deleted. @since New in 1.6. */
1100 
1101  /** The last notification in a merge. @since New in 1.6. */
1103 
1104  /** The path is a tree-conflict victim of the intended action (*not*
1105  * a persistent tree-conflict from an earlier operation, but *this*
1106  * operation caused the tree-conflict). @since New in 1.6. */
1108 
1109  /** The path is a subdirectory referenced in an externals definition
1110  * which is unable to be operated on. @since New in 1.6. */
1112 
1113  /** Starting an update operation. @since New in 1.7. */
1115 
1116  /** An update tried to add a file or directory at a path where
1117  * a separate working copy was found. @since New in 1.7. */
1119 
1120  /** An explicit update tried to update a file or directory that
1121  * doesn't live in the repository and can't be brought in.
1122  * @since New in 1.7. */
1124 
1125  /** An update tried to update a file or directory to which access could
1126  * not be obtained. @since New in 1.7. */
1128 
1129  /** An update operation removed an external working copy.
1130  * @since New in 1.7. */
1132 
1133  /** A node below an existing node was added during update.
1134  * @since New in 1.7. */
1136 
1137  /** A node below an existing node was updated during update.
1138  * @since New in 1.7. */
1140 
1141  /** A node below an existing node was deleted during update.
1142  * @since New in 1.7. */
1144 
1145  /** The mergeinfo on path was updated. @since New in 1.7. */
1147 
1148  /** A working copy directory was upgraded to the latest format.
1149  * @since New in 1.7. */
1151 
1152  /** Mergeinfo describing a merge was recorded.
1153  * @since New in 1.7. */
1155 
1156  /** Mergeinfo was removed due to elision.
1157  * @since New in 1.7. */
1159 
1160  /** A file in the working copy was patched.
1161  * @since New in 1.7. */
1163 
1164  /** A hunk from a patch was applied.
1165  * @since New in 1.7. */
1167 
1168  /** A hunk from a patch was rejected.
1169  * @since New in 1.7. */
1171 
1172  /** A hunk from a patch was found to already be applied.
1173  * @since New in 1.7. */
1175 
1176  /** Committing a non-overwriting copy (path is the target of the
1177  * copy, not the source).
1178  * @since New in 1.7. */
1180 
1181  /** Committing an overwriting (replace) copy (path is the target of
1182  * the copy, not the source).
1183  * @since New in 1.7. */
1185 
1186  /** The server has instructed the client to follow a URL
1187  * redirection.
1188  * @since New in 1.7. */
1190 
1191  /** The operation was attempted on a path which doesn't exist.
1192  * @since New in 1.7. */
1194 
1195  /** Removing a path by excluding it.
1196  * @since New in 1.7. */
1198 
1199  /** Operation failed because the node remains in conflict
1200  * @since New in 1.7. */
1202 
1203  /** Operation failed because an added node is missing
1204  * @since New in 1.7. */
1206 
1207  /** Operation failed because a node is out of date
1208  * @since New in 1.7. */
1210 
1211  /** Operation failed because an added parent is not selected
1212  * @since New in 1.7. */
1214 
1215  /** Operation failed because a node is locked by another user and/or
1216  * working copy. @since New in 1.7. */
1218 
1219  /** Operation failed because the operation was forbidden by the server.
1220  * @since New in 1.7. */
1222 
1223  /** The operation skipped the path because it was conflicted.
1224  * @since New in 1.7. */
1226 
1227  /** Just the lock on a file was removed during update.
1228  * @since New in 1.8. */
1230 
1231  /** Operation failed because a node is obstructed.
1232  * @since New in 1.8. */
1234 
1235  /** Conflict resolver is starting.
1236  * This can be used by clients to detect when to display conflict summary
1237  * information, for example.
1238  * @since New in 1.8. */
1240 
1241  /** Conflict resolver is done.
1242  * This can be used by clients to detect when to display conflict summary
1243  * information, for example.
1244  * @since New in 1.8. */
1246 
1247  /** The current operation left local changes of something that was deleted
1248  * The changes are available on (and below) the notified path
1249  * @since New in 1.8. */
1251 
1252  /** A copy from a foreign repository has started
1253  * @since New in 1.8. */
1255 
1256  /** A move in the working copy has been broken, i.e. degraded into a
1257  * copy + delete. The notified path is the move source (the deleted path).
1258  * ### TODO: Provide path to move destination as well?
1259  * @since New in 1.8. */
1261 
1262  /** Running cleanup on an external module.
1263  * @since New in 1.9. */
1265 
1266  /** The operation failed because the operation (E.g. commit) is only valid
1267  * if the operation includes this path.
1268  * @since New in 1.9. */
1270 
1271  /** Running info on an external module.
1272  * @since New in 1.9. */
1274 
1275  /** Finalizing commit.
1276  * @since New in 1.9. */
1279 
1280 
1281 /** The type of notification that is occurring. */
1283 {
1284  svn_wc_notify_state_inapplicable = 0,
1285 
1286  /** Notifier doesn't know or isn't saying. */
1288 
1289  /** The state did not change. */
1291 
1292  /** The item wasn't present. */
1294 
1295  /** An unversioned item obstructed work. */
1297 
1298  /** Pristine state was modified. */
1300 
1301  /** Modified state had mods merged in. */
1303 
1304  /** Modified state got conflicting mods. */
1306 
1307  /** The source to copy the file from is missing. */
1309 
1311 
1312 /**
1313  * What happened to a lock during an operation.
1314  *
1315  * @since New in 1.2.
1316  */
1318 {
1319  svn_wc_notify_lock_state_inapplicable = 0,
1320 
1321  svn_wc_notify_lock_state_unknown,
1322 
1323  /** The lock wasn't changed. */
1325 
1326  /** The item was locked. */
1328 
1329  /** The item was unlocked. */
1331 
1333 
1334 /**
1335  * Structure used in the #svn_wc_notify_func2_t function.
1336  *
1337  * @c kind, @c content_state, @c prop_state and @c lock_state are from
1338  * after @c action, not before.
1339  *
1340  * @note If @c action is #svn_wc_notify_update_completed, then @c path has
1341  * already been installed, so it is legitimate for an implementation of
1342  * #svn_wc_notify_func2_t to examine @c path in the working copy.
1343  *
1344  * @note The purpose of the @c kind, @c mime_type, @c content_state, and
1345  * @c prop_state fields is to provide "for free" information that an
1346  * implementation is likely to want, and which it would otherwise be
1347  * forced to deduce via expensive operations such as reading entries
1348  * and properties. However, if the caller does not have this
1349  * information, it will simply pass the corresponding `*_unknown'
1350  * values, and it is up to the implementation how to handle that
1351  * (i.e., whether to attempt deduction, or just to punt and
1352  * give a less informative notification).
1353  *
1354  * @note Callers of notification functions should use svn_wc_create_notify()
1355  * or svn_wc_create_notify_url() to create structures of this type to allow
1356  * for extensibility.
1357  *
1358  * @since New in 1.2.
1359  */
1360 typedef struct svn_wc_notify_t {
1361 
1362  /** Path, either absolute or relative to the current working directory
1363  * (i.e., not relative to an anchor). @c path is "." or another valid path
1364  * value for compatibility reasons when the real target is a url that
1365  * is available in @c url. */
1366  const char *path;
1367 
1368  /** Action that describes what happened to #svn_wc_notify_t.path. */
1370 
1371  /** Node kind of @c path. */
1373 
1374  /** If non-NULL, indicates the mime-type of @c path.
1375  * It is always @c NULL for directories. */
1376  const char *mime_type;
1377 
1378  /** Points to the lock structure received from the repository when
1379  * @c action is #svn_wc_notify_locked. For other actions, it is
1380  * @c NULL. */
1382 
1383  /** Points to an error describing the reason for the failure when @c
1384  * action is one of the following: #svn_wc_notify_failed_lock,
1385  * #svn_wc_notify_failed_unlock, #svn_wc_notify_failed_external.
1386  * Is @c NULL otherwise. */
1388 
1389  /** The type of notification that is occurring about node content. */
1391 
1392  /** The type of notification that is occurring about node properties. */
1394 
1395  /** Reflects the addition or removal of a lock token in the working copy. */
1397 
1398  /** When @c action is #svn_wc_notify_update_completed, target revision
1399  * of the update, or #SVN_INVALID_REVNUM if not available; when @c
1400  * action is #svn_wc_notify_blame_revision, processed revision; Since
1401  * Subversion 1.7 when action is #svn_wc_notify_update_update or
1402  * #svn_wc_notify_update_add, the target revision.
1403  * In all other cases, it is #SVN_INVALID_REVNUM.
1404  */
1406 
1407  /** If @c action pertains to a changelist, this is the changelist name.
1408  * In all other cases, it is @c NULL. @since New in 1.5 */
1409  const char *changelist_name;
1410 
1411  /** When @c action is #svn_wc_notify_merge_begin or
1412  * #svn_wc_notify_foreign_merge_begin or
1413  * #svn_wc_notify_merge_record_info_begin, and both the
1414  * left and right sides of the merge are from the same URL. In all
1415  * other cases, it is @c NULL. @since New in 1.5 */
1417 
1418  /** Similar to @c path, but if non-NULL the notification is about a url.
1419  * @since New in 1.6 */
1420  const char *url;
1421 
1422  /** If non-NULL, specifies an absolute path prefix that can be subtracted
1423  * from the start of the absolute path in @c path or @c url. Its purpose
1424  * is to allow notification to remove a common prefix from all the paths
1425  * displayed for an operation. @since New in 1.6 */
1426  const char *path_prefix;
1427 
1428  /** If @c action relates to properties, specifies the name of the property.
1429  * @since New in 1.6 */
1430  const char *prop_name;
1431 
1432  /** If @c action is #svn_wc_notify_blame_revision, contains a list of
1433  * revision properties for the specified revision
1434  * @since New in 1.6 */
1435  apr_hash_t *rev_props;
1436 
1437  /** If @c action is #svn_wc_notify_update_update or
1438  * #svn_wc_notify_update_add, contains the revision before the update.
1439  * In all other cases, it is #SVN_INVALID_REVNUM.
1440  * @since New in 1.7 */
1442 
1443  /** These fields are used by svn patch to identify the
1444  * hunk the notification is for. They are line-based
1445  * offsets and lengths parsed from the unidiff hunk header.
1446  * @since New in 1.7. */
1447  /* @{ */
1449  svn_linenum_t hunk_original_length;
1450  svn_linenum_t hunk_modified_start;
1451  svn_linenum_t hunk_modified_length;
1452  /* @} */
1453 
1454  /** The line at which a hunk was matched (and applied).
1455  * @since New in 1.7. */
1457 
1458  /** The fuzz factor the hunk was applied with.
1459  * @since New in 1.7 */
1461 
1462  /* NOTE: Add new fields at the end to preserve binary compatibility.
1463  Also, if you add fields here, you have to update svn_wc_create_notify
1464  and svn_wc_dup_notify. */
1465 } svn_wc_notify_t;
1466 
1467 /**
1468  * Allocate an #svn_wc_notify_t structure in @a pool, initialize and return
1469  * it.
1470  *
1471  * Set the @c path field of the created struct to @a path, and @c action to
1472  * @a action. Set all other fields to their @c _unknown, @c NULL or
1473  * invalid value, respectively. Make only a shallow copy of the pointer
1474  * @a path.
1475  *
1476  * @since New in 1.2.
1477  */
1479 svn_wc_create_notify(const char *path,
1480  svn_wc_notify_action_t action,
1481  apr_pool_t *pool);
1482 
1483 /**
1484  * Allocate an #svn_wc_notify_t structure in @a pool, initialize and return
1485  * it.
1486  *
1487  * Set the @c url field of the created struct to @a url, @c path to "." and @c
1488  * action to @a action. Set all other fields to their @c _unknown, @c NULL or
1489  * invalid value, respectively. Make only a shallow copy of the pointer
1490  * @a url.
1491  *
1492  * @since New in 1.6.
1493  */
1495 svn_wc_create_notify_url(const char *url,
1496  svn_wc_notify_action_t action,
1497  apr_pool_t *pool);
1498 
1499 /**
1500  * Return a deep copy of @a notify, allocated in @a pool.
1501  *
1502  * @since New in 1.2.
1503  */
1505 svn_wc_dup_notify(const svn_wc_notify_t *notify,
1506  apr_pool_t *pool);
1507 
1508 /**
1509  * Notify the world that @a notify->action has happened to @a notify->path.
1510  *
1511  * Recommendation: callers of #svn_wc_notify_func2_t should avoid
1512  * invoking it multiple times on the same path within a given
1513  * operation, and implementations should not bother checking for such
1514  * duplicate calls. For example, in an update, the caller should not
1515  * invoke the notify func on receiving a prop change and then again
1516  * on receiving a text change. Instead, wait until all changes have
1517  * been received, and then invoke the notify func once (from within
1518  * an #svn_delta_editor_t's close_file(), for example), passing
1519  * the appropriate @a notify->content_state and @a notify->prop_state flags.
1520  *
1521  * @since New in 1.2.
1522  */
1523 typedef void (*svn_wc_notify_func2_t)(void *baton,
1524  const svn_wc_notify_t *notify,
1525  apr_pool_t *pool);
1526 
1527 /**
1528  * Similar to #svn_wc_notify_func2_t, but takes the information as arguments
1529  * instead of struct fields.
1530  *
1531  * @deprecated Provided for backward compatibility with the 1.1 API.
1532  */
1533 typedef void (*svn_wc_notify_func_t)(void *baton,
1534  const char *path,
1535  svn_wc_notify_action_t action,
1536  svn_node_kind_t kind,
1537  const char *mime_type,
1538  svn_wc_notify_state_t content_state,
1539  svn_wc_notify_state_t prop_state,
1540  svn_revnum_t revision);
1541 
1542 /** @} */
1543 
1544 
1545 /**
1546  * Interactive conflict handling
1547  *
1548  * @defgroup svn_wc_conflict Conflict callback functionality
1549  * @{
1550  *
1551  * This API gives a Subversion client application the opportunity to
1552  * define a callback that allows the user to resolve conflicts
1553  * interactively during updates and merges.
1554  *
1555  * If a conflict is discovered, libsvn_wc invokes the callback with an
1556  * #svn_wc_conflict_description_t. This structure describes the
1557  * path in conflict, whether it's a text or property conflict, and may
1558  * also present up to three files that can be used to resolve the
1559  * conflict (perhaps by launching an editor or 3rd-party merging
1560  * tool). The structure also provides a possible fourth file (@c
1561  * merged_file) which, if not NULL, represents libsvn_wc's attempt to
1562  * contextually merge the first three files. (Note that libsvn_wc
1563  * will not attempt to merge a file that it believes is binary, and it
1564  * will only attempt to merge property values it believes to be a
1565  * series of multi-line text.)
1566  *
1567  * When the callback is finished interacting with the user, it
1568  * responds by returning a #svn_wc_conflict_result_t. This
1569  * structure indicates whether the user wants to postpone the conflict
1570  * for later (allowing libsvn_wc to mark the path "conflicted" as
1571  * usual), or whether the user wants libsvn_wc to use one of the four
1572  * files as the "final" state for resolving the conflict immediately.
1573  *
1574  * Note that the callback is at liberty (and encouraged) to merge the
1575  * three files itself. If it does so, it signals this to libsvn_wc by
1576  * returning a choice of #svn_wc_conflict_choose_merged. To return
1577  * the 'final' merged file to libsvn_wc, the callback has the option of
1578  * either:
1579  *
1580  * - editing the original @c merged_file in-place
1581  *
1582  * or, if libsvn_wc never supplied a merged_file in the
1583  * description structure (i.e. passed NULL for that field),
1584  *
1585  * - return the merged file in the #svn_wc_conflict_result_t.
1586  *
1587  */
1588 
1589 /** The type of action being attempted on an object.
1590  *
1591  * @since New in 1.5.
1592  */
1594 {
1595  svn_wc_conflict_action_edit, /**< attempting to change text or props */
1596  svn_wc_conflict_action_add, /**< attempting to add object */
1597  svn_wc_conflict_action_delete, /**< attempting to delete object */
1598  svn_wc_conflict_action_replace /**< attempting to replace object,
1599  @since New in 1.7 */
1601 
1602 
1603 /** The pre-existing condition which is causing a state of conflict.
1604  *
1605  * @since New in 1.5.
1606  */
1608 {
1609  /** Local edits are already present */
1611  /** Another object is in the way */
1613  /** Object is already schedule-delete */
1615  /** Object is unknown or missing */
1617  /** Object is unversioned */
1619  /** Object is already added or schedule-add. @since New in 1.6. */
1621  /** Object is already replaced. @since New in 1.7. */
1623  /** Object is moved away. @since New in 1.8. */
1625  /** Object is moved here. @since New in 1.8. */
1627 
1629 
1630 
1631 /** The type of conflict being described by an
1632  * #svn_wc_conflict_description2_t (see below).
1633  *
1634  * @since New in 1.5.
1635  */
1637 {
1638  /** textual conflict (on a file) */
1640  /** property conflict (on a file or dir) */
1642  /** tree conflict (on a dir) @since New in 1.6. */
1645 
1646 
1647 /** The user operation that exposed a conflict.
1648  *
1649  * @since New in 1.6.
1650  */
1652 {
1653  svn_wc_operation_none = 0,
1654  svn_wc_operation_update,
1655  svn_wc_operation_switch,
1656  svn_wc_operation_merge
1657 
1659 
1660 
1661 /** Info about one of the conflicting versions of a node. Each field may
1662  * have its respective null/invalid/unknown value if the corresponding
1663  * information is not relevant or not available.
1664  *
1665  * @todo Consider making some or all of the info mandatory, to reduce
1666  * complexity.
1667  *
1668  * @note Fields may be added to the end of this structure in future
1669  * versions. Therefore, to preserve binary compatibility, users
1670  * should not directly allocate structures of this type.
1671  *
1672  * @see svn_wc_conflict_version_create()
1673  * @see svn_wc_conflict_version_dup()
1674  *
1675  * @since New in 1.6.
1676 */
1678 {
1679  /** @name Where to find this node version in a repository */
1680  /**@{*/
1681 
1682  /** URL of repository root */
1683  const char *repos_url;
1684 
1685  /** revision at which to look up path_in_repos */
1687 
1688  /** path within repos; must not start with '/' */
1689  /* ### should have been called repos_relpath, but we can't change this. */
1690  const char *path_in_repos;
1691  /** @} */
1692 
1693  /** The node kind. Can be any kind, including 'none' or 'unknown'. */
1695 
1696  /** UUID of the repository (or NULL if unknown.)
1697  * @since New in 1.8. */
1698  const char *repos_uuid;
1699 
1700  /* @todo Add metadata about a local copy of the node, if and when
1701  * we store one. */
1702 
1703  /* Remember to update svn_wc_conflict_version_create() and
1704  * svn_wc_conflict_version_dup() in case you add fields to this struct. */
1706 
1707 /**
1708  * Allocate an #svn_wc_conflict_version_t structure in @a pool,
1709  * initialize to contain a conflict origin, and return it.
1710  *
1711  * Set the @c repos_url field of the created struct to @a repos_root_url,
1712  * the @c path_in_repos field to @a repos_relpath, the @c peg_rev field to
1713  * @a revision and the @c node_kind to @a kind. Make only shallow
1714  * copies of the pointer arguments.
1715  *
1716  * @a repos_root_url, @a repos_relpath and @a revision must be valid,
1717  * non-null values. @a repos_uuid should be a valid UUID, but can be
1718  * NULL if unknown. @a kind can be any kind, even 'none' or 'unknown'.
1719  *
1720  * @since New in 1.8.
1721  */
1723 svn_wc_conflict_version_create2(const char *repos_root_url,
1724  const char *repos_uuid,
1725  const char *repos_relpath,
1726  svn_revnum_t revision,
1727  svn_node_kind_t kind,
1728  apr_pool_t *result_pool);
1729 
1730 /** Similar to svn_wc_conflict_version_create2(), but doesn't set all
1731  * required values.
1732  *
1733  * @since New in 1.6.
1734  * @deprecated Provided for backward compatibility with the 1.7 API.
1735  */
1738 svn_wc_conflict_version_create(const char *repos_url,
1739  const char *path_in_repos,
1740  svn_revnum_t peg_rev,
1741  svn_node_kind_t node_kind,
1742  apr_pool_t *pool);
1743 
1744 /** Return a duplicate of @a version, allocated in @a pool.
1745  * No part of the new version will be shared with @a version.
1746  *
1747  * @since New in 1.6.
1748  */
1751  apr_pool_t *pool);
1752 
1753 
1754 /** A struct that describes a conflict that has occurred in the
1755  * working copy.
1756  *
1757  * The conflict described by this structure is one of:
1758  * - a conflict on the content of the file node @a local_abspath
1759  * - a conflict on the property @a property_name of @a local_abspath
1760  * - a tree conflict, of which @a local_abspath is the victim
1761  * Be aware that the victim of a tree conflict can be a non-existent node.
1762  * The three kinds of conflict are distinguished by @a kind.
1763  *
1764  * @note Fields may be added to the end of this structure in future
1765  * versions. Therefore, to preserve binary compatibility, users
1766  * should not directly allocate structures of this type but should use
1767  * svn_wc_conflict_description_create_text2() or
1768  * svn_wc_conflict_description_create_prop2() or
1769  * svn_wc_conflict_description_create_tree2() instead.
1770  *
1771  * @since New in 1.7.
1772  */
1774 {
1775  /** The path that is in conflict (for a tree conflict, it is the victim) */
1776  const char *local_abspath;
1777 
1778  /** The node type of the local node involved in this conflict.
1779  * For a tree conflict, this is the node kind of the tree conflict victim.
1780  * For the left/right node kinds of the incoming conflicting change see
1781  * src_left_version->node_kind and src_right_version->node_kind. */
1783 
1784  /** What sort of conflict are we describing? */
1786 
1787  /** The name of the property whose conflict is being described.
1788  * (Only if @a kind is 'property'; else undefined.) */
1789  const char *property_name;
1790 
1791  /** Whether svn thinks ('my' version of) @c path is a 'binary' file.
1792  * (Only if @c kind is 'text', else undefined.) */
1794 
1795  /** The svn:mime-type property of ('my' version of) @c path, if available,
1796  * else NULL.
1797  * (Only if @c kind is 'text', else undefined.) */
1798  const char *mime_type;
1799 
1800  /** The incoming action being attempted on the conflicted node or property.
1801  * When @c kind is 'text', this action must be 'edit', but generally it can
1802  * be any kind of possible change. */
1804 
1805  /** The local change or state of the target node or property, relative
1806  * to its merge-left source, that conflicts with the incoming action.
1807  * When @c kind is 'text', this must be 'edited', but generally it can
1808  * be any kind of possible change.
1809  * Note that 'local' does not always refer to a working copy. A change
1810  * can be local to the target branch of a merge operation, for example,
1811  * and is not necessarily visible in a working copy of the target branch
1812  * at any given revision. */
1814 
1815  /** If this is text-conflict and involves the merging of two files
1816  * descended from a common ancestor, here are the paths of up to
1817  * four fulltext files that can be used to interactively resolve the
1818  * conflict.
1819  *
1820  * @a base_abspath, @a their_abspath and @a my_abspath are absolute
1821  * paths.
1822  *
1823  * ### Is @a merged_file relative to some directory, or absolute?
1824  *
1825  * All four files will be in repository-normal form -- LF
1826  * line endings and contracted keywords. (If any of these files are
1827  * not available, they default to NULL.)
1828  *
1829  * On the other hand, if this is a property-conflict, then these
1830  * paths represent temporary files that contain the three different
1831  * property-values in conflict. The fourth path (@c merged_file)
1832  * may or may not be NULL; if set, it represents libsvn_wc's
1833  * attempt to merge the property values together. (Remember that
1834  * property values are technically binary values, and thus can't
1835  * always be merged.)
1836  */
1837  const char *base_abspath; /* common ancestor of the two files being merged */
1838 
1839  /** their version of the file */
1840  /* ### BH: For properties this field contains the reference to
1841  the property rejection (.prej) file */
1842  const char *their_abspath;
1843 
1844  /** my locally-edited version of the file */
1845  const char *my_abspath;
1846 
1847  /** merged version; may contain conflict markers
1848  * ### For property conflicts, this contains 'their_abspath'. */
1849  const char *merged_file;
1850 
1851  /** The operation that exposed the conflict.
1852  * Used only for tree conflicts.
1853  */
1855 
1856  /** Info on the "merge-left source" or "older" version of incoming change. */
1858 
1859  /** Info on the "merge-right source" or "their" version of incoming change. */
1861 
1862  /** For property conflicts, the absolute path to the .prej file.
1863  * @since New in 1.9. */
1864  const char *prop_reject_abspath;
1865 
1866  /** For property conflicts, the local base value of the property, i.e. the
1867  * value of the property as of the BASE revision of the working copy.
1868  * For conflicts created during update/switch this contains the
1869  * post-update/switch property value. The pre-update/switch value can
1870  * be found in prop_value_incoming_old.
1871  * Only set if available, so might be @c NULL.
1872  * @since New in 1.9. */
1874 
1875  /** For property conflicts, the local working value of the property,
1876  * i.e. the value of the property in the working copy, possibly with
1877  * local modiciations.
1878  * Only set if available, so might be @c NULL.
1879  * @since New in 1.9. */
1881 
1882  /** For property conflicts, the incoming old value of the property,
1883  * i.e. the value the property had at @c src_left_version.
1884  * Only set if available, so might be @c NULL.
1885  * @since New in 1.9 */
1887 
1888  /** For property conflicts, the incoming new value of the property,
1889  * i.e. the value the property had at @c src_right_version.
1890  * Only set if available, so might be @c NULL.
1891  * @since New in 1.9 */
1893 
1894 /* NOTE: Add new fields at the end to preserve binary compatibility.
1895  Also, if you add fields here, you have to update
1896  svn_wc_conflict_description2_dup and perhaps
1897  svn_wc_conflict_description_create_text2,
1898  svn_wc_conflict_description_create_prop2, and
1899  svn_wc_conflict_description_create_tree2. */
1901 
1902 
1903 /** Similar to #svn_wc_conflict_description2_t, but with relative paths and
1904  * adm_access batons. Passed to #svn_wc_conflict_resolver_func_t.
1905  *
1906  * @since New in 1.5.
1907  * @deprecated Provided for backward compatibility with the 1.6 API.
1908  */
1910 {
1911  /** The path that is in conflict (for a tree conflict, it is the victim) */
1912  const char *path;
1913 
1914  /** The local node type of the path being operated on (for a tree conflict,
1915  * this specifies the local node kind, which may be (and typically is)
1916  * different than the left and right kind) */
1918 
1919  /** What sort of conflict are we describing? */
1921 
1922  /** The name of the property whose conflict is being described.
1923  * (Only if @a kind is 'property'; else undefined.) */
1924  const char *property_name;
1925 
1926  /** Whether svn thinks ('my' version of) @c path is a 'binary' file.
1927  * (Only if @c kind is 'text', else undefined.) */
1929 
1930  /** The svn:mime-type property of ('my' version of) @c path, if available,
1931  * else NULL.
1932  * (Only if @c kind is 'text', else undefined.) */
1933  const char *mime_type;
1934 
1935  /** If not NULL, an open working copy access baton to either the
1936  * path itself (if @c path is a directory), or to the parent
1937  * directory (if @c path is a file.)
1938  * For a tree conflict, this will always be an access baton
1939  * to the parent directory of the path, even if the path is
1940  * a directory. */
1942 
1943  /** The action being attempted on the conflicted node or property.
1944  * (When @c kind is 'text', this action must be 'edit'.) */
1946 
1947  /** The state of the target node or property, relative to its merge-left
1948  * source, that is the reason for the conflict.
1949  * (When @c kind is 'text', this reason must be 'edited'.) */
1951 
1952  /** If this is text-conflict and involves the merging of two files
1953  * descended from a common ancestor, here are the paths of up to
1954  * four fulltext files that can be used to interactively resolve the
1955  * conflict. All four files will be in repository-normal form -- LF
1956  * line endings and contracted keywords. (If any of these files are
1957  * not available, they default to NULL.)
1958  *
1959  * On the other hand, if this is a property-conflict, then these
1960  * paths represent temporary files that contain the three different
1961  * property-values in conflict. The fourth path (@c merged_file)
1962  * may or may not be NULL; if set, it represents libsvn_wc's
1963  * attempt to merge the property values together. (Remember that
1964  * property values are technically binary values, and thus can't
1965  * always be merged.)
1966  */
1967  const char *base_file; /* common ancestor of the two files being merged */
1968 
1969  /** their version of the file */
1970  const char *their_file;
1971 
1972  /** my locally-edited version of the file */
1973  const char *my_file;
1974 
1975  /** merged version; may contain conflict markers */
1976  const char *merged_file;
1977 
1978  /** The operation that exposed the conflict.
1979  * Used only for tree conflicts.
1980  *
1981  * @since New in 1.6.
1982  */
1984 
1985  /** Info on the "merge-left source" or "older" version of incoming change.
1986  * @since New in 1.6. */
1988 
1989  /** Info on the "merge-right source" or "their" version of incoming change.
1990  * @since New in 1.6. */
1992 
1994 
1995 /**
1996  * Allocate an #svn_wc_conflict_description2_t structure in @a result_pool,
1997  * initialize to represent a text conflict, and return it.
1998  *
1999  * Set the @c local_abspath field of the created struct to @a local_abspath
2000  * (which must be an absolute path), the @c kind field to
2001  * #svn_wc_conflict_kind_text, the @c node_kind to #svn_node_file,
2002  * the @c action to #svn_wc_conflict_action_edit, and the @c reason to
2003  * #svn_wc_conflict_reason_edited.
2004  *
2005  * @note It is the caller's responsibility to set the other required fields
2006  * (such as the four file names and @c mime_type and @c is_binary).
2007  *
2008  * @since New in 1.7.
2009  */
2011 svn_wc_conflict_description_create_text2(const char *local_abspath,
2012  apr_pool_t *result_pool);
2013 
2014 
2015 /** Similar to svn_wc_conflict_description_create_text2(), but returns
2016  * a #svn_wc_conflict_description_t *.
2017  *
2018  * @since New in 1.6.
2019  * @deprecated Provided for backward compatibility with the 1.6 API.
2020  */
2024  svn_wc_adm_access_t *adm_access,
2025  apr_pool_t *pool);
2026 
2027 /**
2028  * Allocate an #svn_wc_conflict_description2_t structure in @a result_pool,
2029  * initialize to represent a property conflict, and return it.
2030  *
2031  * Set the @c local_abspath field of the created struct to @a local_abspath
2032  * (which must be an absolute path), the @c kind field
2033  * to #svn_wc_conflict_kind_property, the @c node_kind to @a node_kind, and
2034  * the @c property_name to @a property_name.
2035  *
2036  * @note: It is the caller's responsibility to set the other required fields
2037  * (such as the four file names and @c action and @c reason).
2038  *
2039  * @since New in 1.7.
2040  */
2042 svn_wc_conflict_description_create_prop2(const char *local_abspath,
2043  svn_node_kind_t node_kind,
2044  const char *property_name,
2045  apr_pool_t *result_pool);
2046 
2047 /** Similar to svn_wc_conflict_descriptor_create_prop(), but returns
2048  * a #svn_wc_conflict_description_t *.
2049  *
2050  * @since New in 1.6.
2051  * @deprecated Provided for backward compatibility with the 1.6 API.
2052  */
2056  svn_wc_adm_access_t *adm_access,
2057  svn_node_kind_t node_kind,
2058  const char *property_name,
2059  apr_pool_t *pool);
2060 
2061 /**
2062  * Allocate an #svn_wc_conflict_description2_t structure in @a pool,
2063  * initialize to represent a tree conflict, and return it.
2064  *
2065  * Set the @c local_abspath field of the created struct to @a local_abspath
2066  * (which must be an absolute path), the @c kind field to
2067  * #svn_wc_conflict_kind_tree, the @c node_kind to @a node_kind,
2068  * the @c operation to @a operation, the @c src_left_version field to
2069  * @a src_left_version, and the @c src_right_version field to
2070  * @a src_right_version.
2071  *
2072  * @note: It is the caller's responsibility to set the other required fields
2073  * (such as the four file names and @c action and @c reason).
2074  *
2075  * @since New in 1.7.
2076  */
2079  const char *local_abspath,
2080  svn_node_kind_t node_kind,
2081  svn_wc_operation_t operation,
2082  const svn_wc_conflict_version_t *src_left_version,
2083  const svn_wc_conflict_version_t *src_right_version,
2084  apr_pool_t *result_pool);
2085 
2086 
2087 /** Similar to svn_wc_conflict_description_create_tree(), but returns
2088  * a #svn_wc_conflict_description_t *.
2089  *
2090  * @since New in 1.6.
2091  * @deprecated Provided for backward compatibility with the 1.6 API.
2092  */
2096  const char *path,
2097  svn_wc_adm_access_t *adm_access,
2098  svn_node_kind_t node_kind,
2099  svn_wc_operation_t operation,
2100  /* non-const */ svn_wc_conflict_version_t *src_left_version,
2101  /* non-const */ svn_wc_conflict_version_t *src_right_version,
2102  apr_pool_t *pool);
2103 
2104 
2105 /** Return a duplicate of @a conflict, allocated in @a result_pool.
2106  * A deep copy of all members will be made.
2107  *
2108  * @since New in 1.9.
2109  */
2112  const svn_wc_conflict_description2_t *conflict,
2113  apr_pool_t *result_pool);
2114 
2115 
2116 /** Like svn_wc_conflict_description2_dup(), but is improperly named
2117  * as a private function when it is intended to be a public API.
2118  *
2119  * @since New in 1.7.
2120  * @deprecated Provided for backward compatibility with the 1.8 API.
2121  */
2125  const svn_wc_conflict_description2_t *conflict,
2126  apr_pool_t *result_pool);
2127 
2128 
2129 /** The way in which the conflict callback chooses a course of action.
2130  *
2131  * @since New in 1.5.
2132  */
2134 {
2135  /** Undefined; for private use only.
2136  This value must never be returned in svn_wc_conflict_result_t,
2137  but a separate value, unequal to all other pre-defined values may
2138  be useful in conflict resolver implementations to signal that no
2139  choice is made yet.
2140  * @since New in 1.9
2141  */
2143 
2144  /** Don't resolve the conflict now. Let libsvn_wc mark the path
2145  'conflicted', so user can run 'svn resolved' later. */
2147 
2148  /** If there were files to choose from, select one as a way of
2149  resolving the conflict here and now. libsvn_wc will then do the
2150  work of "installing" the chosen file.
2151  */
2152  svn_wc_conflict_choose_base, /**< original version */
2153  svn_wc_conflict_choose_theirs_full, /**< incoming version */
2155  svn_wc_conflict_choose_theirs_conflict, /**< incoming (for conflicted hunks) */
2156  svn_wc_conflict_choose_mine_conflict, /**< own (for conflicted hunks) */
2157  svn_wc_conflict_choose_merged, /**< merged version */
2158 
2159  /** @since New in 1.8. */
2161 
2163 
2164 
2165 /** The final result returned by #svn_wc_conflict_resolver_func_t.
2166  *
2167  * @note Fields may be added to the end of this structure in future
2168  * versions. Therefore, to preserve binary compatibility, users
2169  * should not directly allocate structures of this type. Instead,
2170  * construct this structure using svn_wc_create_conflict_result()
2171  * below.
2172  *
2173  * @since New in 1.5.
2174  */
2176 {
2177  /** A choice to either delay the conflict resolution or select a
2178  particular file to resolve the conflict. */
2180 
2181  /** If not NULL, this is a path to a file which contains the client's
2182  (or more likely, the user's) merging of the three values in
2183  conflict. libsvn_wc accepts this file if (and only if) @c choice
2184  is set to #svn_wc_conflict_choose_merged.*/
2185  const char *merged_file;
2186 
2187  /** If true, save a backup copy of merged_file (or the original
2188  merged_file from the conflict description, if merged_file is
2189  NULL) in the user's working copy. */
2191 
2192  /** If not NULL, this is the new merged property, used when choosing
2193  * #svn_wc_conflict_choose_merged. This value is prefered over using
2194  * merged_file.
2195  *
2196  * @since New in 1.9.
2197  */
2199 
2201 
2202 
2203 /**
2204  * Allocate an #svn_wc_conflict_result_t structure in @a pool,
2205  * initialize and return it.
2206  *
2207  * Set the @c choice field of the structure to @a choice, @c merged_file
2208  * to @a merged_file, and @c save_merged to false. Make only a shallow
2209  * copy of the pointer argument @a merged_file. @a merged_file may be
2210  * NULL if setting merged_file is not needed.
2211  *
2212  * @since New in 1.5.
2213  */
2216  const char *merged_file,
2217  apr_pool_t *pool);
2218 
2219 
2220 /** A callback used in merge, update and switch for resolving conflicts
2221  * during the application of a tree delta to a working copy.
2222  *
2223  * @a description describes the exact nature of the conflict, and
2224  * provides information to help resolve it. @a baton is a closure
2225  * object; it should be provided by the implementation, and passed by
2226  * the caller. When finished, the callback signals its resolution by
2227  * returning a structure in @a *result, which should be allocated in
2228  * @a result_pool. (See #svn_wc_conflict_result_t.) @a scratch_pool
2229  * should be used for any temporary allocations.
2230  *
2231  * The values #svn_wc_conflict_choose_mine_conflict and
2232  * #svn_wc_conflict_choose_theirs_conflict are not legal for conflicts
2233  * in binary files or binary properties.
2234  *
2235  * Implementations of this callback are free to present the conflict
2236  * using any user interface. This may include simple contextual
2237  * conflicts in a file's text or properties, or more complex
2238  * 'tree'-based conflicts related to obstructed additions, deletions,
2239  * and edits. The callback implementation is free to decide which
2240  * sorts of conflicts to handle; it's also free to decide which types
2241  * of conflicts are automatically resolvable and which require user
2242  * interaction.
2243  *
2244  * @since New in 1.7.
2245  */
2246 typedef svn_error_t *(*svn_wc_conflict_resolver_func2_t)(
2247  svn_wc_conflict_result_t **result,
2248  const svn_wc_conflict_description2_t *description,
2249  void *baton,
2250  apr_pool_t *result_pool,
2251  apr_pool_t *scratch_pool);
2252 
2253 
2254 /** Similar to #svn_wc_conflict_resolver_func2_t, but using
2255  * #svn_wc_conflict_description_t instead of
2256  * #svn_wc_conflict_description2_t
2257  *
2258  * @since New in 1.5.
2259  * @deprecated Provided for backward compatibility with the 1.6 API.
2260  */
2261 typedef svn_error_t *(*svn_wc_conflict_resolver_func_t)(
2262  svn_wc_conflict_result_t **result,
2263  const svn_wc_conflict_description_t *description,
2264  void *baton,
2265  apr_pool_t *pool);
2266 
2267 /** @} */
2268 
2269 
2270 
2271 /**
2272  * A callback vtable invoked by our diff-editors, as they receive diffs
2273  * from the server. 'svn diff' and 'svn merge' implement their own versions
2274  * of this vtable.
2275  *
2276  * Common parameters:
2277  *
2278  * If @a state is non-NULL, set @a *state to the state of the item
2279  * after the operation has been performed. (In practice, this is only
2280  * useful with merge, not diff; diff callbacks will probably set
2281  * @a *state to #svn_wc_notify_state_unknown, since they do not change
2282  * the state and therefore do not bother to know the state after the
2283  * operation.) By default, @a state refers to the item's content
2284  * state. Functions concerned with property state have separate
2285  * @a contentstate and @a propstate arguments.
2286  *
2287  * If @a tree_conflicted is non-NULL, set @a *tree_conflicted to true if
2288  * this operation caused a tree conflict, else to false. (Like with @a
2289  * state, this is only useful with merge, not diff; diff callbacks
2290  * should set this to false.)
2291  *
2292  * @since New in 1.7.
2293  */
2295 {
2296  /**
2297  * This function is called before @a file_changed to allow callbacks to
2298  * skip the most expensive processing of retrieving the file data.
2299  *
2300  */
2301  svn_error_t *(*file_opened)(svn_boolean_t *tree_conflicted,
2302  svn_boolean_t *skip,
2303  const char *path,
2304  svn_revnum_t rev,
2305  void *diff_baton,
2306  apr_pool_t *scratch_pool);
2307 
2308  /**
2309  * A file @a path has changed. If @a tmpfile2 is non-NULL, the
2310  * contents have changed and those changes can be seen by comparing
2311  * @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2 of
2312  * the file, respectively.
2313  *
2314  * If known, the @c svn:mime-type value of each file is passed into
2315  * @a mimetype1 and @a mimetype2; either or both of the values can
2316  * be NULL. The implementor can use this information to decide if
2317  * (or how) to generate differences.
2318  *
2319  * @a propchanges is an array of (#svn_prop_t) structures. If it contains
2320  * any elements, the original list of properties is provided in
2321  * @a originalprops, which is a hash of #svn_string_t values, keyed on the
2322  * property name.
2323  *
2324  */
2325  svn_error_t *(*file_changed)(svn_wc_notify_state_t *contentstate,
2326  svn_wc_notify_state_t *propstate,
2327  svn_boolean_t *tree_conflicted,
2328  const char *path,
2329  const char *tmpfile1,
2330  const char *tmpfile2,
2331  svn_revnum_t rev1,
2332  svn_revnum_t rev2,
2333  const char *mimetype1,
2334  const char *mimetype2,
2335  const apr_array_header_t *propchanges,
2336  apr_hash_t *originalprops,
2337  void *diff_baton,
2338  apr_pool_t *scratch_pool);
2339 
2340  /**
2341  * A file @a path was added. The contents can be seen by comparing
2342  * @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2
2343  * of the file, respectively. (If either file is empty, the rev
2344  * will be 0.)
2345  *
2346  * If known, the @c svn:mime-type value of each file is passed into
2347  * @a mimetype1 and @a mimetype2; either or both of the values can
2348  * be NULL. The implementor can use this information to decide if
2349  * (or how) to generate differences.
2350  *
2351  * @a propchanges is an array of (#svn_prop_t) structures. If it contains
2352  * any elements, the original list of properties is provided in
2353  * @a originalprops, which is a hash of #svn_string_t values, keyed on the
2354  * property name.
2355  * If @a copyfrom_path is non-@c NULL, this add has history (i.e., is a
2356  * copy), and the origin of the copy may be recorded as
2357  * @a copyfrom_path under @a copyfrom_revision.
2358  */
2359  svn_error_t *(*file_added)(svn_wc_notify_state_t *contentstate,
2360  svn_wc_notify_state_t *propstate,
2361  svn_boolean_t *tree_conflicted,
2362  const char *path,
2363  const char *tmpfile1,
2364  const char *tmpfile2,
2365  svn_revnum_t rev1,
2366  svn_revnum_t rev2,
2367  const char *mimetype1,
2368  const char *mimetype2,
2369  const char *copyfrom_path,
2370  svn_revnum_t copyfrom_revision,
2371  const apr_array_header_t *propchanges,
2372  apr_hash_t *originalprops,
2373  void *diff_baton,
2374  apr_pool_t *scratch_pool);
2375 
2376  /**
2377  * A file @a path was deleted. The [loss of] contents can be seen by
2378  * comparing @a tmpfile1 and @a tmpfile2. @a originalprops provides
2379  * the properties of the file.
2380  * ### Some existing callers include WC "entry props" in @a originalprops.
2381  *
2382  * If known, the @c svn:mime-type value of each file is passed into
2383  * @a mimetype1 and @a mimetype2; either or both of the values can
2384  * be NULL. The implementor can use this information to decide if
2385  * (or how) to generate differences.
2386  */
2387  svn_error_t *(*file_deleted)(svn_wc_notify_state_t *state,
2388  svn_boolean_t *tree_conflicted,
2389  const char *path,
2390  const char *tmpfile1,
2391  const char *tmpfile2,
2392  const char *mimetype1,
2393  const char *mimetype2,
2394  apr_hash_t *originalprops,
2395  void *diff_baton,
2396  apr_pool_t *scratch_pool);
2397 
2398  /**
2399  * A directory @a path was deleted.
2400  */
2401  svn_error_t *(*dir_deleted)(svn_wc_notify_state_t *state,
2402  svn_boolean_t *tree_conflicted,
2403  const char *path,
2404  void *diff_baton,
2405  apr_pool_t *scratch_pool);
2406  /**
2407  * A directory @a path has been opened. @a rev is the revision that the
2408  * directory came from.
2409  *
2410  * This function is called for any existing directory @a path before any
2411  * of the callbacks are called for a child of @a path.
2412  *
2413  * If the callback returns @c TRUE in @a *skip_children, children
2414  * of this directory will be skipped.
2415  */
2416  svn_error_t *(*dir_opened)(svn_boolean_t *tree_conflicted,
2417  svn_boolean_t *skip,
2418  svn_boolean_t *skip_children,
2419  const char *path,
2420  svn_revnum_t rev,
2421  void *diff_baton,
2422  apr_pool_t *scratch_pool);
2423 
2424  /**
2425  * A directory @a path was added. @a rev is the revision that the
2426  * directory came from.
2427  *
2428  * This function is called for any new directory @a path before any
2429  * of the callbacks are called for a child of @a path.
2430  *
2431  * If @a copyfrom_path is non-@c NULL, this add has history (i.e., is a
2432  * copy), and the origin of the copy may be recorded as
2433  * @a copyfrom_path under @a copyfrom_revision.
2434  */
2435  svn_error_t *(*dir_added)(svn_wc_notify_state_t *state,
2436  svn_boolean_t *tree_conflicted,
2437  svn_boolean_t *skip,
2438  svn_boolean_t *skip_children,
2439  const char *path,
2440  svn_revnum_t rev,
2441  const char *copyfrom_path,
2442  svn_revnum_t copyfrom_revision,
2443  void *diff_baton,
2444  apr_pool_t *scratch_pool);
2445 
2446  /**
2447  * A list of property changes (@a propchanges) was applied to the
2448  * directory @a path.
2449  *
2450  * The array is a list of (#svn_prop_t) structures.
2451  *
2452  * @a dir_was_added is set to #TRUE if the directory was added, and
2453  * to #FALSE if the directory pre-existed.
2454  */
2455  svn_error_t *(*dir_props_changed)(svn_wc_notify_state_t *propstate,
2456  svn_boolean_t *tree_conflicted,
2457  const char *path,
2458  svn_boolean_t dir_was_added,
2459  const apr_array_header_t *propchanges,
2460  apr_hash_t *original_props,
2461  void *diff_baton,
2462  apr_pool_t *scratch_pool);
2463 
2464  /**
2465  * A directory @a path which has been opened with @a dir_opened or @a
2466  * dir_added has been closed.
2467  *
2468  * @a dir_was_added is set to #TRUE if the directory was added, and
2469  * to #FALSE if the directory pre-existed.
2470  */
2471  svn_error_t *(*dir_closed)(svn_wc_notify_state_t *contentstate,
2472  svn_wc_notify_state_t *propstate,
2473  svn_boolean_t *tree_conflicted,
2474  const char *path,
2475  svn_boolean_t dir_was_added,
2476  void *diff_baton,
2477  apr_pool_t *scratch_pool);
2478 
2480 
2481 
2482 /**
2483  * Similar to #svn_wc_diff_callbacks4_t, but without @a copyfrom_path and
2484  * @a copyfrom_revision arguments to @c file_added and @c dir_added functions.
2485  *
2486  * @since New in 1.6.
2487  * @deprecated Provided for backward compatibility with the 1.6 API.
2488  */
2490 {
2491  /** The same as #svn_wc_diff_callbacks4_t.file_changed. */
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  svn_boolean_t *tree_conflicted,
2496  const char *path,
2497  const char *tmpfile1,
2498  const char *tmpfile2,
2499  svn_revnum_t rev1,
2500  svn_revnum_t rev2,
2501  const char *mimetype1,
2502  const char *mimetype2,
2503  const apr_array_header_t *propchanges,
2504  apr_hash_t *originalprops,
2505  void *diff_baton);
2506 
2507  /** Similar to #svn_wc_diff_callbacks4_t.file_added but without
2508  * @a copyfrom_path and @a copyfrom_revision arguments. */
2509  svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access,
2510  svn_wc_notify_state_t *contentstate,
2511  svn_wc_notify_state_t *propstate,
2512  svn_boolean_t *tree_conflicted,
2513  const char *path,
2514  const char *tmpfile1,
2515  const char *tmpfile2,
2516  svn_revnum_t rev1,
2517  svn_revnum_t rev2,
2518  const char *mimetype1,
2519  const char *mimetype2,
2520  const apr_array_header_t *propchanges,
2521  apr_hash_t *originalprops,
2522  void *diff_baton);
2523 
2524  /** The same as #svn_wc_diff_callbacks4_t.file_deleted. */
2525  svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access,
2526  svn_wc_notify_state_t *state,
2527  svn_boolean_t *tree_conflicted,
2528  const char *path,
2529  const char *tmpfile1,
2530  const char *tmpfile2,
2531  const char *mimetype1,
2532  const char *mimetype2,
2533  apr_hash_t *originalprops,
2534  void *diff_baton);
2535 
2536  /** Similar to #svn_wc_diff_callbacks4_t.dir_added but without
2537  * @a copyfrom_path and @a copyfrom_revision arguments. */
2538  svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access,
2539  svn_wc_notify_state_t *state,
2540  svn_boolean_t *tree_conflicted,
2541  const char *path,
2542  svn_revnum_t rev,
2543  void *diff_baton);
2544 
2545  /** The same as #svn_wc_diff_callbacks4_t.dir_deleted. */
2546  svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access,
2547  svn_wc_notify_state_t *state,
2548  svn_boolean_t *tree_conflicted,
2549  const char *path,
2550  void *diff_baton);
2551 
2552  /** The same as #svn_wc_diff_callbacks4_t.dir_props_changed. */
2553  svn_error_t *(*dir_props_changed)(svn_wc_adm_access_t *adm_access,
2554  svn_wc_notify_state_t *propstate,
2555  svn_boolean_t *tree_conflicted,
2556  const char *path,
2557  const apr_array_header_t *propchanges,
2558  apr_hash_t *original_props,
2559  void *diff_baton);
2560 
2561  /** The same as #svn_wc_diff_callbacks4_t.dir_opened. */
2562  svn_error_t *(*dir_opened)(svn_wc_adm_access_t *adm_access,
2563  svn_boolean_t *tree_conflicted,
2564  const char *path,
2565  svn_revnum_t rev,
2566  void *diff_baton);
2567 
2568  /** The same as #svn_wc_diff_callbacks4_t.dir_closed. */
2569  svn_error_t *(*dir_closed)(svn_wc_adm_access_t *adm_access,
2570  svn_wc_notify_state_t *contentstate,
2571  svn_wc_notify_state_t *propstate,
2572  svn_boolean_t *tree_conflicted,
2573  const char *path,
2574  void *diff_baton);
2575 
2577 
2578 /**
2579  * Similar to #svn_wc_diff_callbacks3_t, but without the @c dir_opened
2580  * and @c dir_closed functions, and without the @a tree_conflicted argument
2581  * to the functions.
2582  *
2583  * @deprecated Provided for backward compatibility with the 1.2 API.
2584  */
2586 {
2587  /** The same as @c file_changed in #svn_wc_diff_callbacks3_t. */
2588  svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access,
2589  svn_wc_notify_state_t *contentstate,
2590  svn_wc_notify_state_t *propstate,
2591  const char *path,
2592  const char *tmpfile1,
2593  const char *tmpfile2,
2594  svn_revnum_t rev1,
2595  svn_revnum_t rev2,
2596  const char *mimetype1,
2597  const char *mimetype2,
2598  const apr_array_header_t *propchanges,
2599  apr_hash_t *originalprops,
2600  void *diff_baton);
2601 
2602  /** The same as @c file_added in #svn_wc_diff_callbacks3_t. */
2603  svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access,
2604  svn_wc_notify_state_t *contentstate,
2605  svn_wc_notify_state_t *propstate,
2606  const char *path,
2607  const char *tmpfile1,
2608  const char *tmpfile2,
2609  svn_revnum_t rev1,
2610  svn_revnum_t rev2,
2611  const char *mimetype1,
2612  const char *mimetype2,
2613  const apr_array_header_t *propchanges,
2614  apr_hash_t *originalprops,
2615  void *diff_baton);
2616 
2617  /** The same as @c file_deleted in #svn_wc_diff_callbacks3_t. */
2618  svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access,
2619  svn_wc_notify_state_t *state,
2620  const char *path,
2621  const char *tmpfile1,
2622  const char *tmpfile2,
2623  const char *mimetype1,
2624  const char *mimetype2,
2625  apr_hash_t *originalprops,
2626  void *diff_baton);
2627 
2628  /** The same as @c dir_added in #svn_wc_diff_callbacks3_t. */
2629  svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access,
2630  svn_wc_notify_state_t *state,
2631  const char *path,
2632  svn_revnum_t rev,
2633  void *diff_baton);
2634 
2635  /** The same as @c dir_deleted in #svn_wc_diff_callbacks3_t. */
2636  svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access,
2637  svn_wc_notify_state_t *state,
2638  const char *path,
2639  void *diff_baton);
2640 
2641  /** The same as @c dir_props_changed in #svn_wc_diff_callbacks3_t. */
2642  svn_error_t *(*dir_props_changed)(svn_wc_adm_access_t *adm_access,
2643  svn_wc_notify_state_t *state,
2644  const char *path,
2645  const apr_array_header_t *propchanges,
2646  apr_hash_t *original_props,
2647  void *diff_baton);
2648 
2650 
2651 /**
2652  * Similar to #svn_wc_diff_callbacks2_t, but with file additions/content
2653  * changes and property changes split into different functions.
2654  *
2655  * @deprecated Provided for backward compatibility with the 1.1 API.
2656  */
2658 {
2659  /** Similar to @c file_changed in #svn_wc_diff_callbacks2_t, but without
2660  * property change information. @a tmpfile2 is never NULL. @a state applies
2661  * to the file contents. */
2662  svn_error_t *(*file_changed)(svn_wc_adm_access_t *adm_access,
2663  svn_wc_notify_state_t *state,
2664  const char *path,
2665  const char *tmpfile1,
2666  const char *tmpfile2,
2667  svn_revnum_t rev1,
2668  svn_revnum_t rev2,
2669  const char *mimetype1,
2670  const char *mimetype2,
2671  void *diff_baton);
2672 
2673  /** Similar to @c file_added in #svn_wc_diff_callbacks2_t, but without
2674  * property change information. @a *state applies to the file contents. */
2675  svn_error_t *(*file_added)(svn_wc_adm_access_t *adm_access,
2676  svn_wc_notify_state_t *state,
2677  const char *path,
2678  const char *tmpfile1,
2679  const char *tmpfile2,
2680  svn_revnum_t rev1,
2681  svn_revnum_t rev2,
2682  const char *mimetype1,
2683  const char *mimetype2,
2684  void *diff_baton);
2685 
2686  /** Similar to @c file_deleted in #svn_wc_diff_callbacks2_t, but without
2687  * the properties. */
2688  svn_error_t *(*file_deleted)(svn_wc_adm_access_t *adm_access,
2689  svn_wc_notify_state_t *state,
2690  const char *path,
2691  const char *tmpfile1,
2692  const char *tmpfile2,
2693  const char *mimetype1,
2694  const char *mimetype2,
2695  void *diff_baton);
2696 
2697  /** The same as @c dir_added in #svn_wc_diff_callbacks2_t. */
2698  svn_error_t *(*dir_added)(svn_wc_adm_access_t *adm_access,
2699  svn_wc_notify_state_t *state,
2700  const char *path,
2701  svn_revnum_t rev,
2702  void *diff_baton);
2703 
2704  /** The same as @c dir_deleted in #svn_wc_diff_callbacks2_t. */
2705  svn_error_t *(*dir_deleted)(svn_wc_adm_access_t *adm_access,
2706  svn_wc_notify_state_t *state,
2707  const char *path,
2708  void *diff_baton);
2709 
2710  /** Similar to @c dir_props_changed in #svn_wc_diff_callbacks2_t, but this
2711  * function is called for files as well as directories. */
2712  svn_error_t *(*props_changed)(svn_wc_adm_access_t *adm_access,
2713  svn_wc_notify_state_t *state,
2714  const char *path,
2715  const apr_array_header_t *propchanges,
2716  apr_hash_t *original_props,
2717  void *diff_baton);
2718 
2720 
2721 
2722 /* Asking questions about a working copy. */
2723 
2724 /** Set @a *wc_format to @a local_abspath's working copy format version
2725  * number if @a local_abspath is a valid working copy directory, else set it
2726  * to 0.
2727  *
2728  * Return error @c APR_ENOENT if @a local_abspath does not exist at all.
2729  *
2730  * @since New in 1.7.
2731  */
2732 svn_error_t *
2733 svn_wc_check_wc2(int *wc_format,
2734  svn_wc_context_t *wc_ctx,
2735  const char *local_abspath,
2736  apr_pool_t *scratch_pool);
2737 
2738 /**
2739  * Similar to svn_wc_check_wc2(), but with a relative path and no supplied
2740  * working copy context.
2741  *
2742  * @deprecated Provided for backward compatibility with the 1.6 API.
2743  */
2745 svn_error_t *
2746 svn_wc_check_wc(const char *path,
2747  int *wc_format,
2748  apr_pool_t *pool);
2749 
2750 
2751 /** Set @a *has_binary_prop to @c TRUE iff @a path has been marked
2752  * with a property indicating that it is non-text (in other words, binary).
2753  * @a adm_access is an access baton set that contains @a path.
2754  *
2755  * @deprecated Provided for backward compatibility with the 1.6 API. As a
2756  * replacement for this functionality, @see svn_mime_type_is_binary and
2757  * #SVN_PROP_MIME_TYPE.
2758  */
2760 svn_error_t *
2761 svn_wc_has_binary_prop(svn_boolean_t *has_binary_prop,
2762  const char *path,
2763  svn_wc_adm_access_t *adm_access,
2764  apr_pool_t *pool);
2765 
2766 
2767 /* Detecting modification. */
2768 
2769 /** Set @a *modified_p to non-zero if @a local_abspath's text is modified
2770  * with regard to the base revision, else set @a *modified_p to zero.
2771  * @a local_abspath is the absolute path to the file.
2772  *
2773  * This function uses some heuristics to avoid byte-by-byte comparisons
2774  * against the base text (eg. file size and its modification time).
2775  *
2776  * If @a local_abspath does not exist, consider it unmodified. If it exists
2777  * but is not under revision control (not even scheduled for
2778  * addition), return the error #SVN_ERR_ENTRY_NOT_FOUND.
2779  *
2780  * @a unused is ignored.
2781  *
2782  * @since New in 1.7.
2783  */
2784 svn_error_t *
2786  svn_wc_context_t *wc_ctx,
2787  const char *local_abspath,
2788  svn_boolean_t unused,
2789  apr_pool_t *scratch_pool);
2790 
2791 /** Similar to svn_wc_text_modified_p2(), but with a relative path and
2792  * adm_access baton?
2793  *
2794  * @deprecated Provided for backward compatibility with the 1.6 API.
2795  */
2797 svn_error_t *
2799  const char *filename,
2800  svn_boolean_t force_comparison,
2801  svn_wc_adm_access_t *adm_access,
2802  apr_pool_t *pool);
2803 
2804 /** Set @a *modified_p to non-zero if @a path's properties are modified
2805  * with regard to the base revision, else set @a modified_p to zero.
2806  * @a adm_access must be an access baton for @a path.
2807  *
2808  * @since New in 1.7.
2809  */
2810 svn_error_t *
2812  svn_wc_context_t *wc_ctx,
2813  const char *local_abspath,
2814  apr_pool_t *scratch_pool);
2815 
2816 /** Similar to svn_wc_props_modified_p2(), but with a relative path and
2817  * adm_access baton.
2818  *
2819  * @deprecated Provided for backward compatibility with the 1.6 API.
2820  */
2822 svn_error_t *
2824  const char *path,
2825  svn_wc_adm_access_t *adm_access,
2826  apr_pool_t *pool);
2827 
2828 
2829 /**
2830  * @defgroup svn_wc_entries Entries and status (deprecated)
2831  * @{
2832  */
2833 
2834 /** The schedule states an entry can be in.
2835  * @deprecated Provided for backward compatibility with the 1.6 API. */
2836 typedef enum svn_wc_schedule_t
2837 {
2838  /** Nothing special here */
2840 
2841  /** Slated for addition */
2843 
2844  /** Slated for deletion */
2846 
2847  /** Slated for replacement (delete + add) */
2849 
2851 
2852 
2853 /**
2854  * Values for the working_size field in svn_wc_entry_t
2855  * when it isn't set to the actual size value of the unchanged
2856  * working file.
2857  *
2858  * The value of the working size is unknown (hasn't been
2859  * calculated and stored in the past for whatever reason).
2860  *
2861  * @since New in 1.5
2862  * @deprecated Provided for backward compatibility with the 1.6 API.
2863  */
2864 #define SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN (-1)
2865 
2866 /** A working copy entry -- that is, revision control information about
2867  * one versioned entity.
2868  *
2869  * @deprecated Provided for backward compatibility with the 1.6 API.
2870  */
2871 /* SVN_DEPRECATED */
2872 typedef struct svn_wc_entry_t
2873 {
2874  /* IMPORTANT: If you extend this structure, add new fields to the end. */
2875 
2876  /* General Attributes */
2877 
2878  /** entry's name */
2879  const char *name;
2880 
2881  /** base revision */
2883 
2884  /** url in repository */
2885  const char *url;
2886 
2887  /** canonical repository URL or NULL if not known */
2888  const char *repos;
2889 
2890  /** repository uuid */
2891  const char *uuid;
2892 
2893  /** node kind (file, dir, ...) */
2895 
2896  /* State information */
2897 
2898  /** scheduling (add, delete, replace ...) */
2900 
2901  /** in a copied state (possibly because the entry is a child of a
2902  * path that is #svn_wc_schedule_add or #svn_wc_schedule_replace,
2903  * when the entry itself is #svn_wc_schedule_normal).
2904  * COPIED is true for nodes under a directory that was copied, but
2905  * COPYFROM_URL is null there. They are both set for the root
2906  * destination of the copy.
2907  */
2909 
2910  /** The directory containing this entry had a versioned child of this
2911  * name, but this entry represents a different revision or a switched
2912  * path at which no item exists in the repository. This typically
2913  * arises from committing or updating to a deletion of this entry
2914  * without committing or updating the parent directory.
2915  *
2916  * The schedule can be 'normal' or 'add'. */
2918 
2919  /** absent -- we know an entry of this name exists, but that's all
2920  (usually this happens because of authz restrictions) */
2922 
2923  /** for THIS_DIR entry, implies whole entries file is incomplete */
2925 
2926  /** copyfrom location */
2927  const char *copyfrom_url;
2928 
2929  /** copyfrom revision */
2931 
2932  /** old version of conflicted file. A file basename, relative to the
2933  * user's directory that the THIS_DIR entry refers to. */
2934  const char *conflict_old;
2935 
2936  /** new version of conflicted file. A file basename, relative to the
2937  * user's directory that the THIS_DIR entry refers to. */
2938  const char *conflict_new;
2939 
2940  /** working version of conflicted file. A file basename, relative to the
2941  * user's directory that the THIS_DIR entry refers to. */
2942  const char *conflict_wrk;
2943 
2944  /** property reject file. A file basename, relative to the user's
2945  * directory that the THIS_DIR entry refers to. */
2946  const char *prejfile;
2947 
2948  /** last up-to-date time for text contents (0 means no information available)
2949  */
2950  apr_time_t text_time;
2951 
2952  /** last up-to-date time for properties (0 means no information available)
2953  *
2954  * @deprecated This value will always be 0 in version 1.4 and later.
2955  */
2956  apr_time_t prop_time;
2957 
2958  /** Hex MD5 checksum for the untranslated text base file,
2959  * can be @c NULL for backwards compatibility.
2960  */
2961  const char *checksum;
2962 
2963  /* "Entry props" */
2964 
2965  /** last revision this was changed */
2967 
2968  /** last date this was changed */
2969  apr_time_t cmt_date;
2970 
2971  /** last commit author of this item */
2972  const char *cmt_author;
2973 
2974  /** lock token or NULL if path not locked in this WC
2975  * @since New in 1.2.
2976  */
2977  const char *lock_token;
2978 
2979  /** lock owner, or NULL if not locked in this WC
2980  * @since New in 1.2.
2981  */
2982  const char *lock_owner;
2983 
2984  /** lock comment or NULL if not locked in this WC or no comment
2985  * @since New in 1.2.
2986  */
2987  const char *lock_comment;
2988 
2989  /** Lock creation date or 0 if not locked in this WC
2990  * @since New in 1.2.
2991  */
2993 
2994  /** Whether this entry has any working properties.
2995  * False if this information is not stored in the entry.
2996  *
2997  * @since New in 1.4. */
2999 
3000  /** Whether this entry has property modifications.
3001  *
3002  * @note For working copies in older formats, this flag is not valid.
3003  *
3004  * @see svn_wc_props_modified_p().
3005  *
3006  * @since New in 1.4. */
3008 
3009  /** A space-separated list of all properties whose presence/absence is cached
3010  * in this entry.
3011  *
3012  * @see @c present_props.
3013  *
3014  * @since New in 1.4.
3015  * @deprecated This value will always be "" in version 1.7 and later. */
3016  const char *cachable_props;
3017 
3018  /** Cached property existence for this entry.
3019  * This is a space-separated list of property names. If a name exists in
3020  * @c cachable_props but not in this list, this entry does not have that
3021  * property. If a name exists in both lists, the property is present on this
3022  * entry.
3023  *
3024  * @since New in 1.4.
3025  * @deprecated This value will always be "" in version 1.7 and later. */
3026  const char *present_props;
3027 
3028  /** which changelist this item is part of, or NULL if not part of any.
3029  * @since New in 1.5.
3030  */
3031  const char *changelist;
3032 
3033  /** Size of the file after being translated into local
3034  * representation, or #SVN_WC_ENTRY_WORKING_SIZE_UNKNOWN if
3035  * unknown.
3036  *
3037  * @since New in 1.5.
3038  */
3039  apr_off_t working_size;
3040 
3041  /** Whether a local copy of this entry should be kept in the working copy
3042  * after a deletion has been committed, Only valid for the this-dir entry
3043  * when it is scheduled for deletion.
3044  *
3045  * @since New in 1.5. */
3047 
3048  /** The depth of this entry.
3049  *
3050  * ### It's a bit annoying that we only use this on this_dir
3051  * ### entries, yet it will exist (with value svn_depth_infinity) on
3052  * ### all entries. Maybe some future extensibility would make this
3053  * ### field meaningful on entries besides this_dir.
3054  *
3055  * @since New in 1.5. */
3057 
3058  /** Serialized data for all of the tree conflicts detected in this_dir.
3059  *
3060  * @since New in 1.6. */
3061  const char *tree_conflict_data;
3062 
3063  /** The entry is a intra-repository file external and this is the
3064  * repository root relative path to the file specified in the
3065  * externals definition, otherwise NULL if the entry is not a file
3066  * external.
3067  *
3068  * @since New in 1.6. */
3069  const char *file_external_path;
3070 
3071  /** The entry is a intra-repository file external and this is the
3072  * peg revision number specified in the externals definition. This
3073  * field is only valid when the file_external_path field is
3074  * non-NULL. The only permissible values are
3075  * svn_opt_revision_unspecified if the entry is not an external,
3076  * svn_opt_revision_head if the external revision is unspecified or
3077  * specified with -r HEAD or svn_opt_revision_number for a specific
3078  * revision number.
3079  *
3080  * @since New in 1.6. */
3082 
3083  /** The entry is an intra-repository file external and this is the
3084  * operative revision number specified in the externals definition.
3085  * This field is only valid when the file_external_path field is
3086  * non-NULL. The only permissible values are
3087  * svn_opt_revision_unspecified if the entry is not an external,
3088  * svn_opt_revision_head if the external revision is unspecified or
3089  * specified with -r HEAD or svn_opt_revision_number for a specific
3090  * revision number.
3091  *
3092  * @since New in 1.6. */
3094 
3095  /* IMPORTANT: If you extend this structure, check the following functions in
3096  * subversion/libsvn_wc/entries.c, to see if you need to extend them as well.
3097  *
3098  * svn_wc__atts_to_entry()
3099  * svn_wc_entry_dup()
3100  * alloc_entry()
3101  * read_entry()
3102  * write_entry()
3103  * fold_entry()
3104  */
3105 } svn_wc_entry_t;
3106 
3107 
3108 /** How an entries file's owner dir is named in the entries file.
3109  * @deprecated Provided for backward compatibility with the 1.6 API. */
3110 #define SVN_WC_ENTRY_THIS_DIR ""
3111 
3112 
3113 /** Set @a *entry to an entry for @a path, allocated in the access baton pool.
3114  * If @a show_hidden is TRUE, return the entry even if it's in 'excluded',
3115  * 'deleted' or 'absent' state. Excluded entries are those with their depth
3116  * set to #svn_depth_exclude. If @a path is not under revision control, or
3117  * if entry is hidden, not scheduled for re-addition, and @a show_hidden is @c
3118  * FALSE, then set @a *entry to @c NULL.
3119  *
3120  * @a *entry should not be modified, since doing so modifies the entries
3121  * cache in @a adm_access without changing the entries file on disk.
3122  *
3123  * If @a path is not a directory then @a adm_access must be an access baton
3124  * for the parent directory of @a path. To avoid needing to know whether
3125  * @a path is a directory or not, if @a path is a directory @a adm_access
3126  * can still be an access baton for the parent of @a path so long as the
3127  * access baton for @a path itself is in the same access baton set.
3128  *
3129  * @a path can be relative or absolute but must share the same base used
3130  * to open @a adm_access.
3131  *
3132  * Note that it is possible for @a path to be absent from disk but still
3133  * under revision control; and conversely, it is possible for @a path to
3134  * be present, but not under revision control.
3135  *
3136  * Use @a pool only for local processing.
3137  *
3138  * @deprecated Provided for backward compatibility with the 1.6 API.
3139  */
3141 svn_error_t *
3142 svn_wc_entry(const svn_wc_entry_t **entry,
3143  const char *path,
3144  svn_wc_adm_access_t *adm_access,
3145  svn_boolean_t show_hidden,
3146  apr_pool_t *pool);
3147 
3148 
3149 /** Parse the `entries' file for @a adm_access and return a hash @a entries,
3150  * whose keys are (<tt>const char *</tt>) entry names and values are
3151  * (<tt>svn_wc_entry_t *</tt>). The hash @a entries, and its keys and
3152  * values, are allocated from the pool used to open the @a adm_access
3153  * baton (that's how the entries caching works). @a pool is used for
3154  * transient allocations.
3155  *
3156  * Entries that are in a 'excluded', 'deleted' or 'absent' state (and not
3157  * scheduled for re-addition) are not returned in the hash, unless
3158  * @a show_hidden is TRUE. Excluded entries are those with their depth set to
3159  * #svn_depth_exclude.
3160  *
3161  * @par Important:
3162  * The @a entries hash is the entries cache in @a adm_access
3163  * and so usually the hash itself, the keys and the values should be treated
3164  * as read-only. If any of these are modified then it is the caller's
3165  * responsibility to ensure that the entries file on disk is updated. Treat
3166  * the hash values as type (<tt>const svn_wc_entry_t *</tt>) if you wish to
3167  * avoid accidental modification. Modifying the schedule member is a
3168  * particularly bad idea, as the entries writing process relies on having
3169  * access to the original schedule. Use a duplicate entry to modify the
3170  * schedule.
3171  *
3172  * @par Important:
3173  * Only the entry structures representing files and
3174  * #SVN_WC_ENTRY_THIS_DIR contain complete information. The entry
3175  * structures representing subdirs have only the `kind' and `state'
3176  * fields filled in. If you want info on a subdir, you must use this
3177  * routine to open its @a path and read the #SVN_WC_ENTRY_THIS_DIR
3178  * structure, or call svn_wc_entry() on its @a path.
3179  *
3180  * @deprecated Provided for backward compatibility with the 1.6 API.
3181  */
3183 svn_error_t *
3184 svn_wc_entries_read(apr_hash_t **entries,
3185  svn_wc_adm_access_t *adm_access,
3186  svn_boolean_t show_hidden,
3187  apr_pool_t *pool);
3188 
3189 
3190 /** Return a duplicate of @a entry, allocated in @a pool. No part of the new
3191  * entry will be shared with @a entry.
3192  *
3193  * @deprecated Provided for backward compatibility with the 1.6 API.
3194  */
3197 svn_wc_entry_dup(const svn_wc_entry_t *entry,
3198  apr_pool_t *pool);
3199 
3200 /** @} */
3201 
3202 
3203 /**
3204  * This struct contains information about a working copy node.
3205  *
3206  * @note Fields may be added to the end of this structure in future
3207  * versions. Therefore, users shouldn't allocate structures of this
3208  * type, to preserve binary compatibility.
3209  *
3210  * @since New in 1.7.
3211  */
3212 typedef struct svn_wc_info_t
3213 {
3214  /** The schedule of this item
3215  * ### Do we still need schedule? */
3217 
3218  /** If copied, the URL from which the copy was made, else @c NULL. */
3219  const char *copyfrom_url;
3220 
3221  /** If copied, the revision from which the copy was made,
3222  * else #SVN_INVALID_REVNUM. */
3224 
3225  /** The checksum of the node, if it is a file. */
3227 
3228  /** A changelist the item is in, @c NULL if this node is not in a
3229  * changelist. */
3230  const char *changelist;
3231 
3232  /** The depth of the item, see #svn_depth_t */
3234 
3235  /**
3236  * The size of the file after being translated into its local
3237  * representation, or #SVN_INVALID_FILESIZE if unknown.
3238  * Not applicable for directories.
3239  */
3241 
3242  /**
3243  * The time at which the file had the recorded size recorded_size and was
3244  * considered unmodified. */
3245  apr_time_t recorded_time;
3246 
3247  /** Array of const svn_wc_conflict_description2_t * which contains info
3248  * on any conflict of which this node is a victim. Otherwise NULL. */
3249  const apr_array_header_t *conflicts;
3250 
3251  /** The local absolute path of the working copy root. */
3252  const char *wcroot_abspath;
3253 
3254  /** The path the node was moved from, if it was moved here. Else NULL.
3255  * @since New in 1.8. */
3256  const char *moved_from_abspath;
3257 
3258  /** The path the node was moved to, if it was moved away. Else NULL.
3259  * @since New in 1.8. */
3260  const char *moved_to_abspath;
3261 } svn_wc_info_t;
3262 
3263 /**
3264  * Return a duplicate of @a info, allocated in @a pool. No part of the new
3265  * structure will be shared with @a info.
3266  *
3267  * @since New in 1.7.
3268  */
3269 svn_wc_info_t *
3270 svn_wc_info_dup(const svn_wc_info_t *info,
3271  apr_pool_t *pool);
3272 
3273 
3274 /** Given @a local_abspath in a dir under version control, decide if it is
3275  * in a state of conflict; return the answers in @a *text_conflicted_p, @a
3276  * *prop_conflicted_p, and @a *tree_conflicted_p. If one or two of the
3277  * answers are uninteresting, simply pass @c NULL pointers for those.
3278  *
3279  * If @a local_abspath is unversioned or does not exist, return
3280  * #SVN_ERR_WC_PATH_NOT_FOUND.
3281  *
3282  * If the @a local_abspath has corresponding text conflict files (with suffix
3283  * .mine, .theirs, etc.) that cannot be found, assume that the text conflict
3284  * has been resolved by the user and return @c FALSE in @a
3285  * *text_conflicted_p.
3286  *
3287  * Similarly, if a property conflicts file (.prej suffix) is said to exist,
3288  * but it cannot be found, assume that the property conflicts have been
3289  * resolved by the user and return @c FALSE in @a *prop_conflicted_p.
3290  *
3291  * @a *tree_conflicted_p can't be auto-resolved in this fashion. An
3292  * explicit `resolved' is needed.
3293  *
3294  * @since New in 1.7.
3295  */
3296 svn_error_t *
3297 svn_wc_conflicted_p3(svn_boolean_t *text_conflicted_p,
3298  svn_boolean_t *prop_conflicted_p,
3299  svn_boolean_t *tree_conflicted_p,
3300  svn_wc_context_t *wc_ctx,
3301  const char *local_abspath,
3302  apr_pool_t *scratch_pool);
3303 
3304 /** Similar to svn_wc_conflicted_p3(), but with a path/adm_access parameter
3305  * pair in place of a wc_ctx/local_abspath pair.
3306  *
3307  * @since New in 1.6.
3308  * @deprecated Provided for backward compatibility with the 1.6 API.
3309  */
3311 svn_error_t *
3312 svn_wc_conflicted_p2(svn_boolean_t *text_conflicted_p,
3313  svn_boolean_t *prop_conflicted_p,
3314  svn_boolean_t *tree_conflicted_p,
3315  const char *path,
3316  svn_wc_adm_access_t *adm_access,
3317  apr_pool_t *pool);
3318 
3319 /** Given a @a dir_path under version control, decide if one of its entries
3320  * (@a entry) is in a state of conflict; return the answers in @a
3321  * text_conflicted_p and @a prop_conflicted_p. These pointers must not be
3322  * null.
3323  *
3324  * If the @a entry mentions that text conflict files (with suffix .mine,
3325  * .theirs, etc.) exist, but they cannot be found, assume the text conflict
3326  * has been resolved by the user and return FALSE in @a *text_conflicted_p.
3327  *
3328  * Similarly, if the @a entry mentions that a property conflicts file (.prej
3329  * suffix) exists, but it cannot be found, assume the property conflicts
3330  * have been resolved by the user and return FALSE in @a *prop_conflicted_p.
3331  *
3332  * The @a entry is not updated.
3333  *
3334  * @deprecated Provided for backward compatibility with the 1.5 API.
3335  */
3337 svn_error_t *
3338 svn_wc_conflicted_p(svn_boolean_t *text_conflicted_p,
3339  svn_boolean_t *prop_conflicted_p,
3340  const char *dir_path,
3341  const svn_wc_entry_t *entry,
3342  apr_pool_t *pool);
3343 
3344 
3345 /** Set @a *url and @a *rev to the ancestor URL and revision for @a path,
3346  * allocating in @a pool. @a adm_access must be an access baton for @a path.
3347  *
3348  * If @a url or @a rev is NULL, then ignore it (just don't return the
3349  * corresponding information).
3350  *
3351  * @deprecated Provided for backward compatibility with the 1.6 API.
3352  */
3354 svn_error_t *
3355 svn_wc_get_ancestry(char **url,
3356  svn_revnum_t *rev,
3357  const char *path,
3358  svn_wc_adm_access_t *adm_access,
3359  apr_pool_t *pool);
3360 
3361 
3362 /** A callback vtable invoked by the generic entry-walker function.
3363  * @since New in 1.5.
3364  */
3366 {
3367  /** An @a entry was found at @a path. */
3368  svn_error_t *(*found_entry)(const char *path,
3369  const svn_wc_entry_t *entry,
3370  void *walk_baton,
3371  apr_pool_t *pool);
3372 
3373  /** Handle the error @a err encountered while processing @a path.
3374  * Wrap or squelch @a err as desired, and return an #svn_error_t
3375  * *, or #SVN_NO_ERROR.
3376  */
3377  svn_error_t *(*handle_error)(const char *path,
3378  svn_error_t *err,
3379  void *walk_baton,
3380  apr_pool_t *pool);
3381 
3383 
3384 /** @deprecated Provided for backward compatibility with the 1.4 API. */
3386 {
3387  /** An @a entry was found at @a path. */
3388  svn_error_t *(*found_entry)(const char *path,
3389  const svn_wc_entry_t *entry,
3390  void *walk_baton,
3391  apr_pool_t *pool);
3392 
3394 
3395 /**
3396  * A generic entry-walker.
3397  *
3398  * Do a potentially recursive depth-first entry-walk beginning on
3399  * @a path, which can be a file or dir. Call callbacks in
3400  * @a walk_callbacks, passing @a walk_baton to each. Use @a pool for
3401  * looping, recursion, and to allocate all entries returned.
3402  * @a adm_access must be an access baton for @a path. The pool
3403  * passed to @a walk_callbacks is a temporary subpool of @a pool.
3404  *
3405  * If @a depth is #svn_depth_empty, invoke the callbacks on @a path
3406  * and return without recursing further. If #svn_depth_files, do
3407  * the same and invoke the callbacks on file children (if any) of
3408  * @a path, then return. If #svn_depth_immediates, do the preceding
3409  * but also invoke callbacks on immediate subdirectories, then return.
3410  * If #svn_depth_infinity, recurse fully starting from @a path.
3411  *
3412  * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
3413  * if the client has canceled the operation.
3414  *
3415  * Like our other entries interfaces, entries that are in a 'excluded',
3416  * 'deleted' or 'absent' state (and not scheduled for re-addition) are not
3417  * discovered, unless @a show_hidden is TRUE. Excluded entries are those with
3418  * their depth set to #svn_depth_exclude.
3419  *
3420  * When a new directory is entered, #SVN_WC_ENTRY_THIS_DIR will always
3421  * be returned first.
3422  *
3423  * @note Callers should be aware that each directory will be
3424  * returned *twice*: first as an entry within its parent, and
3425  * subsequently as the '.' entry within itself. The two calls can be
3426  * distinguished by looking for #SVN_WC_ENTRY_THIS_DIR in the 'name'
3427  * field of the entry.
3428  *
3429  * @since New in 1.5.
3430  * @deprecated Provided for backward compatibility with the 1.6 API.
3431  */
3433 svn_error_t *
3434 svn_wc_walk_entries3(const char *path,
3435  svn_wc_adm_access_t *adm_access,
3436  const svn_wc_entry_callbacks2_t *walk_callbacks,
3437  void *walk_baton,
3438  svn_depth_t depth,
3439  svn_boolean_t show_hidden,
3440  svn_cancel_func_t cancel_func,
3441  void *cancel_baton,
3442  apr_pool_t *pool);
3443 
3444 /**
3445  * Similar to svn_wc_walk_entries3(), but without cancellation support
3446  * or error handling from @a walk_callbacks, and with @a depth always
3447  * set to #svn_depth_infinity.
3448  *
3449  * @since New in 1.2.
3450  * @deprecated Provided for backward compatibility with the 1.4 API.
3451  */
3453 svn_error_t *
3454 svn_wc_walk_entries2(const char *path,
3455  svn_wc_adm_access_t *adm_access,
3456  const svn_wc_entry_callbacks_t *walk_callbacks,
3457  void *walk_baton,
3458  svn_boolean_t show_hidden,
3459  svn_cancel_func_t cancel_func,
3460  void *cancel_baton,
3461  apr_pool_t *pool);
3462 
3463 /**
3464  * Similar to svn_wc_walk_entries2(), but without cancellation support.
3465  *
3466  * @deprecated Provided for backward compatibility with the 1.1 API.
3467  */
3469 svn_error_t *
3470 svn_wc_walk_entries(const char *path,
3471  svn_wc_adm_access_t *adm_access,
3472  const svn_wc_entry_callbacks_t *walk_callbacks,
3473  void *walk_baton,
3474  svn_boolean_t show_hidden,
3475  apr_pool_t *pool);
3476 
3477 
3478 /** Mark missing @a path as 'deleted' in its @a parent's list of
3479  * entries. @a path should be a directory that is both deleted (via
3480  * svn_wc_delete4) and removed (via a system call). This function
3481  * should only be called during post-commit processing following a
3482  * successful commit editor drive.
3483  *
3484  * Return #SVN_ERR_WC_PATH_FOUND if @a path isn't actually missing.
3485  *
3486  * @deprecated Provided for backward compatibility with the 1.6 API.
3487  */
3489 svn_error_t *
3490 svn_wc_mark_missing_deleted(const char *path,
3491  svn_wc_adm_access_t *parent,
3492  apr_pool_t *pool);
3493 
3494 
3495 /** Ensure that an administrative area exists for @a local_abspath, so
3496  * that @a local_abspath is a working copy subdir based on @a url at @a
3497  * revision, with depth @a depth, and with repository UUID @a repos_uuid
3498  * and repository root URL @a repos_root_url.
3499  *
3500  * @a depth must be a definite depth, it cannot be #svn_depth_unknown.
3501  * @a repos_uuid and @a repos_root_url MUST NOT be @c NULL, and
3502  * @a repos_root_url must be a prefix of @a url.
3503  *
3504  * If the administrative area does not exist, then create it and
3505  * initialize it to an unlocked state.
3506  *
3507  * If the administrative area already exists then the given @a url
3508  * must match the URL in the administrative area and the given
3509  * @a revision must match the BASE of the working copy dir unless
3510  * the admin directory is scheduled for deletion or the
3511  * #SVN_ERR_WC_OBSTRUCTED_UPDATE error will be returned.
3512  *
3513  * Do not ensure existence of @a local_abspath itself; if @a local_abspath
3514  * does not exist, return error.
3515  *
3516  * Use @a scratch_pool for temporary allocations.
3517  *
3518  * @since New in 1.7.
3519  */
3520 svn_error_t *
3522  const char *local_abspath,
3523  const char *url,
3524  const char *repos_root_url,
3525  const char *repos_uuid,
3526  svn_revnum_t revision,
3527  svn_depth_t depth,
3528  apr_pool_t *scratch_pool);
3529 
3530 /**
3531  * Similar to svn_wc_ensure_adm4(), but without the wc context parameter.
3532  *
3533  * @note the @a uuid and @a repos parameters were documented as allowing
3534  * @c NULL to be passed. Beginning with 1.7, this will return an error,
3535  * contrary to prior documented behavior: see 'notes/api-errata/1.7/wc005.txt'.
3536  *
3537  * @since New in 1.5.
3538  * @deprecated Provided for backwards compatibility with the 1.6 API.
3539  */
3541 svn_error_t *
3542 svn_wc_ensure_adm3(const char *path,
3543  const char *uuid,
3544  const char *url,
3545  const char *repos,
3546  svn_revnum_t revision,
3547  svn_depth_t depth,
3548  apr_pool_t *pool);
3549 
3550 
3551 /**
3552  * Similar to svn_wc_ensure_adm3(), but with @a depth set to
3553  * #svn_depth_infinity.
3554  *
3555  * See the note on svn_wc_ensure_adm3() regarding the @a repos and @a uuid
3556  * parameters.
3557  *
3558  * @since New in 1.3.
3559  * @deprecated Provided for backwards compatibility with the 1.4 API.
3560  */
3562 svn_error_t *
3563 svn_wc_ensure_adm2(const char *path,
3564  const char *uuid,
3565  const char *url,
3566  const char *repos,
3567  svn_revnum_t revision,
3568  apr_pool_t *pool);
3569 
3570 
3571 /**
3572  * Similar to svn_wc_ensure_adm2(), but with @a repos set to @c NULL.
3573  *
3574  * @note as of 1.7, this function always returns #SVN_ERR_BAD_URL since
3575  * the @a repos parameter may not be @c NULL.
3576  *
3577  * @deprecated Provided for backwards compatibility with the 1.2 API.
3578  */
3580 svn_error_t *
3581 svn_wc_ensure_adm(const char *path,
3582  const char *uuid,
3583  const char *url,
3584  svn_revnum_t revision,
3585  apr_pool_t *pool);
3586 
3587 
3588 /** Set the repository root URL of @a path to @a repos, if possible.
3589  *
3590  * Before Subversion 1.7 there could be working copy directories that
3591  * didn't have a stored repository root in some specific circumstances.
3592  * This function allowed setting this root later.
3593  *
3594  * Since Subversion 1.7 this function just returns #SVN_NO_ERROR.
3595  *
3596  * @since New in 1.3.
3597  * @deprecated Provided for backwards compatibility with the 1.6 API.
3598  */
3600 svn_error_t *
3602  const char *path,
3603  const char *repos,
3604  apr_pool_t *pool);
3605 
3606 
3607 /**
3608  * @defgroup svn_wc_status Working copy status.
3609  * @{
3610  *
3611  * We have three functions for getting working copy status: one function
3612  * for getting the status of exactly one thing, another for
3613  * getting the statuses of (potentially) multiple things and a third for
3614  * getting the working copy out-of-dateness with respect to the repository.
3615  *
3616  * Why do we have two different functions for getting working copy status?
3617  * The concept of depth, as explained in the documentation for
3618  * svn_depth_t, may be useful in understanding this. Suppose we're
3619  * getting the status of directory D:
3620  *
3621  * To offer all three levels, we could have one unified function,
3622  * taking a `depth' parameter. Unfortunately, because this function
3623  * would have to handle multiple return values as well as the single
3624  * return value case, getting the status of just one entity would
3625  * become cumbersome: you'd have to roll through a hash to find one
3626  * lone status.
3627  *
3628  * So we have svn_wc_status3() for depth-empty (just D itself), and
3629  * svn_wc_walk_status() for depth-immediates and depth-infinity,
3630  * since the latter two involve multiple return values. And for
3631  * out-of-dateness information we have svn_wc_get_status_editor5().
3632  */
3633 
3634 /** The type of status for the working copy. */
3636 {
3637  /** does not exist */
3639 
3640  /** is not a versioned thing in this wc */
3642 
3643  /** exists, but uninteresting */
3645 
3646  /** is scheduled for addition */
3648 
3649  /** under v.c., but is missing */
3651 
3652  /** scheduled for deletion */
3654 
3655  /** was deleted and then re-added */
3657 
3658  /** text or props have been modified */
3660 
3661  /** local mods received repos mods (### unused) */
3663 
3664  /** local mods received conflicting repos mods */
3666 
3667  /** is unversioned but configured to be ignored */
3669 
3670  /** an unversioned resource is in the way of the versioned resource */
3672 
3673  /** an unversioned directory path populated by an svn:externals
3674  property; this status is not used for file externals */
3676 
3677  /** a directory doesn't contain a complete entries list */
3679 };
3680 
3681 /**
3682  * Structure for holding the "status" of a working copy item.
3683  *
3684  * @note Fields may be added to the end of this structure in future
3685  * versions. Therefore, to preserve binary compatibility, users
3686  * should not directly allocate structures of this type.
3687  *
3688  * @since New in 1.7.
3689  */
3690 typedef struct svn_wc_status3_t
3691 {
3692  /** The kind of node as recorded in the working copy */
3694 
3695  /** The depth of the node as recorded in the working copy
3696  * (#svn_depth_unknown for files or when no depth is set) */
3698 
3699  /** The actual size of the working file on disk, or SVN_INVALID_FILESIZE
3700  * if unknown (or if the item isn't a file at all). */
3702 
3703  /** If the path is under version control, versioned is TRUE, otherwise
3704  * FALSE. */
3706 
3707  /** Set to TRUE if the item is the victim of a conflict. */
3709 
3710  /** The status of the node itself. In order of precedence: Obstructions,
3711  * structural changes, text changes. */
3713 
3714  /** The status of the entry's text. */
3716 
3717  /** The status of the entry's properties. */
3719 
3720  /** a file or directory can be 'copied' if it's scheduled for
3721  * addition-with-history (or part of a subtree that is scheduled as such.).
3722  */
3724 
3725  /** Base revision. */
3727 
3728  /** Last revision this was changed */
3730 
3731  /** Date of last commit. */
3732  apr_time_t changed_date;
3733 
3734  /** Last commit author of this item */
3735  const char *changed_author;
3736 
3737  /** The URL of the repository */
3738  const char *repos_root_url;
3739 
3740  /** The UUID of the repository */
3741  const char *repos_uuid;
3742 
3743  /** The in-repository path relative to the repository root. */
3744  const char *repos_relpath;
3745 
3746  /** a file or directory can be 'switched' if the switch command has been
3747  * used. If this is TRUE, then file_external will be FALSE.
3748  */
3750 
3751  /** This directory has a working copy lock */
3753 
3754  /** The repository file lock. (Values of path, token, owner, comment
3755  * and are available if a lock is present) */
3757 
3758  /** Which changelist this item is part of, or NULL if not part of any. */
3759  const char *changelist;
3760 
3761  /**
3762  * @defgroup svn_wc_status_ood WC out-of-date info from the repository
3763  * @{
3764  *
3765  * When the working copy item is out-of-date compared to the
3766  * repository, the following fields represent the state of the
3767  * youngest revision of the item in the repository. If the working
3768  * copy is not out of date, the fields are initialized as described
3769  * below.
3770  */
3771 
3772  /** Set to the node kind of the youngest commit, or #svn_node_none
3773  * if not out of date. */
3775 
3776  /** The status of the node, based on the text status if the node has no
3777  * restructuring changes */
3779 
3780  /** The entry's text status in the repository. */
3782 
3783  /** The entry's property status in the repository. */
3785 
3786  /** The entry's lock in the repository, if any. */
3788 
3789  /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM
3790  * if not out of date. */
3792 
3793  /** Set to the most recent commit date, or @c 0 if not out of date. */
3794  apr_time_t ood_changed_date;
3795 
3796  /** Set to the user name of the youngest commit, or @c NULL if not
3797  * out of date or non-existent. Because a non-existent @c
3798  * svn:author property has the same behavior as an out-of-date
3799  * working copy, examine @c ood_last_cmt_rev to determine whether
3800  * the working copy is out of date. */
3801  const char *ood_changed_author;
3802 
3803  /** @} */
3804 
3805  /** Set to the local absolute path that this node was moved from, if this
3806  * file or directory has been moved here locally and is the root of that
3807  * move. Otherwise set to NULL.
3808  *
3809  * This will be NULL for moved-here nodes that are just part of a subtree
3810  * that was moved along (and are not themselves a root of a different move
3811  * operation).
3812  *
3813  * @since New in 1.8. */
3814  const char *moved_from_abspath;
3815 
3816  /** Set to the local absolute path that this node was moved to, if this file
3817  * or directory has been moved away locally and corresponds to the root
3818  * of the destination side of the move. Otherwise set to NULL.
3819  *
3820  * Note: Saying just "root" here could be misleading. For example:
3821  * svn mv A AA;
3822  * svn mv AA/B BB;
3823  * creates a situation where A/B is moved-to BB, but one could argue that
3824  * the move source's root actually was AA/B. Note that, as far as the
3825  * working copy is concerned, above case is exactly identical to:
3826  * svn mv A/B BB;
3827  * svn mv A AA;
3828  * In both situations, @a moved_to_abspath would be set for nodes A (moved
3829  * to AA) and A/B (moved to BB), only.
3830  *
3831  * This will be NULL for moved-away nodes that were just part of a subtree
3832  * that was moved along (and are not themselves a root of a different move
3833  * operation).
3834  *
3835  * @since New in 1.8. */
3836  const char *moved_to_abspath;
3837 
3838  /** @c TRUE iff the item is a file brought in by an svn:externals definition.
3839  * @since New in 1.8. */
3841 
3842 
3843  /** The actual kind of the node in the working copy. May differ from
3844  * @a kind on obstructions, deletes, etc. #svn_node_unknown if unavailable.
3845  *
3846  * @since New in 1.9 */
3848 
3849  /* NOTE! Please update svn_wc_dup_status3() when adding new fields here. */
3851 
3852 /**
3853  * ### All diffs are not yet known.
3854  * Same as svn_wc_status3_t, but without the #svn_boolean_t 'versioned'
3855  * field. Instead an item that is not versioned has the 'entry' field set to
3856  * @c NULL.
3857  *
3858  * @since New in 1.2.
3859  * @deprecated Provided for backward compatibility with the 1.6 API.
3860  */
3861 typedef struct svn_wc_status2_t
3862 {
3863  /** Can be @c NULL if not under version control. */
3865 
3866  /** The status of the entry itself, including its text if it is a file. */
3868 
3869  /** The status of the entry's properties. */
3871 
3872  /** a directory can be 'locked' if a working copy update was interrupted. */
3874 
3875  /** a file or directory can be 'copied' if it's scheduled for
3876  * addition-with-history (or part of a subtree that is scheduled as such.).
3877  */
3879 
3880  /** a file or directory can be 'switched' if the switch command has been
3881  * used. If this is TRUE, then file_external will be FALSE.
3882  */
3884 
3885  /** The entry's text status in the repository. */
3887 
3888  /** The entry's property status in the repository. */
3890 
3891  /** The entry's lock in the repository, if any. */
3893 
3894  /** Set to the URI (actual or expected) of the item.
3895  * @since New in 1.3
3896  */
3897  const char *url;
3898 
3899  /**
3900  * @defgroup svn_wc_status_ood WC out-of-date info from the repository
3901  * @{
3902  *
3903  * When the working copy item is out-of-date compared to the
3904  * repository, the following fields represent the state of the
3905  * youngest revision of the item in the repository. If the working
3906  * copy is not out of date, the fields are initialized as described
3907  * below.
3908  */
3909 
3910  /** Set to the youngest committed revision, or #SVN_INVALID_REVNUM
3911  * if not out of date.
3912  * @since New in 1.3
3913  */
3915 
3916  /** Set to the most recent commit date, or @c 0 if not out of date.
3917  * @since New in 1.3
3918  */
3919  apr_time_t ood_last_cmt_date;
3920 
3921  /** Set to the node kind of the youngest commit, or #svn_node_none
3922  * if not out of date.
3923  * @since New in 1.3
3924  */
3926 
3927  /** Set to the user name of the youngest commit, or @c NULL if not
3928  * out of date or non-existent. Because a non-existent @c
3929  * svn:author property has the same behavior as an out-of-date
3930  * working copy, examine @c ood_last_cmt_rev to determine whether
3931  * the working copy is out of date.
3932  * @since New in 1.3
3933  */
3934  const char *ood_last_cmt_author;
3935 
3936  /** @} */
3937 
3938  /** Non-NULL if the entry is the victim of a tree conflict.
3939  * @since New in 1.6
3940  */
3942 
3943  /** If the item is a file that was added to the working copy with an
3944  * svn:externals; if file_external is TRUE, then switched is always
3945  * FALSE.
3946  * @since New in 1.6
3947  */
3949 
3950  /** The actual status of the text compared to the pristine base of the
3951  * file. This value isn't masked by other working copy statuses.
3952  * @c pristine_text_status is #svn_wc_status_none if this value was
3953  * not calculated during the status walk.
3954  * @since New in 1.6
3955  */
3957 
3958  /** The actual status of the properties compared to the pristine base of
3959  * the node. This value isn't masked by other working copy statuses.
3960  * @c pristine_prop_status is #svn_wc_status_none if this value was
3961  * not calculated during the status walk.
3962  * @since New in 1.6
3963  */
3965 
3967 
3968 
3969 
3970 /**
3971  * 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.
3972  *
3973  * @deprecated Provided for backward compatibility with the 1.1 API.
3974  */
3975 typedef struct svn_wc_status_t
3976 {
3977  /** Can be @c NULL if not under version control. */
3979 
3980  /** The status of the entries text. */
3982 
3983  /** The status of the entries properties. */
3985 
3986  /** a directory can be 'locked' if a working copy update was interrupted. */
3988 
3989  /** a file or directory can be 'copied' if it's scheduled for
3990  * addition-with-history (or part of a subtree that is scheduled as such.).
3991  */
3993 
3994  /** a file or directory can be 'switched' if the switch command has been
3995  * used.
3996  */
3998 
3999  /** The entry's text status in the repository. */
4001 
4002  /** The entry's property status in the repository. */
4004 
4005 } svn_wc_status_t;
4006 
4007 
4008 /**
4009  * Return a deep copy of the @a orig_stat status structure, allocated
4010  * in @a pool.
4011  *
4012  * @since New in 1.7.
4013  */
4015 svn_wc_dup_status3(const svn_wc_status3_t *orig_stat,
4016  apr_pool_t *pool);
4017 
4018 /**
4019  * Same as svn_wc_dup_status3(), but for older svn_wc_status_t structures.
4020  *
4021  * @since New in 1.2
4022  * @deprecated Provided for backward compatibility with the 1.6 API.
4023  */
4026 svn_wc_dup_status2(const svn_wc_status2_t *orig_stat,
4027  apr_pool_t *pool);
4028 
4029 
4030 /**
4031  * Same as svn_wc_dup_status2(), but for older svn_wc_status_t structures.
4032  *
4033  * @deprecated Provided for backward compatibility with the 1.1 API.
4034  */
4037 svn_wc_dup_status(const svn_wc_status_t *orig_stat,
4038  apr_pool_t *pool);
4039 
4040 
4041 /**
4042  * Fill @a *status for @a local_abspath, allocating in @a result_pool.
4043  * Use @a scratch_pool for temporary allocations.
4044  *
4045  * Here are some things to note about the returned structure. A quick
4046  * examination of the @c status->text_status after a successful return of
4047  * this function can reveal the following things:
4048  *
4049  * - #svn_wc_status_none : @a local_abspath is not versioned, and is
4050  * not present on disk
4051  *
4052  * - #svn_wc_status_missing : @a local_abspath is versioned, but is
4053  * missing from the working copy.
4054  *
4055  * - #svn_wc_status_unversioned : @a local_abspath is not versioned,
4056  * but is present on disk and not being
4057  * ignored (see above).
4058  *
4059  * The other available results for the @c text_status field are more
4060  * straightforward in their meanings. See the comments on the
4061  * #svn_wc_status_kind structure for some hints.
4062  *
4063  * @since New in 1.7.
4064  */
4065 svn_error_t *
4067  svn_wc_context_t *wc_ctx,
4068  const char *local_abspath,
4069  apr_pool_t *result_pool,
4070  apr_pool_t *scratch_pool);
4071 
4072 /** Similar to svn_wc_status3(), but with a adm_access baton and absolute
4073  * path.
4074  *
4075  * @since New in 1.2.
4076  * @deprecated Provided for backward compatibility with the 1.6 API.
4077  */
4079 svn_error_t *
4081  const char *path,
4082  svn_wc_adm_access_t *adm_access,
4083  apr_pool_t *pool);
4084 
4085 
4086 /**
4087  * Same as svn_wc_status2(), but for older svn_wc_status_t structures.
4088  *
4089  * @deprecated Provided for backward compatibility with the 1.1 API.
4090  */
4092 svn_error_t *
4094  const char *path,
4095  svn_wc_adm_access_t *adm_access,
4096  apr_pool_t *pool);
4097 
4098 
4099 
4100 
4101 /**
4102  * A callback for reporting a @a status about @a local_abspath.
4103  *
4104  * @a baton is a closure object; it should be provided by the
4105  * implementation, and passed by the caller.
4106  *
4107  * @a scratch_pool will be cleared between invocations to the callback.
4108  *
4109  * @since New in 1.7.
4110  */
4111 typedef svn_error_t *(*svn_wc_status_func4_t)(void *baton,
4112  const char *local_abspath,
4113  const svn_wc_status3_t *status,
4114  apr_pool_t *scratch_pool);
4115 
4116 /**
4117  * Same as svn_wc_status_func4_t, but with a non-const status and a relative
4118  * path.
4119  *
4120  * @since New in 1.6.
4121  * @deprecated Provided for backward compatibility with the 1.6 API.
4122  */
4123 typedef svn_error_t *(*svn_wc_status_func3_t)(void *baton,
4124  const char *path,
4125  svn_wc_status2_t *status,
4126  apr_pool_t *pool);
4127 
4128 /**
4129  * Same as svn_wc_status_func3_t, but without a provided pool or
4130  * the ability to propagate errors.
4131  *
4132  * @since New in 1.2.
4133  * @deprecated Provided for backward compatibility with the 1.5 API.
4134  */
4135 typedef void (*svn_wc_status_func2_t)(void *baton,
4136  const char *path,
4137  svn_wc_status2_t *status);
4138 
4139 /**
4140  * Same as svn_wc_status_func2_t, but for older svn_wc_status_t structures.
4141  *
4142  * @deprecated Provided for backward compatibility with the 1.1 API.
4143  */
4144 typedef void (*svn_wc_status_func_t)(void *baton,
4145  const char *path,
4146  svn_wc_status_t *status);
4147 
4148 /**
4149  * Walk the working copy status of @a local_abspath using @a wc_ctx, by
4150  * creating #svn_wc_status3_t structures and sending these through
4151  * @a status_func / @a status_baton.
4152  *
4153  * * Assuming the target is a directory, then:
4154  *
4155  * - If @a get_all is FALSE, then only locally-modified entries will be
4156  * returned. If TRUE, then all entries will be returned.
4157  *
4158  * - If @a ignore_text_mods is TRUE, then the walk will not check for
4159  * modified files. Any #svn_wc_status3_t structures returned for files
4160  * will always have a text_status field set to svn_wc_status_normal.
4161  * If @a ignore_text_mods is FALSE, the walk checks for text changes
4162  * and returns #svn_wc_status3_t structures describing any changes.
4163  *
4164  * - If @a depth is #svn_depth_empty, a status structure will
4165  * be returned for the target only; if #svn_depth_files, for the
4166  * target and its immediate file children; if
4167  * #svn_depth_immediates, for the target and its immediate
4168  * children; if #svn_depth_infinity, for the target and
4169  * everything underneath it, fully recursively.
4170  *
4171  * If @a depth is #svn_depth_unknown, take depths from the
4172  * working copy and behave as above in each directory's case.
4173  *
4174  * If the given @a depth is incompatible with the depth found in a
4175  * working copy directory, the found depth always governs.
4176  *
4177  * If @a no_ignore is set, statuses that would typically be ignored
4178  * will instead be reported.
4179  *
4180  * @a ignore_patterns is an array of file patterns matching
4181  * unversioned files to ignore for the purposes of status reporting,
4182  * or @c NULL if the default set of ignorable file patterns should be used.
4183  * Patterns from #SVN_PROP_IGNORE (and, as of 1.8,
4184  * #SVN_PROP_INHERITABLE_IGNORES) properties are always used, even if not
4185  * specified in @a ignore_patterns.
4186  *
4187  * If @a cancel_func is non-NULL, call it with @a cancel_baton while walking
4188  * to determine if the client has canceled the operation.
4189  *
4190  * This function uses @a scratch_pool for temporary allocations.
4191  *
4192  * @since New in 1.7.
4193  */
4194 svn_error_t *
4196  const char *local_abspath,
4197  svn_depth_t depth,
4198  svn_boolean_t get_all,
4199  svn_boolean_t no_ignore,
4200  svn_boolean_t ignore_text_mods,
4201  const apr_array_header_t *ignore_patterns,
4202  svn_wc_status_func4_t status_func,
4203  void *status_baton,
4204  svn_cancel_func_t cancel_func,
4205  void *cancel_baton,
4206  apr_pool_t *scratch_pool);
4207 
4208 /**
4209  * DEPRECATED -- please use APIs from svn_client.h
4210  *
4211  * ---
4212  *
4213  * Set @a *editor and @a *edit_baton to an editor that generates
4214  * #svn_wc_status3_t structures and sends them through @a status_func /
4215  * @a status_baton. @a anchor_abspath is a working copy directory
4216  * directory which will be used as the root of our editor. If @a
4217  * target_basename is not "", it represents a node in the @a anchor_abspath
4218  * which is the subject of the editor drive (otherwise, the @a
4219  * anchor_abspath is the subject).
4220  *
4221  * If @a set_locks_baton is non-@c NULL, it will be set to a baton that can
4222  * be used in a call to the svn_wc_status_set_repos_locks() function.
4223  *
4224  * Callers drive this editor to describe working copy out-of-dateness
4225  * with respect to the repository. If this information is not
4226  * available or not desired, callers should simply call the
4227  * close_edit() function of the @a editor vtable.
4228  *
4229  * If the editor driver calls @a editor's set_target_revision() vtable
4230  * function, then when the edit drive is completed, @a *edit_revision
4231  * will contain the revision delivered via that interface.
4232  *
4233  * Assuming the target is a directory, then:
4234  *
4235  * - If @a get_all is FALSE, then only locally-modified entries will be
4236  * returned. If TRUE, then all entries will be returned.
4237  *
4238  * - If @a depth is #svn_depth_empty, a status structure will
4239  * be returned for the target only; if #svn_depth_files, for the
4240  * target and its immediate file children; if
4241  * #svn_depth_immediates, for the target and its immediate
4242  * children; if #svn_depth_infinity, for the target and
4243  * everything underneath it, fully recursively.
4244  *
4245  * If @a depth is #svn_depth_unknown, take depths from the
4246  * working copy and behave as above in each directory's case.
4247  *
4248  * If the given @a depth is incompatible with the depth found in a
4249  * working copy directory, the found depth always governs.
4250  *
4251  * If @a no_ignore is set, statuses that would typically be ignored
4252  * will instead be reported.
4253  *
4254  * @a ignore_patterns is an array of file patterns matching
4255  * unversioned files to ignore for the purposes of status reporting,
4256  * or @c NULL if the default set of ignorable file patterns should be used.
4257  *
4258  * If @a cancel_func is non-NULL, call it with @a cancel_baton while building
4259  * the @a statushash to determine if the client has canceled the operation.
4260  *
4261  * If @a depth_as_sticky is set handle @a depth like when depth_is_sticky is
4262  * passed for updating. This will show excluded nodes show up as added in the
4263  * repository.
4264  *
4265  * If @a server_performs_filtering is TRUE, assume that the server handles
4266  * the ambient depth filtering, so this doesn't have to be handled in the
4267  * editor.
4268  *
4269  * Allocate the editor itself in @a result_pool, and use @a scratch_pool
4270  * for temporary allocations. The editor will do its temporary allocations
4271  * in a subpool of @a result_pool.
4272  *
4273  * @since New in 1.7.
4274  * @deprecated Provided for backward compatibility with the 1.7 API.
4275  */
4277 svn_error_t *
4279  void **edit_baton,
4280  void **set_locks_baton,
4281  svn_revnum_t *edit_revision,
4282  svn_wc_context_t *wc_ctx,
4283  const char *anchor_abspath,
4284  const char *target_basename,
4285  svn_depth_t depth,
4286  svn_boolean_t get_all,
4287  svn_boolean_t no_ignore,
4288  svn_boolean_t depth_as_sticky,
4289  svn_boolean_t server_performs_filtering,
4290  const apr_array_header_t *ignore_patterns,
4291  svn_wc_status_func4_t status_func,
4292  void *status_baton,
4293  svn_cancel_func_t cancel_func,
4294  void *cancel_baton,
4295  apr_pool_t *result_pool,
4296  apr_pool_t *scratch_pool);
4297 
4298 /**
4299  * Same as svn_wc_get_status_editor5, but using #svn_wc_status_func3_t
4300  * instead of #svn_wc_status_func4_t. And @a server_performs_filtering
4301  * always set to #TRUE.
4302  *
4303  * This also uses a single pool parameter, stating that all temporary
4304  * allocations are performed in manually constructed/destroyed subpool.
4305  *
4306  * @since New in 1.6.
4307  * @deprecated Provided for backward compatibility with the 1.6 API.
4308  */
4310 svn_error_t *
4312  void **edit_baton,
4313  void **set_locks_baton,
4314  svn_revnum_t *edit_revision,
4315  svn_wc_adm_access_t *anchor,
4316  const char *target,
4317  svn_depth_t depth,
4318  svn_boolean_t get_all,
4319  svn_boolean_t no_ignore,
4320  const apr_array_header_t *ignore_patterns,
4321  svn_wc_status_func3_t status_func,
4322  void *status_baton,
4323  svn_cancel_func_t cancel_func,
4324  void *cancel_baton,
4325  svn_wc_traversal_info_t *traversal_info,
4326  apr_pool_t *pool);
4327 
4328 /**
4329  * Same as svn_wc_get_status_editor4(), but using #svn_wc_status_func2_t
4330  * instead of #svn_wc_status_func3_t.
4331  *
4332  * @since New in 1.5.
4333  * @deprecated Provided for backward compatibility with the 1.5 API.
4334  */
4336 svn_error_t *
4338  void **edit_baton,
4339  void **set_locks_baton,
4340  svn_revnum_t *edit_revision,
4341  svn_wc_adm_access_t *anchor,
4342  const char *target,
4343  svn_depth_t depth,
4344  svn_boolean_t get_all,
4345  svn_boolean_t no_ignore,
4346  const apr_array_header_t *ignore_patterns,
4347  svn_wc_status_func2_t status_func,
4348  void *status_baton,
4349  svn_cancel_func_t cancel_func,
4350  void *cancel_baton,
4351  svn_wc_traversal_info_t *traversal_info,
4352  apr_pool_t *pool);
4353 
4354 /**
4355  * Like svn_wc_get_status_editor3(), but with @a ignore_patterns
4356  * provided from the corresponding value in @a config, and @a recurse
4357  * instead of @a depth. If @a recurse is TRUE, behave as if for
4358  * #svn_depth_infinity; else if @a recurse is FALSE, behave as if for
4359  * #svn_depth_immediates.
4360  *
4361  * @since New in 1.2.
4362  * @deprecated Provided for backward compatibility with the 1.4 API.
4363  */
4365 svn_error_t *
4367  void **edit_baton,
4368  void **set_locks_baton,
4369  svn_revnum_t *edit_revision,
4370  svn_wc_adm_access_t *anchor,
4371  const char *target,
4372  apr_hash_t *config,
4373  svn_boolean_t recurse,
4374  svn_boolean_t get_all,
4375  svn_boolean_t no_ignore,
4376  svn_wc_status_func2_t status_func,
4377  void *status_baton,
4378  svn_cancel_func_t cancel_func,
4379  void *cancel_baton,
4380  svn_wc_traversal_info_t *traversal_info,
4381  apr_pool_t *pool);
4382 
4383 /**
4384  * Same as svn_wc_get_status_editor2(), but with @a set_locks_baton set
4385  * to @c NULL, and taking a deprecated svn_wc_status_func_t argument.
4386  *
4387  * @deprecated Provided for backward compatibility with the 1.1 API.
4388  */
4390 svn_error_t *
4392  void **edit_baton,
4393  svn_revnum_t *edit_revision,
4394  svn_wc_adm_access_t *anchor,
4395  const char *target,
4396  apr_hash_t *config,
4397  svn_boolean_t recurse,
4398  svn_boolean_t get_all,
4399  svn_boolean_t no_ignore,
4400  svn_wc_status_func_t status_func,
4401  void *status_baton,
4402  svn_cancel_func_t cancel_func,
4403  void *cancel_baton,
4404  svn_wc_traversal_info_t *traversal_info,
4405  apr_pool_t *pool);
4406 
4407 
4408 /**
4409  * Associate @a locks, a hash table mapping <tt>const char*</tt>
4410  * absolute repository paths to <tt>svn_lock_t</tt> objects, with a
4411  * @a set_locks_baton returned by an earlier call to
4412  * svn_wc_get_status_editor3(). @a repos_root is the repository root URL.
4413  * Perform all allocations in @a pool.
4414  *
4415  * @note @a locks will not be copied, so it must be valid throughout the
4416  * edit. @a pool must also not be destroyed or cleared before the edit is
4417  * finished.
4418  *
4419  * @since New in 1.2.
4420  */
4421 svn_error_t *
4422 svn_wc_status_set_repos_locks(void *set_locks_baton,
4423  apr_hash_t *locks,
4424  const char *repos_root,
4425  apr_pool_t *pool);
4426 
4427 /** @} */
4428 
4429 
4430 /**
4431  * Copy @a src_abspath to @a dst_abspath, and schedule @a dst_abspath
4432  * for addition to the repository, remembering the copy history. @a wc_ctx
4433  * is used for accessing the working copy and must contain a write lock for
4434  * the parent directory of @a dst_abspath,
4435  *
4436  * If @a metadata_only is TRUE then this is a database-only operation and
4437  * the working directories and files are not copied.
4438  *
4439  * @a src_abspath must be a file or directory under version control;
4440  * the parent of @a dst_abspath must be a directory under version control
4441  * in the same working copy; @a dst_abspath will be the name of the copied
4442  * item, and it must not exist already if @a metadata_only is FALSE. Note that
4443  * when @a src points to a versioned file, the working file doesn't
4444  * necessarily exist in which case its text-base is used instead.
4445  *
4446  * If @a cancel_func is non-NULL, call it with @a cancel_baton at
4447  * various points during the operation. If it returns an error
4448  * (typically #SVN_ERR_CANCELLED), return that error immediately.
4449  *
4450  * If @a notify_func is non-NULL, call it with @a notify_baton and the path
4451  * of the root node (only) of the destination.
4452  *
4453  * Use @a scratch_pool for temporary allocations.
4454  *
4455  * @since New in 1.7.
4456  */
4457 svn_error_t *
4459  const char *src_abspath,
4460  const char *dst_abspath,
4461  svn_boolean_t metadata_only,
4462  svn_cancel_func_t cancel_func,
4463  void *cancel_baton,
4464  svn_wc_notify_func2_t notify_func,
4465  void *notify_baton,
4466  apr_pool_t *scratch_pool);
4467 
4468 /** Similar to svn_wc_copy3(), but takes access batons and a relative path
4469  * and a basename instead of absolute paths and a working copy context.
4470  *
4471  * @since New in 1.2.
4472  * @deprecated Provided for backward compatibility with the 1.6 API.
4473  */
4475 svn_error_t *
4476 svn_wc_copy2(const char *src,
4477  svn_wc_adm_access_t *dst_parent,
4478  const char *dst_basename,
4479  svn_cancel_func_t cancel_func,
4480  void *cancel_baton,
4481  svn_wc_notify_func2_t notify_func,
4482  void *notify_baton,
4483  apr_pool_t *pool);
4484 
4485 /**
4486  * Similar to svn_wc_copy2(), but takes an #svn_wc_notify_func_t instead.
4487  *
4488  * @deprecated Provided for backward compatibility with the 1.1 API.
4489  */
4491 svn_error_t *
4492 svn_wc_copy(const char *src,
4493  svn_wc_adm_access_t *dst_parent,
4494  const char *dst_basename,
4495  svn_cancel_func_t cancel_func,
4496  void *cancel_baton,
4497  svn_wc_notify_func_t notify_func,
4498  void *notify_baton,
4499  apr_pool_t *pool);
4500 
4501 /**
4502  * Move @a src_abspath to @a dst_abspath, by scheduling @a dst_abspath
4503  * for addition to the repository, remembering the history. Mark @a src_abspath
4504  * as deleted after moving.@a wc_ctx is used for accessing the working copy and
4505  * must contain a write lock for the parent directory of @a src_abspath and
4506  * @a dst_abspath.
4507  *
4508  * If @a metadata_only is TRUE then this is a database-only operation and
4509  * the working directories and files are not changed.
4510  *
4511  * @a src_abspath must be a file or directory under version control;
4512  * the parent of @a dst_abspath must be a directory under version control
4513  * in the same working copy; @a dst_abspath will be the name of the copied
4514  * item, and it must not exist already if @a metadata_only is FALSE. Note that
4515  * when @a src points to a versioned file, the working file doesn't
4516  * necessarily exist in which case its text-base is used instead.
4517  *
4518  * If @a cancel_func is non-NULL, call it with @a cancel_baton at
4519  * various points during the operation. If it returns an error
4520  * (typically #SVN_ERR_CANCELLED), return that error immediately.
4521  *
4522  * If @a notify_func is non-NULL, call it with @a notify_baton and the path
4523  * of the root node (only) of the destination.
4524  *
4525  * Use @a scratch_pool for temporary allocations.
4526  *
4527  * @since New in 1.7.
4528  * @deprecated Provided for backward compatibility with the 1.7 API.
4529  * @see svn_client_move7()
4530  */
4532 svn_error_t *
4534  const char *src_abspath,
4535  const char *dst_abspath,
4536  svn_boolean_t metadata_only,
4537  svn_cancel_func_t cancel_func,
4538  void *cancel_baton,
4539  svn_wc_notify_func2_t notify_func,
4540  void *notify_baton,
4541  apr_pool_t *scratch_pool);
4542 
4543 /**
4544  * Schedule @a local_abspath for deletion. It will be deleted from the
4545  * repository on the next commit. If @a local_abspath refers to a
4546  * directory, then a recursive deletion will occur. @a wc_ctx must hold
4547  * a write lock for the parent of @a local_abspath, @a local_abspath itself
4548  * and everything below @a local_abspath.
4549  *
4550  * If @a keep_local is FALSE, this function immediately deletes all files,
4551  * modified and unmodified, versioned and of @a delete_unversioned is TRUE,
4552  * unversioned from the working copy.
4553  * It also immediately deletes unversioned directories and directories that
4554  * are scheduled to be added below @a local_abspath. Only versioned may
4555  * remain in the working copy, these get deleted by the update following
4556  * the commit.
4557  *
4558  * If @a keep_local is TRUE, all files and directories will be kept in the
4559  * working copy (and will become unversioned on the next commit).
4560  *
4561  * If @a delete_unversioned_target is TRUE and @a local_abspath is not
4562  * versioned, @a local_abspath will be handled as an added files without
4563  * history. So it will be deleted if @a keep_local is FALSE. If @a
4564  * delete_unversioned is FALSE and @a local_abspath is not versioned a
4565  * #SVN_ERR_WC_PATH_NOT_FOUND error will be returned.
4566  *
4567  * If @a cancel_func is non-NULL, call it with @a cancel_baton at
4568  * various points during the operation. If it returns an error
4569  * (typically #SVN_ERR_CANCELLED), return that error immediately.
4570  *
4571  * For each path marked for deletion, @a notify_func will be called with
4572  * the @a notify_baton and that path. The @a notify_func callback may be
4573  * @c NULL if notification is not needed.
4574  *
4575  * Use @a scratch_pool for temporary allocations. It may be cleared
4576  * immediately upon returning from this function.
4577  *
4578  * @since New in 1.7.
4579  */
4580  /* ### BH: Maybe add a delete_switched flag that allows deny switched
4581  nodes like file externals? */
4582 svn_error_t *
4584  const char *local_abspath,
4585  svn_boolean_t keep_local,
4586  svn_boolean_t delete_unversioned_target,
4587  svn_cancel_func_t cancel_func,
4588  void *cancel_baton,
4589  svn_wc_notify_func2_t notify_func,
4590  void *notify_baton,
4591  apr_pool_t *scratch_pool);
4592 
4593 /**
4594  * Similar to svn_wc_delete4, but uses an access baton and relative path
4595  * instead of a working copy context and absolute path. @a adm_access
4596  * must hold a write lock for the parent of @a path.
4597  *
4598  * @c delete_unversioned_target will always be set to TRUE.
4599  *
4600  * @since New in 1.5.
4601  * @deprecated Provided for backward compatibility with the 1.6 API.
4602  */
4604 svn_error_t *
4605 svn_wc_delete3(const char *path,
4606  svn_wc_adm_access_t *adm_access,
4607  svn_cancel_func_t cancel_func,
4608  void *cancel_baton,
4609  svn_wc_notify_func2_t notify_func,
4610  void *notify_baton,
4611  svn_boolean_t keep_local,
4612  apr_pool_t *pool);
4613 
4614 /**
4615  * Similar to svn_wc_delete3(), but with @a keep_local always set to FALSE.
4616  *
4617  * @deprecated Provided for backward compatibility with the 1.4 API.
4618  */
4620 svn_error_t *
4621 svn_wc_delete2(const char *path,
4622  svn_wc_adm_access_t *adm_access,
4623  svn_cancel_func_t cancel_func,
4624  void *cancel_baton,
4625  svn_wc_notify_func2_t notify_func,
4626  void *notify_baton,
4627  apr_pool_t *pool);
4628 
4629 /**
4630  * Similar to svn_wc_delete2(), but takes an #svn_wc_notify_func_t instead.
4631  *
4632  * @deprecated Provided for backward compatibility with the 1.1 API.
4633  */
4635 svn_error_t *
4636 svn_wc_delete(const char *path,
4637  svn_wc_adm_access_t *adm_access,
4638  svn_cancel_func_t cancel_func,
4639  void *cancel_baton,
4640  svn_wc_notify_func_t notify_func,
4641  void *notify_baton,
4642  apr_pool_t *pool);
4643 
4644 
4645 /**
4646  * Schedule the single node that exists on disk at @a local_abspath for
4647  * addition to the working copy. The added node will have the properties
4648  * provided in @a props, or none if that is NULL.
4649  *
4650  * Unless @a skip_checks is TRUE, check and canonicalize the properties in the
4651  * same way as svn_wc_prop_set4(). Return an error and don't add the node if
4652  * the properties are not valid on this node.
4653  *
4654  * ### The error code on validity check failure should be specified, and
4655  * preferably should be a single code.
4656  *
4657  * The versioned state of the parent path must be a modifiable directory,
4658  * and the versioned state of @a local_abspath must be either nonexistent or
4659  * deleted; if deleted, the new node will be a replacement.
4660  *
4661  * If @a local_abspath does not exist as file, directory or symlink, return
4662  * #SVN_ERR_WC_PATH_NOT_FOUND.
4663  *
4664  * If @a notify_func is non-NULL, invoke it with @a notify_baton to report
4665  * the item being added.
4666  *
4667  * ### TODO: Split into add_dir, add_file, add_symlink?
4668  *
4669  * @since New in 1.9.
4670  */
4671 svn_error_t *
4673  const char *local_abspath,
4674  const apr_hash_t *props,
4675  svn_boolean_t skip_checks,
4676  svn_wc_notify_func2_t notify_func,
4677  void *notify_baton,
4678  apr_pool_t *scratch_pool);
4679 
4680 /**
4681  * Similar to svn_wc_add_from_disk3(), but always passes FALSE for
4682  * @a skip_checks
4683  *
4684  * @since New in 1.8.
4685  * @deprecated Provided for backward compatibility with the 1.8 API.
4686  */
4688 svn_error_t *
4690  const char *local_abspath,
4691  const apr_hash_t *props,
4692  svn_wc_notify_func2_t notify_func,
4693  void *notify_baton,
4694  apr_pool_t *scratch_pool);
4695 
4696 
4697 /**
4698  * Similar to svn_wc_add_from_disk2(), but always passes NULL for @a
4699  * props.
4700  *
4701  * This is a replacement for svn_wc_add4() case 2a (which see for
4702  * details).
4703 
4704  * @see svn_wc_add4()
4705  *
4706  * @since New in 1.7.
4707  * @deprecated Provided for backward compatibility with the 1.7 API.
4708  */
4710 svn_error_t *
4712  const char *local_abspath,
4713  svn_wc_notify_func2_t notify_func,
4714  void *notify_baton,
4715  apr_pool_t *scratch_pool);
4716 
4717 
4718 /**
4719  * Put @a local_abspath under version control by registering it as addition
4720  * or copy in the database containing its parent. The new node is scheduled
4721  * for addition to the repository below its parent node.
4722  *
4723  * 1) If the node is already versioned, it MUST BE the root of a separate
4724  * working copy from the same repository as the parent WC. The new node
4725  * and anything below it will be scheduled for addition inside the parent
4726  * working copy as a copy of the original location. The separate working
4727  * copy will be integrated by this step. In this case, which is only used
4728  * by code like that of "svn cp URL@rev path" @a copyfrom_url and
4729  * @a copyfrom_rev MUST BE the url and revision of @a local_abspath
4730  * in the separate working copy.
4731  *
4732  * 2a) If the node was not versioned before it will be scheduled as a local
4733  * addition or 2b) if @a copyfrom_url and @a copyfrom_rev are set as a copy
4734  * of that location. In this last case the function doesn't set the pristine
4735  * version (of a file) and/or pristine properties, which callers should
4736  * handle via different APIs. Usually it is easier to call
4737  * svn_wc_add_repos_file4() (### or a possible svn_wc_add_repos_dir()) than
4738  * using this variant.
4739  *
4740  * If @a local_abspath does not exist as file, directory or symlink, return
4741  * #SVN_ERR_WC_PATH_NOT_FOUND.
4742  *
4743  * If @a local_abspath is an unversioned directory, record @a depth on it;
4744  * otherwise, ignore @a depth. (Use #svn_depth_infinity unless you exactly
4745  * know what you are doing, or you may create an unexpected sparse working
4746  * copy)
4747  *
4748  * If @a cancel_func is non-NULL, call it with @a cancel_baton at
4749  * various points during the operation. If it returns an error
4750  * (typically #SVN_ERR_CANCELLED), return that error immediately.
4751  *
4752  * When the @a local_abspath has been added, then @a notify_func will be
4753  * called (if it is not @c NULL) with the @a notify_baton and the path.
4754  *
4755  * @note Case 1 is deprecated. Consider doing a WC-to-WC copy instead.
4756  * @note For case 2a, prefer svn_wc_add_from_disk().
4757  *
4758  * @since New in 1.7.
4759  */
4760 svn_error_t *
4762  const char *local_abspath,
4763  svn_depth_t depth,
4764  const char *copyfrom_url,
4765  svn_revnum_t copyfrom_rev,
4766  svn_cancel_func_t cancel_func,
4767  void *cancel_baton,
4768  svn_wc_notify_func2_t notify_func,
4769  void *notify_baton,
4770  apr_pool_t *scratch_pool);
4771 
4772 /**
4773  * Similar to svn_wc_add4(), but with an access baton
4774  * and relative path instead of a context and absolute path.
4775  * @since New in 1.6.
4776  * @deprecated Provided for backward compatibility with the 1.6 API.
4777  */
4779 svn_error_t *
4780 svn_wc_add3(const char *path,
4781  svn_wc_adm_access_t *parent_access,
4782  svn_depth_t depth,
4783  const char *copyfrom_url,
4784  svn_revnum_t copyfrom_rev,
4785  svn_cancel_func_t cancel_func,
4786  void *cancel_baton,
4787  svn_wc_notify_func2_t notify_func,
4788  void *notify_baton,
4789  apr_pool_t *pool);
4790 
4791 /**
4792  * Similar to svn_wc_add3(), but with the @a depth parameter always
4793  * #svn_depth_infinity.
4794  *
4795  * @since New in 1.2.
4796  * @deprecated Provided for backward compatibility with the 1.5 API.
4797  */
4799 svn_error_t *
4800 svn_wc_add2(const char *path,
4801  svn_wc_adm_access_t *parent_access,
4802  const char *copyfrom_url,
4803  svn_revnum_t copyfrom_rev,
4804  svn_cancel_func_t cancel_func,
4805  void *cancel_baton,
4806  svn_wc_notify_func2_t notify_func,
4807  void *notify_baton,
4808  apr_pool_t *pool);
4809 
4810 /**
4811  * Similar to svn_wc_add2(), but takes an #svn_wc_notify_func_t instead.
4812  *
4813  * @deprecated Provided for backward compatibility with the 1.1 API.
4814  */
4816 svn_error_t *
4817 svn_wc_add(const char *path,
4818  svn_wc_adm_access_t *parent_access,
4819  const char *copyfrom_url,
4820  svn_revnum_t copyfrom_rev,
4821  svn_cancel_func_t cancel_func,
4822  void *cancel_baton,
4823  svn_wc_notify_func_t notify_func,
4824  void *notify_baton,
4825  apr_pool_t *pool);
4826 
4827 /** Add a file to a working copy at @a local_abspath, obtaining the
4828  * text-base's contents from @a new_base_contents, the wc file's
4829  * content from @a new_contents, its unmodified properties from @a
4830  * new_base_props and its actual properties from @a new_props. Use
4831  * @a wc_ctx for accessing the working copy.
4832  *
4833  * The unmodified text and props normally come from the repository
4834  * file represented by the copyfrom args, see below. The new file
4835  * will be marked as copy.
4836  *
4837  * @a new_contents and @a new_props may be NULL, in which case
4838  * the working copy text and props are taken from the base files with
4839  * appropriate translation of the file's content.
4840  *
4841  * @a new_contents must be provided in Normal Form. This is required
4842  * in order to pass both special and non-special files through a stream.
4843  *
4844  * @a wc_ctx must contain a write lock for the parent of @a local_abspath.
4845  *
4846  * If @a copyfrom_url is non-NULL, then @a copyfrom_rev must be a
4847  * valid revision number, and together they are the copyfrom history
4848  * for the new file.
4849  *
4850  * The @a cancel_func and @a cancel_baton are a standard cancellation
4851  * callback, or NULL if no callback is needed. @a notify_func and
4852  * @a notify_baton are a notification callback, and (if not NULL)
4853  * will be notified of the addition of this file.
4854  *
4855  * Use @a scratch_pool for temporary allocations.
4856  *
4857  * ### This function is very redundant with svn_wc_add(). Ideally,
4858  * we'd merge them, so that svn_wc_add() would just take optional
4859  * new_props and optional copyfrom information. That way it could be
4860  * used for both 'svn add somefilesittingonmydisk' and for adding
4861  * files from repositories, with or without copyfrom history.
4862  *
4863  * The problem with this Ideal Plan is that svn_wc_add() also takes
4864  * care of recursive URL-rewriting. There's a whole comment in its
4865  * doc string about how that's really weird, outside its core mission,
4866  * etc, etc. So another part of the Ideal Plan is that that
4867  * functionality of svn_wc_add() would move into a separate function.
4868  *
4869  * @since New in 1.7.
4870  */
4871 svn_error_t *
4873  const char *local_abspath,
4874  svn_stream_t *new_base_contents,
4875  svn_stream_t *new_contents,
4876  apr_hash_t *new_base_props,
4877  apr_hash_t *new_props,
4878  const char *copyfrom_url,
4879  svn_revnum_t copyfrom_rev,
4880  svn_cancel_func_t cancel_func,
4881  void *cancel_baton,
4882  apr_pool_t *scratch_pool);
4883 
4884 /** Similar to svn_wc_add_repos_file4, but uses access batons and a
4885  * relative path instead of a working copy context and absolute path.
4886  *
4887  * ### NOTE: the notification callback/baton is not yet used.
4888  *
4889  * @since New in 1.6.
4890  * @deprecated Provided for compatibility with the 1.6 API.
4891  */
4893 svn_error_t *
4894 svn_wc_add_repos_file3(const char *dst_path,
4895  svn_wc_adm_access_t *adm_access,
4896  svn_stream_t *new_base_contents,
4897  svn_stream_t *new_contents,
4898  apr_hash_t *new_base_props,
4899  apr_hash_t *new_props,
4900  const char *copyfrom_url,
4901  svn_revnum_t copyfrom_rev,
4902  svn_cancel_func_t cancel_func,
4903  void *cancel_baton,
4904  svn_wc_notify_func2_t notify_func,
4905  void *notify_baton,
4906  apr_pool_t *scratch_pool);
4907 
4908 
4909 /** Same as svn_wc_add_repos_file3(), except that it has pathnames rather
4910  * than streams for the text base, and actual text, and has no cancellation.
4911  *
4912  * @since New in 1.4.
4913  * @deprecated Provided for compatibility with the 1.5 API
4914  */
4916 svn_error_t *
4917 svn_wc_add_repos_file2(const char *dst_path,
4918  svn_wc_adm_access_t *adm_access,
4919  const char *new_text_base_path,
4920  const char *new_text_path,
4921  apr_hash_t *new_base_props,
4922  apr_hash_t *new_props,
4923  const char *copyfrom_url,
4924  svn_revnum_t copyfrom_rev,
4925  apr_pool_t *pool);
4926 
4927 /** Same as svn_wc_add_repos_file3(), except that it doesn't have the
4928  * BASE arguments or cancellation.
4929  *
4930  * @deprecated Provided for compatibility with the 1.3 API
4931  */
4933 svn_error_t *
4934 svn_wc_add_repos_file(const char *dst_path,
4935  svn_wc_adm_access_t *adm_access,
4936  const char *new_text_path,
4937  apr_hash_t *new_props,
4938  const char *copyfrom_url,
4939  svn_revnum_t copyfrom_rev,
4940  apr_pool_t *pool);
4941 
4942 
4943 /** Remove @a local_abspath from revision control. @a wc_ctx must
4944  * hold a write lock on the parent of @a local_abspath, or if that is a
4945  * WC root then on @a local_abspath itself.
4946  *
4947  * If @a local_abspath is a file, all its info will be removed from the
4948  * administrative area. If @a local_abspath is a directory, then the
4949  * administrative area will be deleted, along with *all* the administrative
4950  * areas anywhere in the tree below @a adm_access.
4951  *
4952  * Normally, only administrative data is removed. However, if
4953  * @a destroy_wf is TRUE, then all working file(s) and dirs are deleted
4954  * from disk as well. When called with @a destroy_wf, any locally
4955  * modified files will *not* be deleted, and the special error
4956  * #SVN_ERR_WC_LEFT_LOCAL_MOD might be returned. (Callers only need to
4957  * check for this special return value if @a destroy_wf is TRUE.)
4958  *
4959  * If @a instant_error is TRUE, then return
4960  * #SVN_ERR_WC_LEFT_LOCAL_MOD the instant a locally modified file is
4961  * encountered. Otherwise, leave locally modified files in place and
4962  * return the error only after all the recursion is complete.
4963  *
4964  * If @a cancel_func is non-NULL, call it with @a cancel_baton at
4965  * various points during the removal. If it returns an error
4966  * (typically #SVN_ERR_CANCELLED), return that error immediately.
4967  *
4968  * WARNING: This routine is exported for careful, measured use by
4969  * libsvn_client. Do *not* call this routine unless you really
4970  * understand what the heck you're doing.
4971  *
4972  * @since New in 1.7.
4973  */
4974 svn_error_t *
4976  const char *local_abspath,
4977  svn_boolean_t destroy_wf,
4978  svn_boolean_t instant_error,
4979  svn_cancel_func_t cancel_func,
4980  void *cancel_baton,
4981  apr_pool_t *pool);
4982 
4983 /**
4984  * Similar to svn_wc_remove_from_revision_control2() but with a name
4985  * and access baton.
4986  *
4987  * WARNING: This routine was exported for careful, measured use by
4988  * libsvn_client. Do *not* call this routine unless you really
4989  * understand what the heck you're doing.
4990  *
4991  * @deprecated Provided for compatibility with the 1.6 API
4992  */
4994 svn_error_t *
4996  const char *name,
4997  svn_boolean_t destroy_wf,
4998  svn_boolean_t instant_error,
4999  svn_cancel_func_t cancel_func,
5000  void *cancel_baton,
5001  apr_pool_t *pool);
5002 
5003 
5004 /**
5005  * Assuming @a local_abspath is under version control or a tree conflict
5006  * victim and in a state of conflict, then take @a local_abspath *out*
5007  * of this state. If @a resolve_text is TRUE then any text conflict is
5008  * resolved, if @a resolve_tree is TRUE then any tree conflicts are
5009  * resolved. If @a resolve_prop is set to "" all property conflicts are
5010  * resolved, if it is set to any other string value, conflicts on that
5011  * specific property are resolved and when resolve_prop is NULL, no
5012  * property conflicts are resolved.
5013  *
5014  * If @a depth is #svn_depth_empty, act only on @a local_abspath; if
5015  * #svn_depth_files, resolve @a local_abspath and its conflicted file
5016  * children (if any); if #svn_depth_immediates, resolve @a local_abspath
5017  * and all its immediate conflicted children (both files and directories,
5018  * if any); if #svn_depth_infinity, resolve @a local_abspath and every
5019  * conflicted file or directory anywhere beneath it.
5020  *
5021  * If @a conflict_choice is #svn_wc_conflict_choose_base, resolve the
5022  * conflict with the old file contents; if
5023  * #svn_wc_conflict_choose_mine_full, use the original working contents;
5024  * if #svn_wc_conflict_choose_theirs_full, the new contents; and if
5025  * #svn_wc_conflict_choose_merged, don't change the contents at all,
5026  * just remove the conflict status, which is the pre-1.5 behavior.
5027  *
5028  * #svn_wc_conflict_choose_theirs_conflict and
5029  * #svn_wc_conflict_choose_mine_conflict are not legal for binary
5030  * files or properties.
5031  *
5032  * @a wc_ctx is a working copy context, with a write lock, for @a
5033  * local_abspath.
5034  *
5035  * Needless to say, this function doesn't touch conflict markers or
5036  * anything of that sort -- only a human can semantically resolve a
5037  * conflict. Instead, this function simply marks a file as "having
5038  * been resolved", clearing the way for a commit.
5039  *
5040  * The implementation details are opaque, as our "conflicted" criteria
5041  * might change over time. (At the moment, this routine removes the
5042  * three fulltext 'backup' files and any .prej file created in a conflict,
5043  * and modifies @a local_abspath's entry.)
5044  *
5045  * If @a local_abspath is not under version control and not a tree
5046  * conflict, return #SVN_ERR_ENTRY_NOT_FOUND. If @a path isn't in a
5047  * state of conflict to begin with, do nothing, and return #SVN_NO_ERROR.
5048  *
5049  * If @c local_abspath was successfully taken out of a state of conflict,
5050  * report this information to @c notify_func (if non-@c NULL.) If only
5051  * text, only property, or only tree conflict resolution was requested,
5052  * and it was successful, then success gets reported.
5053  *
5054  * Temporary allocations will be performed in @a scratch_pool.
5055  *
5056  * @since New in 1.7.
5057  */
5058 svn_error_t *
5060  const char *local_abspath,
5061  svn_depth_t depth,
5062  svn_boolean_t resolve_text,
5063  const char *resolve_prop,
5064  svn_boolean_t resolve_tree,
5065  svn_wc_conflict_choice_t conflict_choice,
5066  svn_cancel_func_t cancel_func,
5067  void *cancel_baton,
5068  svn_wc_notify_func2_t notify_func,
5069  void *notify_baton,
5070  apr_pool_t *scratch_pool);
5071 
5072 /** Similar to svn_wc_resolved_conflict5, but takes an absolute path
5073  * and an access baton. This version doesn't support resolving a specific
5074  * property.conflict.
5075  *
5076  * @since New in 1.6.
5077  * @deprecated Provided for backward compatibility with the 1.6 API.
5078  */
5080 svn_error_t *
5081 svn_wc_resolved_conflict4(const char *path,
5082  svn_wc_adm_access_t *adm_access,
5083  svn_boolean_t resolve_text,
5084  svn_boolean_t resolve_props,
5085  svn_boolean_t resolve_tree,
5086  svn_depth_t depth,
5087  svn_wc_conflict_choice_t conflict_choice,
5088  svn_wc_notify_func2_t notify_func,
5089  void *notify_baton,
5090  svn_cancel_func_t cancel_func,
5091  void *cancel_baton,
5092  apr_pool_t *pool);
5093 
5094 
5095 /**
5096  * Similar to svn_wc_resolved_conflict4(), but without tree-conflict
5097  * resolution support.
5098  *
5099  * @since New in 1.5.
5100  * @deprecated Provided for backward compatibility with the 1.5 API.
5101  */
5103 svn_error_t *
5104 svn_wc_resolved_conflict3(const char *path,
5105  svn_wc_adm_access_t *adm_access,
5106  svn_boolean_t resolve_text,
5107  svn_boolean_t resolve_props,
5108  svn_depth_t depth,
5109  svn_wc_conflict_choice_t conflict_choice,
5110  svn_wc_notify_func2_t notify_func,
5111  void *notify_baton,
5112  svn_cancel_func_t cancel_func,
5113  void *cancel_baton,
5114  apr_pool_t *pool);
5115 
5116 
5117 /**
5118  * Similar to svn_wc_resolved_conflict3(), but without automatic conflict
5119  * resolution support, and with @a depth set according to @a recurse:
5120  * if @a recurse is TRUE, @a depth is #svn_depth_infinity, else it is
5121  * #svn_depth_files.
5122  *
5123  * @since New in 1.2.
5124  * @deprecated Provided for backward compatibility with the 1.4 API.
5125  */
5127 svn_error_t *
5128 svn_wc_resolved_conflict2(const char *path,
5129  svn_wc_adm_access_t *adm_access,
5130  svn_boolean_t resolve_text,
5131  svn_boolean_t resolve_props,
5132  svn_boolean_t recurse,
5133  svn_wc_notify_func2_t notify_func,
5134  void *notify_baton,
5135  svn_cancel_func_t cancel_func,
5136  void *cancel_baton,
5137  apr_pool_t *pool);
5138 
5139 /**
5140  * Similar to svn_wc_resolved_conflict2(), but takes an
5141  * svn_wc_notify_func_t and doesn't have cancellation support.
5142  *
5143  * @deprecated Provided for backward compatibility with the 1.1 API.
5144  */
5146 svn_error_t *
5147 svn_wc_resolved_conflict(const char *path,
5148  svn_wc_adm_access_t *adm_access,
5149  svn_boolean_t resolve_text,
5150  svn_boolean_t resolve_props,
5151  svn_boolean_t recurse,
5152  svn_wc_notify_func_t notify_func,
5153  void *notify_baton,
5154  apr_pool_t *pool);
5155 
5156 
5157 /* Commits. */
5158 
5159 
5160 /**
5161  * Storage type for queued post-commit data.
5162  *
5163  * @since New in 1.5.
5164  */
5166 
5167 
5168 /**
5169  * Create a queue for use with svn_wc_queue_committed() and
5170  * svn_wc_process_committed_queue().
5171  *
5172  * The returned queue and all further allocations required for queuing
5173  * new items will also be done from @a pool.
5174  *
5175  * @since New in 1.5.
5176  */
5178 svn_wc_committed_queue_create(apr_pool_t *pool);
5179 
5180 
5181 /**
5182  * Queue committed items to be processed later by
5183  * svn_wc_process_committed_queue2().
5184  *
5185  * Record in @a queue that @a local_abspath will need to be bumped
5186  * after a commit succeeds.
5187  *
5188  * If non-NULL, @a wcprop_changes is an array of <tt>svn_prop_t *</tt>
5189  * changes to wc properties; if an #svn_prop_t->value is NULL, then
5190  * that property is deleted.
5191  * ### [JAF] No, a prop whose value is NULL is ignored, not deleted. This
5192  * ### seems to be not a set of changes but rather the new complete set of
5193  * ### props. And it's renamed to 'new_dav_cache' inside; why?
5194  *
5195  * If @a is_committed is @c TRUE, the node will be processed as committed. This
5196  * turns the node and its implied descendants as the new unmodified state at
5197  * the new specified revision. Unless @a recurse is TRUE, changes on
5198  * descendants are not committed as changes directly. In this case they should
5199  * be queueud as their own changes.
5200  *
5201  * If @a remove_lock is @c TRUE, any entryprops related to a repository
5202  * lock will be removed.
5203  *
5204  * If @a remove_changelist is @c TRUE, any association with a
5205  * changelist will be removed.
5206  *
5207  *
5208  * If @a sha1_checksum is non-NULL, use it to identify the node's pristine
5209  * text.
5210  *
5211  * If @a recurse is TRUE and @a local_abspath is a directory, then bump every
5212  * versioned object at or under @a local_abspath. This is usually done for
5213  * copied trees.
5214  *
5215  * ### In the present implementation, if a recursive directory item is in
5216  * the queue, then any children (at any depth) of that directory that
5217  * are also in the queue as separate items will get:
5218  * 'wcprop_changes' = NULL;
5219  * 'remove_lock' = FALSE;
5220  * 'remove_changelist' from the recursive parent item;
5221  * and any children (at any depth) of that directory that are NOT in
5222  * the queue as separate items will get:
5223  * 'wcprop_changes' = NULL;
5224  * 'remove_lock' = FALSE;
5225  * 'remove_changelist' from the recursive parent item;
5226  *
5227  * @note the @a recurse parameter should be used with extreme care since
5228  * it will bump ALL nodes under the directory, regardless of their
5229  * actual inclusion in the new revision.
5230  *
5231  * All pointer data passed to this function (@a local_abspath,
5232  * @a wcprop_changes and the checksums) should remain valid until the
5233  * queue has been processed by svn_wc_process_committed_queue2().
5234  *
5235  * Temporary allocations will be performed in @a scratch_pool, and persistent
5236  * allocations will use the same pool as @a queue used when it was created.
5237  *
5238  * @since New in 1.9.
5239  */
5240 svn_error_t *
5242  svn_wc_context_t *wc_ctx,
5243  const char *local_abspath,
5244  svn_boolean_t recurse,
5245  svn_boolean_t is_committed,
5246  const apr_array_header_t *wcprop_changes,
5247  svn_boolean_t remove_lock,
5248  svn_boolean_t remove_changelist,
5249  const svn_checksum_t *sha1_checksum,
5250  apr_pool_t *scratch_pool);
5251 
5252 /** Similar to svn_wc_queue_committed4, but with is_committed always
5253  * TRUE.
5254  *
5255  * @since New in 1.7.
5256  * @deprecated Provided for backwards compatibility with the 1.8 API.
5257  */
5258 svn_error_t *
5260  svn_wc_context_t *wc_ctx,
5261  const char *local_abspath,
5262  svn_boolean_t recurse,
5263  const apr_array_header_t *wcprop_changes,
5264  svn_boolean_t remove_lock,
5265  svn_boolean_t remove_changelist,
5266  const svn_checksum_t *sha1_checksum,
5267  apr_pool_t *scratch_pool);
5268 
5269 /** Same as svn_wc_queue_committed3() except @a path doesn't have to be an
5270  * abspath and @a adm_access is unused and a SHA-1 checksum cannot be
5271  * specified.
5272  *
5273  * @since New in 1.6.
5274  *
5275  * @deprecated Provided for backwards compatibility with the 1.6 API.
5276  */
5278 svn_error_t *
5280  const char *path,
5281  svn_wc_adm_access_t *adm_access,
5282  svn_boolean_t recurse,
5283  const apr_array_header_t *wcprop_changes,
5284  svn_boolean_t remove_lock,
5285  svn_boolean_t remove_changelist,
5286  const svn_checksum_t *md5_checksum,
5287  apr_pool_t *scratch_pool);
5288 
5289 
5290 /** Same as svn_wc_queue_committed2() but the @a queue parameter has an
5291  * extra indirection and @a digest is supplied instead of a checksum type.
5292  *
5293  * @note despite the extra indirection, this function does NOT allocate
5294  * the queue for you. svn_wc_committed_queue_create() must be called.
5295  *
5296  * @since New in 1.5
5297  *
5298  * @deprecated Provided for backwards compatibility with 1.5
5299  */
5301 svn_error_t *
5303  const char *path,
5304  svn_wc_adm_access_t *adm_access,
5305  svn_boolean_t recurse,
5306  const apr_array_header_t *wcprop_changes,
5307  svn_boolean_t remove_lock,
5308  svn_boolean_t remove_changelist,
5309  const unsigned char *digest,
5310  apr_pool_t *pool);
5311 
5312 
5313 /**
5314  * Bump all items in @a queue to @a new_revnum after a commit succeeds.
5315  * @a rev_date and @a rev_author are the (server-side) date and author
5316  * of the new revision; one or both may be @c NULL.
5317  *
5318  * If @a cancel_func is non-NULL, call it with @a cancel_baton to determine
5319  * if the client wants to cancel the operation.
5320  *
5321  * @since New in 1.7.
5322  */
5323 svn_error_t *
5325  svn_wc_context_t *wc_ctx,
5326  svn_revnum_t new_revnum,
5327  const char *rev_date,
5328  const char *rev_author,
5329  svn_cancel_func_t cancel_func,
5330  void *cancel_baton,
5331  apr_pool_t *scratch_pool);
5332 
5333 /** @see svn_wc_process_committed_queue2()
5334  *
5335  * @since New in 1.5.
5336  * @deprecated Provided for backwards compatibility with the 1.6 API.
5337  */
5339 svn_error_t *
5341  svn_wc_adm_access_t *adm_access,
5342  svn_revnum_t new_revnum,
5343  const char *rev_date,
5344  const char *rev_author,
5345  apr_pool_t *pool);
5346 
5347 
5348 /**
5349  * @note this function has improper expectations around the operation and
5350  * execution of other parts of the Subversion WC library. The resulting
5351  * coupling makes this interface near-impossible to support. Documentation
5352  * has been removed, as a result.
5353  *
5354  * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided
5355  * for backwards compatibility with the 1.5 API.
5356  */
5358 svn_error_t *
5359 svn_wc_process_committed4(const char *path,
5360  svn_wc_adm_access_t *adm_access,
5361  svn_boolean_t recurse,
5362  svn_revnum_t new_revnum,
5363  const char *rev_date,
5364  const char *rev_author,
5365  const apr_array_header_t *wcprop_changes,
5366  svn_boolean_t remove_lock,
5367  svn_boolean_t remove_changelist,
5368  const unsigned char *digest,
5369  apr_pool_t *pool);
5370 
5371 /** @see svn_wc_process_committed4()
5372  *
5373  * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided
5374  * for backwards compatibility with the 1.4 API.
5375  */
5377 svn_error_t *
5378 svn_wc_process_committed3(const char *path,
5379  svn_wc_adm_access_t *adm_access,
5380  svn_boolean_t recurse,
5381  svn_revnum_t new_revnum,
5382  const char *rev_date,
5383  const char *rev_author,
5384  const apr_array_header_t *wcprop_changes,
5385  svn_boolean_t remove_lock,
5386  const unsigned char *digest,
5387  apr_pool_t *pool);
5388 
5389 /** @see svn_wc_process_committed4()
5390  *
5391  * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided
5392  * for backwards compatibility with the 1.3 API.
5393  */
5395 svn_error_t *
5396 svn_wc_process_committed2(const char *path,
5397  svn_wc_adm_access_t *adm_access,
5398  svn_boolean_t recurse,
5399  svn_revnum_t new_revnum,
5400  const char *rev_date,
5401  const char *rev_author,
5402  const apr_array_header_t *wcprop_changes,
5403  svn_boolean_t remove_lock,
5404  apr_pool_t *pool);
5405 
5406 /** @see svn_wc_process_committed4()
5407  *
5408  * @deprecated Use the svn_wc_committed_queue_* functions instead. Provided
5409  * for backward compatibility with the 1.1 API.
5410  */
5412 svn_error_t *
5413 svn_wc_process_committed(const char *path,
5414  svn_wc_adm_access_t *adm_access,
5415  svn_boolean_t recurse,
5416  svn_revnum_t new_revnum,
5417  const char *rev_date,
5418  const char *rev_author,
5419  const apr_array_header_t *wcprop_changes,
5420  apr_pool_t *pool);
5421 
5422 
5423 
5424 
5425 
5426 /**
5427  * Do a depth-first crawl in a working copy, beginning at @a local_abspath,
5428  * using @a wc_ctx for accessing the working copy.
5429  *
5430  * Communicate the `state' of the working copy's revisions and depths
5431  * to @a reporter/@a report_baton. Obviously, if @a local_abspath is a
5432  * file instead of a directory, this depth-first crawl will be a short one.
5433  *
5434  * No locks or logs are created, nor are any animals harmed in the
5435  * process unless @a restore_files is TRUE. No cleanup is necessary.
5436  *
5437  * After all revisions are reported, @a reporter->finish_report() is
5438  * called, which immediately causes the RA layer to update the working
5439  * copy. Thus the return value may very well reflect the result of
5440  * the update!
5441  *
5442  * If @a depth is #svn_depth_empty, then report state only for
5443  * @a path itself. If #svn_depth_files, do the same and include
5444  * immediate file children of @a path. If #svn_depth_immediates,
5445  * then behave as if for #svn_depth_files but also report the
5446  * property states of immediate subdirectories. If @a depth is
5447  * #svn_depth_infinity, then report state fully recursively. All
5448  * descents are only as deep as @a path's own depth permits, of
5449  * course. If @a depth is #svn_depth_unknown, then just use
5450  * #svn_depth_infinity, which in practice means depth of @a path.
5451  *
5452  * Iff @a honor_depth_exclude is TRUE, the crawler will report paths
5453  * whose ambient depth is #svn_depth_exclude as being excluded, and
5454  * thus prevent the server from pushing update data for those paths;
5455  * therefore, don't set this flag if you wish to pull in excluded paths.
5456  * Note that #svn_depth_exclude on the target @a path is never
5457  * honored, even if @a honor_depth_exclude is TRUE, because we need to
5458  * be able to explicitly pull in a target. For example, if this is
5459  * the working copy...
5460  *
5461  * svn co greek_tree_repos wc_dir
5462  * svn up --set-depth exclude wc_dir/A/B/E # now A/B/E is excluded
5463  *
5464  * ...then 'svn up wc_dir/A/B' would report E as excluded (assuming
5465  * @a honor_depth_exclude is TRUE), but 'svn up wc_dir/A/B/E' would
5466  * not, because the latter is trying to explicitly pull in E. In
5467  * general, we never report the update target as excluded.
5468  *
5469  * Iff @a depth_compatibility_trick is TRUE, then set the @c start_empty
5470  * flag on @a reporter->set_path() and @a reporter->link_path() calls
5471  * as necessary to trick a pre-1.5 (i.e., depth-unaware) server into
5472  * sending back all the items the client might need to upgrade a
5473  * working copy from a shallower depth to a deeper one.
5474  *
5475  * If @a restore_files is TRUE, then unexpectedly missing working files
5476  * will be restored from the administrative directory's cache. For each
5477  * file restored, the @a notify_func function will be called with the
5478  * @a notify_baton and the path of the restored file. @a notify_func may
5479  * be @c NULL if this notification is not required. If @a
5480  * use_commit_times i