3
* ====================================================================
4
* Copyright (c) 2000-2004 CollabNet. All rights reserved.
6
* This software is licensed as described in the file COPYING, which
7
* you should have received as part of this distribution. The terms
8
* are also available at http://subversion.tigris.org/license-1.html.
9
* If newer versions of this license are posted there, you may use a
10
* newer version instead, at your option.
12
* This software consists of voluntary contributions made by many
13
* individuals. For exact contribution history, see the revision
14
* history and logs, available at http://subversion.tigris.org/.
15
* ====================================================================
19
* @brief The Subversion Working Copy Library
25
* - Ability to manipulate working copy's versioned data.
26
* - Ability to manipulate working copy's administrative files.
37
#include <apr_pools.h>
38
#include <apr_tables.h>
41
#include "svn_types.h"
42
#include "svn_string.h"
43
#include "svn_delta.h"
44
#include "svn_error.h"
46
#include "svn_ra.h" /* for svn_ra_reporter_t type */
50
#endif /* __cplusplus */
56
* Get libsvn_wc version information.
58
const svn_version_t *svn_wc_version (void);
61
/* Locking/Opening/Closing */
63
/** Baton for access to a working copy administrative area.
65
* One day all such access will require a baton, we're not there yet.
67
* Access batons can be grouped into sets, by passing an existing open
68
* baton when opening a new baton. Given one baton in a set, other batons
69
* may be retrieved. This allows an entire hierarchy to be locked, and
70
* then the set of batons can be passed around by passing a single baton.
72
typedef struct svn_wc_adm_access_t svn_wc_adm_access_t;
78
* Return, in @a *adm_access, a pointer to a new access baton for the working
79
* copy administrative area associated with the directory @a path. If
80
* @a write_lock is true the baton will include a write lock, otherwise the
81
* baton can only be used for read access. If @a path refers to a directory
82
* that is already write locked then the error @c SVN_ERR_WC_LOCKED will be
83
* returned. The error @c SVN_ERR_WC_NOT_DIRECTORY will be returned if
84
* @a path is not a versioned directory.
86
* If @a associated is an open access baton then @a adm_access will be added
87
* to the set containing @a associated. @a associated can be @c NULL, in
88
* which case @a adm_access is the start of a new set.
90
* @a depth specifies how much to lock. Zero means just the specified
91
* directory. Any negative value means to lock the entire working copy
92
* directory hierarchy under @a path. A positive value indicates the number of
93
* levels of directories to lock -- 1 means just immediate subdirectories, 2
94
* means immediate subdirectories and their subdirectories, etc. All the
95
* access batons will become part of the set containing @a adm_access. This
96
* is an all-or-nothing option, if it is not possible to lock all the
97
* requested directories then an error will be returned and @a adm_access will
98
* be invalid, with the exception that subdirectories of @a path that are
99
* missing from the physical filesystem will not be locked and will not cause
100
* an error. The error @c SVN_ERR_WC_LOCKED will be returned if a
101
* subdirectory of @a path is already write locked.
103
* If @a cancel_func is non-null, call it with @a cancel_baton to determine
104
* if the client has cancelled the operation.
106
* @a pool will be used to allocate memory for the baton and any subsequently
107
* cached items. If @a adm_access has not been closed when the pool is
108
* cleared, it will be closed automatically at that point, and removed from
109
* its set. A baton closed in this way will not remove physical locks from
110
* the working copy if cleanup is required.
112
* The first baton in a set, with @a associated passed as @c NULL, must have
113
* the longest lifetime of all the batons in the set. This implies it must be
114
* the root of the hierarchy.
116
svn_error_t *svn_wc_adm_open3 (svn_wc_adm_access_t **adm_access,
117
svn_wc_adm_access_t *associated,
119
svn_boolean_t write_lock,
121
svn_cancel_func_t cancel_func,
126
* @deprecated Provided for backward compatibility with the 1.1 API.
128
* Similar to @c svn_wc_adm_open3(), but without cancellation support.
130
svn_error_t *svn_wc_adm_open2 (svn_wc_adm_access_t **adm_access,
131
svn_wc_adm_access_t *associated,
133
svn_boolean_t write_lock,
138
* @deprecated Provided for backward compatibility with the 1.0 API.
140
* Similar to @c svn_wc_adm_open2(), but with @a tree_lock instead of
141
* @a depth. @a depth is set to -1 if @a tree_lock is @c TRUE, else 0.
143
svn_error_t *svn_wc_adm_open (svn_wc_adm_access_t **adm_access,
144
svn_wc_adm_access_t *associated,
146
svn_boolean_t write_lock,
147
svn_boolean_t tree_lock,
153
* Checks the working copy to determine the node type of @a path. If
154
* @a path is a versioned directory then the behaviour is like that of
155
* @c svn_wc_adm_open3, otherwise, if @a path is a file or does not
156
* exist, then the behaviour is like that of @c svn_wc_adm_open3 with
157
* @a path replaced by the parent directory of @a path. If @a path is
158
* an unversioned directory, the behaviour is also like that of
159
* @c svn_wc_adm_open3 on the parent, except that if the open fails,
160
* then the returned SVN_ERR_WC_NOT_DIRECTORY error refers to @a path,
161
* not to @a path's parent.
163
svn_error_t *svn_wc_adm_probe_open3 (svn_wc_adm_access_t **adm_access,
164
svn_wc_adm_access_t *associated,
166
svn_boolean_t write_lock,
168
svn_cancel_func_t cancel_func,
173
* @deprecated Provided for backward compatibility with the 1.1 API.
175
* Similar to svn_wc_adm_probe_open3() without the cancel
178
svn_error_t *svn_wc_adm_probe_open2 (svn_wc_adm_access_t **adm_access,
179
svn_wc_adm_access_t *associated,
181
svn_boolean_t write_lock,
186
* @deprecated Provided for backward compatibility with the 1.0 API.
188
* Similar to @c svn_wc_adm_probe_open2(), but with @a tree_lock instead of
189
* @a depth. @a depth is set to -1 if @a tree_lock is @c TRUE, else 0.
191
svn_error_t *svn_wc_adm_probe_open (svn_wc_adm_access_t **adm_access,
192
svn_wc_adm_access_t *associated,
194
svn_boolean_t write_lock,
195
svn_boolean_t tree_lock,
201
* Open access batons for @a path and return in @a *anchor_access and
202
* @a *target the anchor and target required to drive an editor. Return
203
* in @a *target_access the access baton for the target, which may be the
204
* same as @a *anchor_access. All the access batons will be in the
205
* @a *anchor_access set.
207
* @a depth determines the depth used when opening @a path if @a path is a
208
* versioned directory, @a depth is ignored otherwise. If @a write_lock is
209
* @c TRUE the access batons will hold write locks.
211
* If @a cancel_func is non-null, call it with @a cancel_baton to determine
212
* if the client has cancelled the operation.
214
* This function is essentially a combination of svn_wc_adm_open3 and
215
* svn_wc_get_actual_target, with the emphasis on reducing physical IO.
218
svn_wc_adm_open_anchor (svn_wc_adm_access_t **anchor_access,
219
svn_wc_adm_access_t **target_access,
222
svn_boolean_t write_lock,
224
svn_cancel_func_t cancel_func,
228
/** Return, in @a *adm_access, a pointer to an existing access baton associated
229
* with @a path. @a path must be a directory that is locked as part of the
230
* set containing the @a associated access baton.
232
* If the requested access baton is marked as missing in, or is simply
233
* absent from, @a associated, return SVN_ERR_WC_NOT_LOCKED.
235
* @a pool is used only for local processing, it is not used for the batons.
237
svn_error_t *svn_wc_adm_retrieve (svn_wc_adm_access_t **adm_access,
238
svn_wc_adm_access_t *associated,
242
/** Checks the working copy to determine the node type of @a path. If
243
* @a path is a versioned directory then the behaviour is like that of
244
* @c svn_wc_adm_retrieve, otherwise, if @a path is a file, an unversioned
245
* directory, or does not exist, then the behaviour is like that of
246
* @c svn_wc_adm_retrieve with @a path replaced by the parent directory of
249
svn_error_t *svn_wc_adm_probe_retrieve (svn_wc_adm_access_t **adm_access,
250
svn_wc_adm_access_t *associated,
257
* Try various ways to obtain an access baton for @a path.
259
* First, try to obtain @a *adm_access via @c svn_wc_adm_probe_retrieve(),
260
* but if this fails because @a associated can't give a baton for
261
* @a path or @a path's parent, then try @c svn_wc_adm_probe_open3(),
262
* this time passing @a write_lock and @a depth. If there is
263
* still no access because @a path is not a versioned directory, then
264
* just set @a *adm_access to null and return success. But if it is
265
* because @a path is locked, then return the error @c SVN_ERR_WC_LOCKED,
266
* and the effect on @a *adm_access is undefined. (Or if the attempt
267
* fails for any other reason, return the corresponding error, and the
268
* effect on @a *adm_access is also undefined.)
270
* If @c svn_wc_adm_probe_open3() succeeds, then add @a *adm_access to
273
* If @a cancel_func is non-null, call it with @a cancel_baton to determine
274
* if the client has cancelled the operation.
276
* Use @a pool only for local processing, not to allocate @a *adm_access.
278
svn_error_t *svn_wc_adm_probe_try3 (svn_wc_adm_access_t **adm_access,
279
svn_wc_adm_access_t *associated,
281
svn_boolean_t write_lock,
283
svn_cancel_func_t cancel_func,
288
* @deprecated Provided for backward compatibility with the 1.1 API.
290
* Similar to svn_wc_adm_probe_try3() without the cancel
293
svn_error_t *svn_wc_adm_probe_try2 (svn_wc_adm_access_t **adm_access,
294
svn_wc_adm_access_t *associated,
296
svn_boolean_t write_lock,
301
* @deprecated Provided for backward compatibility with the 1.0 API.
303
* Similar to @c svn_wc_adm_probe_try2(), but with @a tree_lock instead of
304
* @a depth. @a depth is set to -1 if @a tree_lock is @c TRUE, else 0.
306
svn_error_t *svn_wc_adm_probe_try (svn_wc_adm_access_t **adm_access,
307
svn_wc_adm_access_t *associated,
309
svn_boolean_t write_lock,
310
svn_boolean_t tree_lock,
314
/** Give up the access baton @a adm_access, and its lock if any. This will
315
* recursively close any batons in the same set that are direct
316
* subdirectories of @a adm_access. Any physical locks will be removed from
317
* the working copy. Lock removal is unconditional, there is no check to
318
* determine if cleanup is required.
320
svn_error_t *svn_wc_adm_close (svn_wc_adm_access_t *adm_access);
322
/** Return the path used to open the access baton @a adm_access */
323
const char *svn_wc_adm_access_path (svn_wc_adm_access_t *adm_access);
325
/** Return the pool used by access baton @a adm_access */
326
apr_pool_t *svn_wc_adm_access_pool (svn_wc_adm_access_t *adm_access);
328
/** Return @c TRUE is the access baton @a adm_access has a write lock,
329
* @c FALSE otherwise. Compared to @c svn_wc_locked this is a cheap, fast
330
* function that doesn't access the filesystem.
332
svn_boolean_t svn_wc_adm_locked(svn_wc_adm_access_t *adm_access);
334
/** Set @a *locked to non-zero if @a path is locked, else set it to zero. */
335
svn_error_t *svn_wc_locked (svn_boolean_t *locked,
341
/** Traversal information is information gathered by a working copy
342
* crawl or update. For example, the before and after values of the
343
* svn:externals property are important after an update, and since
344
* we're traversing the working tree anyway (a complete traversal
345
* during the initial crawl, and a traversal of changed paths during
346
* the checkout/update/switch), it makes sense to gather the
347
* property's values then instead of making a second pass.
349
typedef struct svn_wc_traversal_info_t svn_wc_traversal_info_t;
352
/** Return a new, empty traversal info object, allocated in @a pool. */
353
svn_wc_traversal_info_t *svn_wc_init_traversal_info (apr_pool_t *pool);
356
/** Set @a *externals_old and @a *externals_new to hash tables representing
357
* changes to values of the svn:externals property on directories
358
* traversed by @a traversal_info.
360
* @a traversal_info is obtained from @c svn_wc_init_traversal_info, but is
361
* only useful after it has been passed through another function, such
362
* as @c svn_wc_crawl_revisions, @c svn_wc_get_update_editor,
363
* @c svn_wc_get_checkout_editor, @c svn_wc_get_switch_editor, etc.
365
* Each hash maps <tt>const char *</tt> directory names onto
366
* <tt>const char *</tt> values of the externals property for that directory.
367
* The dir names are full paths -- that is, anchor plus target, not target
368
* alone. The values are not parsed, they are simply copied raw, and are
369
* never null: directories that acquired or lost the property are
370
* simply omitted from the appropriate table. Directories whose value
371
* of the property did not change show the same value in each hash.
373
* The hashes, keys, and values have the same lifetime as @a traversal_info.
375
void svn_wc_edited_externals (apr_hash_t **externals_old,
376
apr_hash_t **externals_new,
377
svn_wc_traversal_info_t *traversal_info);
380
/** One external item. This usually represents one line from an
381
* svn:externals description but with the path and URL
384
typedef struct svn_wc_external_item_t
386
/** The name of the subdirectory into which this external should be
387
checked out. This is relative to the parent directory that
388
holds this external item. (Note that these structs are often
389
stored in hash tables with the target dirs as keys, so this
390
field will often be redundant.) */
391
const char *target_dir;
393
/** Where to check out from. */
396
/** What revision to check out. The only valid kinds for this are
397
svn_opt_revision_number, svn_opt_revision_date, and
398
svn_opt_revision_head. */
399
svn_opt_revision_t revision;
401
} svn_wc_external_item_t;
407
* If @a externals_p is non-null, set @a *externals_p to an array of
408
* @a svn_wc_external_item_t * objects based on @a desc.
410
* If the format of @a desc is invalid, don't touch @a *externals_p and
411
* return @c SVN_ERR_CLIENT_INVALID_EXTERNALS_DESCRIPTION. Thus, if
412
* you just want to check the validity of an externals description,
413
* and don't care about the parsed result, pass null for @a externals_p.
415
* The format of @a desc is the same as for values of the directory
416
* property @c SVN_PROP_EXTERNALS, which see.
418
* Allocate the table, keys, and values in @a pool.
420
* Use @a parent_directory only in constructing error strings.
423
svn_wc_parse_externals_description2 (apr_array_header_t **externals_p,
424
const char *parent_directory,
430
* @deprecated Provided for backward compatibility with the 1.0 API.
432
* Similar to svn_wc_parse_externals_description2, but returns the
433
* parsed externals in a hash instead of an array. This function
434
* should not be used, as storing the externals in a hash causes their
435
* order of evaluation to be not easily identifiable.
438
svn_wc_parse_externals_description (apr_hash_t **externals_p,
439
const char *parent_directory,
445
/* Notification/callback handling. */
448
* @defgroup svn_wc_notifications notification callback handling
451
* In many cases, the WC library will scan a working copy and make
452
* changes. The caller usually wants to know when each of these changes
453
* has been made, so that it can display some kind of notification to
456
* These notifications have a standard callback function type, which
457
* takes the path of the file that was affected, and a caller-
460
* Note that the callback is a 'void' return -- this is a simple
461
* reporting mechanism, rather than an opportunity for the caller to
462
* alter the operation of the WC library.
464
* Note also that some of the actions are used across several
465
* different Subversion commands. For example, the update actions are
466
* also used for checkouts, switches, and merges.
469
/** The type of action occurring. */
470
typedef enum svn_wc_notify_action_t
472
/** Adding a path to revision control. */
473
svn_wc_notify_add = 0,
475
/** Copying a versioned path. */
478
/** Deleting a versioned path. */
479
svn_wc_notify_delete,
481
/** Restoring a missing path from the pristine text-base. */
482
svn_wc_notify_restore,
484
/** Reverting a modified path. */
485
svn_wc_notify_revert,
487
/** A revert operation has failed. */
488
svn_wc_notify_failed_revert,
490
/** Resolving a conflict. */
491
svn_wc_notify_resolved,
493
/** Skipping a path. */
496
/** Got a delete in an update. */
497
svn_wc_notify_update_delete,
499
/** Got an add in an update. */
500
svn_wc_notify_update_add,
502
/** Got any other action in an update. */
503
svn_wc_notify_update_update,
505
/** The last notification in an update (including updates of externals). */
506
svn_wc_notify_update_completed,
508
/** Updating an external module. */
509
svn_wc_notify_update_external,
511
/** The last notification in a status (including status on externals). */
512
svn_wc_notify_status_completed,
514
/** Running status on an external module. */
515
svn_wc_notify_status_external,
517
/** Committing a modification. */
518
svn_wc_notify_commit_modified,
520
/** Committing an addition. */
521
svn_wc_notify_commit_added,
523
/** Committing a deletion. */
524
svn_wc_notify_commit_deleted,
526
/** Committing a replacement. */
527
svn_wc_notify_commit_replaced,
529
/** Transmitting post-fix text-delta data for a file. */
530
svn_wc_notify_commit_postfix_txdelta,
532
/** Processed a single revision's blame. */
533
svn_wc_notify_blame_revision,
535
/** @since New in 1.2. Locking a path. */
536
svn_wc_notify_locked,
538
/** @since New in 1.2. Unlocking a path. */
539
svn_wc_notify_unlocked,
541
/** @since New in 1.2. Failed to lock a path. */
542
svn_wc_notify_failed_lock,
544
/** @since New in 1.2. Failed to unlock a path. */
545
svn_wc_notify_failed_unlock
546
} svn_wc_notify_action_t;
549
/** The type of notification that is occurring. */
550
typedef enum svn_wc_notify_state_t
552
svn_wc_notify_state_inapplicable = 0,
554
/** Notifier doesn't know or isn't saying. */
555
svn_wc_notify_state_unknown,
557
/** The state did not change. */
558
svn_wc_notify_state_unchanged,
560
/** The item wasn't present. */
561
svn_wc_notify_state_missing,
563
/** An unversioned item obstructed work. */
564
svn_wc_notify_state_obstructed,
566
/** Pristine state was modified. */
567
svn_wc_notify_state_changed,
569
/** Modified state had mods merged in. */
570
svn_wc_notify_state_merged,
572
/** Modified state got conflicting mods. */
573
svn_wc_notify_state_conflicted
575
} svn_wc_notify_state_t;
577
/** @since New in 1.2.
579
* What happened to a lock during an operation.
582
typedef enum svn_wc_notify_lock_state_t {
583
svn_wc_notify_lock_state_inapplicable = 0,
584
svn_wc_notify_lock_state_unknown,
585
/** The lock wasn't changed. */
586
svn_wc_notify_lock_state_unchanged,
587
/** The item was locked. */
588
svn_wc_notify_lock_state_locked,
589
/** The item was unlocked. */
590
svn_wc_notify_lock_state_unlocked
591
} svn_wc_notify_lock_state_t;
593
/** @since New in 1.2.
595
* Structure used in the @c svn_wc_notify_func2_t function.
597
* @c path is either absolute or relative to the current working directory
598
* (i.e., not relative to an anchor). @c action describes what happened
601
* @c kind, @c content_state, @c prop_state and @c lock_state are from
602
* after @c action, not before. @c lock_state reflects the addition
603
* or removal of a lock token in the working copy.
605
* If @c mime_type is non-null, it indicates the mime-type of @c path.
606
* It is always @c NULL for directories.
608
* If @c action is @c svn_wc_notify_update_completed, @c revision is the
609
* target revision of the update, or @c SVN_INVALID_REVNUM if not
610
* available. If @c action is @c svn_wc_notify_blame_revision, @c
611
* revision is the processed revision. In all other cases, @c
612
* revision is @c SVN_INVALID_REVNUM.
614
* For an @c action of svn_wc_notify_locked, @c lock is the lock
615
* structure received from the repository. For other actions, it is
618
* @c err is @c NULL, except when @c action is @c
619
* svn_wc_notify_failed_lock or @c svn_wc_notify_failed_unlock, in
620
* which case it points to an error describing the reason for the failure.
622
* Note that if @c action is @c svn_wc_notify_update, then @c path has
623
* already been installed, so it is legitimate for an implementation of
624
* @c svn_wc_notify_func2_t to examine @c path in the working copy.
626
* @note The purpose of the @c kind, @c mime_type, @c content_state, and
627
* @c prop_state fields is to provide "for free" information that an
628
* implementation is likely to want, and which it would otherwise be
629
* forced to deduce via expensive operations such as reading entries
630
* and properties. However, if the caller does not have this
631
* information, it will simply pass the corresponding `*_unknown'
632
* values, and it is up to the implementation how to handle that
633
* (i.e., whether to attempt deduction, or just to punt and
634
* give a less informative notification).
636
* @note Callers of notification functions should use @c svn_wc_create_notify
637
* to create structures of this type to allow for extensibility. */
638
typedef struct svn_wc_notify_t {
640
svn_wc_notify_action_t action;
641
svn_node_kind_t kind;
642
const char *mime_type;
643
const svn_lock_t *lock;
645
svn_wc_notify_state_t content_state;
646
svn_wc_notify_state_t prop_state;
647
svn_wc_notify_lock_state_t lock_state;
648
svn_revnum_t revision;
649
/* NOTE: Add new fields at the end to preserve binary compatibility.
650
Also, if you add fields here, you have to update svn_wc_create_notify
651
and svn_wc_dup_notify. */
654
/** @since New in 1.2.
656
* Allocate an @c svn_wc_notify_t structure in @a pool, initialize and return
659
* Set the @c path field of the created struct to @a path, and @c action to
660
* @a action. Set all other fields to their @c _unknown, @c NULL or
661
* invalid value, respectively.
664
svn_wc_create_notify (const char *path, svn_wc_notify_action_t action,
667
/** @since New in 1.2.
669
* Return a deep copy of @a notify, allocated in @a pool.
672
svn_wc_dup_notify (const svn_wc_notify_t *notify, apr_pool_t *pool);
674
/** @since New in 1.2.
676
* Notify the world that @a notify->action has happened to @a notify->path.
678
* Recommendation: callers of @c svn_wc_notify_func2_t should avoid
679
* invoking it multiple times on the same path within a given
680
* operation, and implementations should not bother checking for such
681
* duplicate calls. For example, in an update, the caller should not
682
* invoke the notify func on receiving a prop change and then again
683
* on receiving a text change. Instead, wait until all changes have
684
* been received, and then invoke the notify func once (from within
685
* an @c svn_delta_editor_t's @c close_file(), for example), passing
686
* the appropriate @a notify->content_state and @a notify->prop_state flags.
688
typedef void (*svn_wc_notify_func2_t) (void *baton,
689
const svn_wc_notify_t *notify,
692
/** @deprecated Provided for backward compatibility with the 1.1 API.
694
* Similar to @c svn_wc_notify_func2_t, but takes the information as arguments
695
* instead of struct fields. */
696
typedef void (*svn_wc_notify_func_t) (void *baton,
698
svn_wc_notify_action_t action,
699
svn_node_kind_t kind,
700
const char *mime_type,
701
svn_wc_notify_state_t content_state,
702
svn_wc_notify_state_t prop_state,
703
svn_revnum_t revision);
712
* A callback vtable invoked by our diff-editors, as they receive
713
* diffs from the server. 'svn diff' and 'svn merge' both implement
714
* their own versions of this table.
716
typedef struct svn_wc_diff_callbacks2_t
718
/** A file @a path has changed. If tmpfile2 is non-null, the
719
* contents have changed and those changes can be seen by comparing
720
* @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2 of
721
* the file, respectively.
723
* If known, the @c svn:mime-type value of each file is passed into
724
* @a mimetype1 and @a mimetype2; either or both of the values can
725
* be NULL. The implementor can use this information to decide if
726
* (or how) to generate differences.
728
* @a propchanges is an array of (@c svn_prop_t) structures. If it has
729
* any elements, the original list of properties is provided in
730
* @a originalprops, which is a hash of @c svn_string_t values, keyed on the
733
* @a adm_access will be an access baton for the directory containing
734
* @a path, or @c NULL if the diff editor is not using access batons.
736
* If @a contentstate is non-null, set @a *contentstate to the state of
737
* the file contents after the operation has been performed. The same
738
* applies for @a propstate regarding the property changes. (In
739
* practice, this is only useful with merge, not diff; diff callbacks
740
* will probably set @a *contentstate and @a *propstate to
741
* @c svn_wc_notify_state_unknown, since they do not change the state and
742
* therefore do not bother to know the state after the operation.)
744
svn_error_t *(*file_changed) (svn_wc_adm_access_t *adm_access,
745
svn_wc_notify_state_t *contentstate,
746
svn_wc_notify_state_t *propstate,
748
const char *tmpfile1,
749
const char *tmpfile2,
752
const char *mimetype1,
753
const char *mimetype2,
754
const apr_array_header_t *propchanges,
755
apr_hash_t *originalprops,
758
/** A file @a path was added. The contents can be seen by comparing
759
* @a tmpfile1 and @a tmpfile2, which represent @a rev1 and @a rev2
760
* of the file, respectively. (If either file is empty, the rev
763
* If known, the @c svn:mime-type value of each file is passed into
764
* @a mimetype1 and @a mimetype2; either or both of the values can
765
* be NULL. The implementor can use this information to decide if
766
* (or how) to generate differences.
768
* @a propchanges is an array of (@c svn_prop_t) structures. If it contains
769
* any elements, the original list of properties is provided in
770
* @a originalprops, which is a hash of @c svn_string_t values, keyed on the
773
* @a adm_access will be an access baton for the directory containing
774
* @a path, or @c NULL if the diff editor is not using access batons.
776
* If @a contentstate is non-null, set @a *contentstate to the state of the
777
* file contents after the operation has been performed. The same
778
* applies for @a propstate regarding the property changes. (In practice,
779
* this is only useful with merge, not diff; diff callbacks will
780
* probably set @a *contentstate and *propstate to
781
* @c svn_wc_notify_state_unknown, since they do not change the state
782
* and therefore do not bother to know the state after the operation.)
785
svn_error_t *(*file_added) (svn_wc_adm_access_t *adm_access,
786
svn_wc_notify_state_t *contentstate,
787
svn_wc_notify_state_t *propstate,
789
const char *tmpfile1,
790
const char *tmpfile2,
793
const char *mimetype1,
794
const char *mimetype2,
795
const apr_array_header_t *propchanges,
796
apr_hash_t *originalprops,
799
/** A file @a path was deleted. The [loss of] contents can be seen by
800
* comparing @a tmpfile1 and @a tmpfile2. @a originalprops provides
801
* the properties of the file.
803
* If known, the @c svn:mime-type value of each file is passed into
804
* @a mimetype1 and @a mimetype2; either or both of the values can
805
* be NULL. The implementor can use this information to decide if
806
* (or how) to generate differences.
808
* @a adm_access will be an access baton for the directory containing
809
* @a path, or @c NULL if the diff editor is not using access batons.
811
* If @a state is non-null, set @a *state to the state of the item
812
* after the delete operation has been performed. (In practice,
813
* this is only useful with merge, not diff; diff callbacks will
814
* probably set @a *state to @c svn_wc_notify_state_unknown, since
815
* they do not change the state and therefore do not bother to know
816
* the state after the operation.)
818
svn_error_t *(*file_deleted) (svn_wc_adm_access_t *adm_access,
819
svn_wc_notify_state_t *state,
821
const char *tmpfile1,
822
const char *tmpfile2,
823
const char *mimetype1,
824
const char *mimetype2,
825
apr_hash_t *originalprops,
828
/** A directory @a path was added. @a rev is the revision that the
829
* directory came from.
831
* @a adm_access will be an access baton for the directory containing
832
* @a path, or @c NULL if the diff editor is not using access batons.
834
svn_error_t *(*dir_added) (svn_wc_adm_access_t *adm_access,
835
svn_wc_notify_state_t *state,
840
/** A directory @a path was deleted.
842
* @a adm_access will be an access baton for the directory containing
843
* @a path, or @c NULL if the diff editor is not using access batons.
845
* If @a state is non-null, set @a *state to the state of the item
846
* after the delete operation has been performed. (In practice,
847
* this is only useful with merge, not diff; diff callbacks will
848
* probably set @a *state to @c svn_wc_notify_state_unknown, since
849
* they do not change the state and therefore do not bother to know
850
* the state after the operation.)
852
svn_error_t *(*dir_deleted) (svn_wc_adm_access_t *adm_access,
853
svn_wc_notify_state_t *state,
857
/** A list of property changes (@a propchanges) was applied to the
860
* The array is a list of (@c svn_prop_t) structures.
862
* The original list of properties is provided in @a original_props,
863
* which is a hash of @c svn_string_t values, keyed on the property
866
* @a adm_access will be an access baton for the directory containing
867
* @a path, or @c NULL if the diff editor is not using access batons.
869
* If @a state is non-null, set @a *state to the state of the properties
870
* after the operation has been performed. (In practice, this is only
871
* useful with merge, not diff; diff callbacks will probably set @a *state
872
* to @c svn_wc_notify_state_unknown, since they do not change the state
873
* and therefore do not bother to know the state after the operation.)
875
svn_error_t *(*dir_props_changed) (svn_wc_adm_access_t *adm_access,
876
svn_wc_notify_state_t *state,
878
const apr_array_header_t *propchanges,
879
apr_hash_t *original_props,
882
} svn_wc_diff_callbacks2_t;
885
* @deprecated Provided for backward compatibility with the 1.1 API.
887
* Similar to @c svn_wc_callbakcs2_t, but with file additions/content
888
* changes and property changes split into different functions.
890
typedef struct svn_wc_diff_callbacks_t
892
/** Similar to @c file_changed in @c svn_wc_diff_callbacks2_t, but without
893
* property change information. @a tmpfile2 is never NULL. @a state applies
894
* to the file contents. */
895
svn_error_t *(*file_changed) (svn_wc_adm_access_t *adm_access,
896
svn_wc_notify_state_t *state,
898
const char *tmpfile1,
899
const char *tmpfile2,
902
const char *mimetype1,
903
const char *mimetype2,
906
/** Similar to @c file_added in @c svn_wc_diff_callbacks2_t, but without
907
* property change information. @a *state applies to the file contents. */
908
svn_error_t *(*file_added) (svn_wc_adm_access_t *adm_access,
909
svn_wc_notify_state_t *state,
911
const char *tmpfile1,
912
const char *tmpfile2,
915
const char *mimetype1,
916
const char *mimetype2,
919
/** Similar to @c file_deleted in @c svn_wc_diff_callbacks2_t, but without
921
svn_error_t *(*file_deleted) (svn_wc_adm_access_t *adm_access,
922
svn_wc_notify_state_t *state,
924
const char *tmpfile1,
925
const char *tmpfile2,
926
const char *mimetype1,
927
const char *mimetype2,
930
/** The same as @c dir_added in @c svn_wc_diff_callbacks2_t. */
931
svn_error_t *(*dir_added) (svn_wc_adm_access_t *adm_access,
932
svn_wc_notify_state_t *state,
937
/** The same as @c dir_deleted in @c svn_diff_callbacks2_t. */
938
svn_error_t *(*dir_deleted) (svn_wc_adm_access_t *adm_access,
939
svn_wc_notify_state_t *state,
943
/** Similar to @c dir_props_changed in @c svn_diff_callbacks2_t, but this
944
* function is called for files as well as directories. */
945
svn_error_t *(*props_changed) (svn_wc_adm_access_t *adm_access,
946
svn_wc_notify_state_t *state,
948
const apr_array_header_t *propchanges,
949
apr_hash_t *original_props,
952
} svn_wc_diff_callbacks_t;
955
/* Asking questions about a working copy. */
957
/** Set @a *wc_format to @a path's working copy format version number if
958
* @a path is a valid working copy directory, else set it to 0.
959
* Return error @c APR_ENOENT if @a path does not exist at all.
961
svn_error_t *svn_wc_check_wc (const char *path,
966
/** Set @a *has_binary_prop to @c TRUE iff @a path has been marked
967
* with a property indicating that it is non-text (in other words, binary).
968
* @a adm_access is an access baton set that contains @a path.
970
svn_error_t *svn_wc_has_binary_prop (svn_boolean_t *has_binary_prop,
972
svn_wc_adm_access_t *adm_access,
976
/* Detecting modification. */
978
/** Set @a *modified_p to non-zero if @a filename's text is modified
979
* with regard to the base revision, else set @a *modified_p to zero.
980
* @a filename is a path to the file, not just a basename. @a adm_access
981
* must be an access baton for @a filename.
983
* If @a force_comparison is @c TRUE, this function will not allow
984
* early return mechanisms that avoid actual content comparison.
985
* Instead, if there is a text base, a full byte-by-byte comparison
986
* will be done, and the entry checksum verified as well. (This means
987
* that if the text base is much longer than the working file, every
988
* byte of the text base will still be examined.)
990
* If @a filename does not exist, consider it unmodified. If it exists
991
* but is not under revision control (not even scheduled for
992
* addition), return the error @c SVN_ERR_ENTRY_NOT_FOUND. */
993
svn_error_t *svn_wc_text_modified_p (svn_boolean_t *modified_p,
994
const char *filename,
995
svn_boolean_t force_comparison,
996
svn_wc_adm_access_t *adm_access,
1000
/** Set @a *modified_p to non-zero if @a path's properties are modified
1001
* with regard to the base revision, else set @a modified_p to zero.
1002
* @a adm_access must be an access baton for @a path.
1004
svn_error_t *svn_wc_props_modified_p (svn_boolean_t *modified_p,
1006
svn_wc_adm_access_t *adm_access,
1012
/** Administrative subdir.
1014
* Ideally, this would be completely private to wc internals (in fact,
1015
* it used to be that @c adm_subdir() in adm_files.c was the only function
1016
* who knew the adm subdir's name). However, import wants to protect
1017
* against importing administrative subdirs, so now the name is a
1018
* matter of public record.
1020
#define SVN_WC_ADM_DIR_NAME ".svn"
1024
/* Entries and status. */
1026
/** The schedule states an entry can be in. */
1027
typedef enum svn_wc_schedule_t
1029
/** Nothing special here */
1030
svn_wc_schedule_normal,
1032
/** Slated for addition */
1033
svn_wc_schedule_add,
1035
/** Slated for deletion */
1036
svn_wc_schedule_delete,
1038
/** Slated for replacement (delete + add) */
1039
svn_wc_schedule_replace
1041
} svn_wc_schedule_t;
1044
/** A working copy entry -- that is, revision control information about
1045
* one versioned entity.
1047
typedef struct svn_wc_entry_t
1049
/* IMPORTANT: If you extend this structure, check svn_wc_entry_dup to see
1050
if you need to extend that as well. */
1052
/* General Attributes */
1057
/** base revision */
1058
svn_revnum_t revision;
1060
/** url in repository */
1063
/** canonical repository URL */
1066
/** repository uuid */
1069
/** node kind (file, dir, ...) */
1070
svn_node_kind_t kind;
1072
/* State information */
1074
/** scheduling (add, delete, replace ...) */
1075
svn_wc_schedule_t schedule;
1077
/** in a copied state */
1078
svn_boolean_t copied;
1080
/** deleted, but parent rev lags behind */
1081
svn_boolean_t deleted;
1083
/** absent -- we know an entry of this name exists, but that's all
1084
(usually this happens because of authz restrictions) */
1085
svn_boolean_t absent;
1087
/** for THIS_DIR entry, implies whole entries file is incomplete */
1088
svn_boolean_t incomplete;
1090
/** copyfrom location */
1091
const char *copyfrom_url;
1093
/** copyfrom revision */
1094
svn_revnum_t copyfrom_rev;
1096
/** old version of conflicted file */
1097
const char *conflict_old;
1099
/** new version of conflicted file */
1100
const char *conflict_new;
1102
/** working version of conflicted file */
1103
const char *conflict_wrk;
1105
/** property reject file */
1106
const char *prejfile;
1108
/** last up-to-date time for text contents (0 means no information available)
1110
apr_time_t text_time;
1112
/** last up-to-date time for properties (0 means no information available) */
1113
apr_time_t prop_time;
1115
/** base64-encoded checksum for the untranslated text base file,
1116
* can be @c NULL for backwards compatibility.
1118
const char *checksum;
1122
/** last revision this was changed */
1123
svn_revnum_t cmt_rev;
1125
/** last date this was changed */
1126
apr_time_t cmt_date;
1128
/** last commit author of this item */
1129
const char *cmt_author;
1131
/** @since New in 1.2
1132
* lock token or NULL if path not locked in this WC */
1133
const char *lock_token;
1134
/** @since New in 1.2
1135
* lock owner, or NULL if not locked in this WC */
1136
const char *lock_owner;
1137
/** @since New in 1.2
1138
* lock comment or NULL if not locked in this WC or no comment */
1139
const char *lock_comment;
1140
/** @since New in 1.2
1141
* Lock creation date or 0 if not locked in this WC */
1142
apr_time_t lock_creation_date;
1144
/* IMPORTANT: If you extend this structure, check svn_wc_entry_dup to see
1145
if you need to extend that as well. */
1149
/** How an entries file's owner dir is named in the entries file. */
1150
#define SVN_WC_ENTRY_THIS_DIR ""
1153
/** Set @a *entry to an entry for @a path, allocated in the access baton
1154
* pool. If @a show_hidden is true, return the entry even if it's in
1155
* 'deleted' or 'absent' state. If @a path is not under revision
1156
* control, or if entry is hidden, not scheduled for re-addition,
1157
* and @a show_hidden is @c FALSE, then set @a *entry to @c NULL.
1159
* @a *entry should not be modified, since doing so modifies the entries
1160
* cache in @a adm_access without changing the entries file on disk.
1162
* If @a path is not a directory then @a adm_access must be an access baton
1163
* for the parent directory of @a path. To avoid needing to know whether
1164
* @a path is a directory or not, if @a path is a directory @a adm_access
1165
* can still be an access baton for the parent of @a path so long as the
1166
* access baton for @a path itself is in the same access baton set.
1168
* Note that it is possible for @a path to be absent from disk but still
1169
* under revision control; and conversely, it is possible for @a path to
1170
* be present, but not under revision control.
1172
* Use @a pool only for local processing.
1174
svn_error_t *svn_wc_entry (const svn_wc_entry_t **entry,
1176
svn_wc_adm_access_t *adm_access,
1177
svn_boolean_t show_hidden,
1181
/** Parse the `entries' file for @a adm_access and return a hash @a entries,
1182
* whose keys are (<tt>const char *</tt>) entry names and values are
1183
* (<tt>svn_wc_entry_t *</tt>). The hash @a entries, and its keys and
1184
* values, are allocated from the pool used to open the @a adm_access
1185
* baton (that's how the entries caching works). @a pool is used for
1186
* transient allocations.
1188
* Entries that are in a 'deleted' or 'absent' state (and not
1189
* scheduled for re-addition) are not returned in the hash, unless
1190
* @a show_hidden is true.
1192
* Important note: the @a entries hash is the entries cache in @a adm_access
1193
* and so usually the hash itself, the keys and the values should be treated
1194
* as read-only. If any of these are modified then it is the caller's
1195
* responsibility to ensure that the entries file on disk is updated. Treat
1196
* the hash values as type (<tt>const svn_wc_entry_t *</tt>) if you wish to
1197
* avoid accidental modification. Modifying the schedule member is a
1198
* particularly bad idea, as the entries writing process relies on having
1199
* access to the original schedule. Use a duplicate entry to modify the
1202
* Important note: only the entry structures representing files and
1203
* @c SVN_WC_ENTRY_THIS_DIR contain complete information. The entry
1204
* structures representing subdirs have only the `kind' and `state'
1205
* fields filled in. If you want info on a subdir, you must use this
1206
* routine to open its @a path and read the @c SVN_WC_ENTRY_THIS_DIR
1207
* structure, or call @c svn_wc_entry on its @a path.
1209
svn_error_t *svn_wc_entries_read (apr_hash_t **entries,
1210
svn_wc_adm_access_t *adm_access,
1211
svn_boolean_t show_hidden,
1215
/** Return a duplicate of @a entry, allocated in @a pool. No part of the new
1216
* entry will be shared with @a entry.
1218
svn_wc_entry_t *svn_wc_entry_dup (const svn_wc_entry_t *entry,
1222
/** Given a @a dir_path under version control, decide if one of its
1223
* entries (@a entry) is in state of conflict; return the answers in
1224
* @a text_conflicted_p and @a prop_conflicted_p.
1226
* (If the entry mentions that a .rej or .prej exist, but they are
1227
* both removed, assume the conflict has been resolved by the user.)
1229
svn_error_t *svn_wc_conflicted_p (svn_boolean_t *text_conflicted_p,
1230
svn_boolean_t *prop_conflicted_p,
1231
const char *dir_path,
1232
const svn_wc_entry_t *entry,
1235
/** Set @a *url and @a *rev to the ancestor URL and revision for @a path,
1236
* allocating in @a pool. @a adm_access must be an access baton for @a path.
1238
* If @a url or @a rev is null, then ignore it (just don't return the
1239
* corresponding information).
1241
svn_error_t *svn_wc_get_ancestry (char **url,
1244
svn_wc_adm_access_t *adm_access,
1248
/** A callback vtable invoked by the generic entry-walker function. */
1249
typedef struct svn_wc_entry_callbacks_t
1251
/** An @a entry was found at @a path. */
1252
svn_error_t *(*found_entry) (const char *path,
1253
const svn_wc_entry_t *entry,
1257
/* ### add more callbacks as new callers need them. */
1259
} svn_wc_entry_callbacks_t;
1263
* @since New in 1.2.
1265
* A generic entry-walker.
1267
* Do a recursive depth-first entry-walk beginning on @a path, which can
1268
* be a file or dir. Call callbacks in @a walk_callbacks, passing
1269
* @a walk_baton to each. Use @a pool for looping, recursion, and to
1270
* allocate all entries returned. @a adm_access must be an access baton
1273
* If @a cancel_func is non-null, call it with @a cancel_baton to determine
1274
* if the client has cancelled the operation.
1276
* Like our other entries interfaces, entries that are in a 'deleted'
1277
* or 'absent' state (and not scheduled for re-addition) are not
1278
* discovered, unless @a show_hidden is true.
1280
* When a new directory is entered, @c SVN_WC_ENTRY_THIS_DIR will always
1281
* be returned first.
1283
* Note: callers should be aware that each directory will be
1284
* returned *twice*: first as an entry within its parent, and
1285
* subsequently as the '.' entry within itself. The two calls can be
1286
* distinguished by looking for @c SVN_WC_ENTRY_THIS_DIR in the 'name'
1287
* field of the entry.
1289
svn_error_t *svn_wc_walk_entries2 (const char *path,
1290
svn_wc_adm_access_t *adm_access,
1291
const svn_wc_entry_callbacks_t
1294
svn_boolean_t show_hidden,
1295
svn_cancel_func_t cancel_func,
1300
* @deprecated Provided for backward compatibility with the 1.0 API.
1302
* Similar to svn_wc_walk_entries2(), but without cancellation support.
1304
svn_error_t *svn_wc_walk_entries (const char *path,
1305
svn_wc_adm_access_t *adm_access,
1306
const svn_wc_entry_callbacks_t
1309
svn_boolean_t show_hidden,
1313
/** Mark missing @a path as 'deleted' in its @a parent's list of entries.
1315
* Return @c SVN_ERR_WC_PATH_FOUND if @a path isn't actually missing.
1317
svn_error_t *svn_wc_mark_missing_deleted (const char *path,
1318
svn_wc_adm_access_t *parent,
1323
/** Ensure that an administrative area exists for @a path, so that @a
1324
* path is a working copy subdir based on @a url at @a revision, and
1325
* with repository UUID @a uuid. @a uuid may be @c NULL.
1327
* If the administrative area does not exist, then create it and
1328
* initialize it to an unlocked state.
1330
* If the administrative area already exists then the given @a url
1331
* must match the URL in the administrative area or an error will be
1332
* returned. The given @a revision must also match except for the
1333
* special case of adding a directory that has a name matching one
1334
* scheduled for deletion, in which case @a revision must be zero.
1336
* Do not ensure existence of @a path itself; if @a path does not
1337
* exist, return error.
1339
svn_error_t *svn_wc_ensure_adm (const char *path,
1342
svn_revnum_t revision,
1348
* @defgroup svn_wc_status working copy status.
1351
* We have two functions for getting working copy status: one function
1352
* for getting the status of exactly one thing, and another for
1353
* getting the statuses of (potentially) multiple things.
1355
* The WebDAV concept of "depth" may be useful in understanding the
1356
* motivation behind this. Suppose we're getting the status of
1357
* directory D. The three depth levels would mean
1359
* depth 0: D itself (just the named directory)
1360
* depth 1: D and its immediate children (D + its entries)
1361
* depth Infinity: D and all its descendants (full recursion)
1363
* To offer all three levels, we could have one unified function,
1364
* taking a `depth' parameter. Unfortunately, because this function
1365
* would have to handle multiple return values as well as the single
1366
* return value case, getting the status of just one entity would
1367
* become cumbersome: you'd have to roll through a hash to find one
1370
* So we have @c svn_wc_status() for depth 0, and
1371
* @c svn_wc_get_status_editor() for depths 1 and 2, since the latter
1372
* two involve multiple return values.
1374
* NOTE: The status structures may contain a @c NULL ->entry field.
1375
* This indicates an item that is not versioned in the working copy.
1378
enum svn_wc_status_kind
1380
/** does not exist */
1381
svn_wc_status_none = 1,
1383
/** is not a versioned thing in this wc */
1384
svn_wc_status_unversioned,
1386
/** exists, but uninteresting. */
1387
svn_wc_status_normal,
1389
/** is scheduled for addition */
1390
svn_wc_status_added,
1392
/** under v.c., but is missing */
1393
svn_wc_status_missing,
1395
/** scheduled for deletion */
1396
svn_wc_status_deleted,
1398
/** was deleted and then re-added */
1399
svn_wc_status_replaced,
1401
/** text or props have been modified */
1402
svn_wc_status_modified,
1404
/** local mods received repos mods */
1405
svn_wc_status_merged,
1407
/** local mods received conflicting repos mods */
1408
svn_wc_status_conflicted,
1410
/** a resource marked as ignored */
1411
svn_wc_status_ignored,
1413
/** an unversioned resource is in the way of the versioned resource */
1414
svn_wc_status_obstructed,
1416
/** an unversioned path populated by an svn:external property */
1417
svn_wc_status_external,
1419
/** a directory doesn't contain a complete entries list */
1420
svn_wc_status_incomplete
1423
/** @since New in 1.2.
1425
* Structure for holding the "status" of a working copy item.
1427
* The item's entry data is in @a entry, augmented and possibly shadowed
1428
* by the other fields. @a entry is @c NULL if this item is not under
1431
* @note Fields may be added to the end of this structure in future
1432
* versions. Therefore, users shouldn't allocate structures of this
1433
* type, to preserve binary compatibility.
1435
typedef struct svn_wc_status2_t
1437
/** Can be @c NULL if not under version control. */
1438
svn_wc_entry_t *entry;
1440
/** The status of the entries text. */
1441
enum svn_wc_status_kind text_status;
1443
/** The status of the entries properties. */
1444
enum svn_wc_status_kind prop_status;
1446
/** a directory can be 'locked' if a working copy update was interrupted. */
1447
svn_boolean_t locked;
1449
/** a file or directory can be 'copied' if it's scheduled for
1450
* addition-with-history (or part of a subtree that is scheduled as such.).
1452
svn_boolean_t copied;
1454
/** a file or directory can be 'switched' if the switch command has been
1457
svn_boolean_t switched;
1459
/** The entry's text status in the repository. */
1460
enum svn_wc_status_kind repos_text_status;
1462
/** The entry's property status in the repository. */
1463
enum svn_wc_status_kind repos_prop_status;
1465
/** The entry's lock in the repository, if any. */
1466
svn_lock_t *repos_lock;
1472
/** @deprecated Provided for backwards compatibility with the 1.1 API.
1474
* Same as svn_wc_status2_t, but without the svn_lock_t 'repos_lock' field.
1476
typedef struct svn_wc_status_t
1478
/** Can be @c NULL if not under version control. */
1479
svn_wc_entry_t *entry;
1481
/** The status of the entries text. */
1482
enum svn_wc_status_kind text_status;
1484
/** The status of the entries properties. */
1485
enum svn_wc_status_kind prop_status;
1487
/** a directory can be 'locked' if a working copy update was interrupted. */
1488
svn_boolean_t locked;
1490
/** a file or directory can be 'copied' if it's scheduled for
1491
* addition-with-history (or part of a subtree that is scheduled as such.).
1493
svn_boolean_t copied;
1495
/** a file or directory can be 'switched' if the switch command has been
1498
svn_boolean_t switched;
1500
/** The entry's text status in the repository. */
1501
enum svn_wc_status_kind repos_text_status;
1503
/** The entry's property status in the repository. */
1504
enum svn_wc_status_kind repos_prop_status;
1510
/** @since New in 1.2.
1512
* Return a deep copy of the @a orig_stat status structure, allocated
1515
svn_wc_status2_t *svn_wc_dup_status2 (svn_wc_status2_t *orig_stat,
1519
/** @deprecated Provided for backwards compatibility with the 1.1 API.
1521
* Same as svn_wc_dup_status2(), but for older svn_wc_status_t structures.
1523
svn_wc_status_t *svn_wc_dup_status (svn_wc_status_t *orig_stat,
1527
/** @since New in 1.2.
1529
* Fill @a *status for @a path, allocating in @a pool, with the exception
1530
* of the @c repos_rev field, which is normally filled in by the caller.
1531
* @a adm_access must be an access baton for @a path.
1533
* Here are some things to note about the returned structure. A quick
1534
* examination of the @c status->text_status after a successful return of
1535
* this function can reveal the following things:
1537
* - @c svn_wc_status_none : @a path is not versioned, and is either not
1538
* present on disk, or is ignored by svn's
1539
* default ignore regular expressions or the
1540
* svn:ignore property setting for @a path's
1543
* - @c svn_wc_status_missing : @a path is versioned, but is missing from
1546
* - @c svn_wc_status_unversioned : @a path is not versioned, but is
1547
* present on disk and not being
1548
* ignored (see above).
1550
* The other available results for the @c text_status field are more
1551
* straightforward in their meanings. See the comments on the
1552
* @c svn_wc_status_kind structure for some hints.
1554
svn_error_t *svn_wc_status2 (svn_wc_status2_t **status,
1556
svn_wc_adm_access_t *adm_access,
1560
/** @deprecated Provided for backwards compatibility with the 1.1 API.
1562
* Same as svn_wc_status2(), but for older svn_wc_status_t structures.
1564
svn_error_t *svn_wc_status (svn_wc_status_t **status,
1566
svn_wc_adm_access_t *adm_access,
1572
/** @since New in 1.2.
1574
* A callback for reporting a @a status about @a path.
1576
* @a baton is a closure object; it should be provided by the
1577
* implementation, and passed by the caller.
1579
typedef void (*svn_wc_status_func2_t) (void *baton,
1581
svn_wc_status2_t *status);
1583
/** @deprecated Provided for backwards compatibility with the 1.1 API.
1585
* Same as svn_wc_status_func2_t(), but for older svn_wc_status_t structures.
1587
typedef void (*svn_wc_status_func_t) (void *baton,
1589
svn_wc_status_t *status);
1592
/** @since New in 1.2.
1594
* Set @a *editor and @a *edit_baton to an editor that generates @c
1595
* svn_wc_status2_t structures and sends them through @a status_func /
1596
* @a status_baton. @a anchor is an access baton, with a tree lock,
1597
* for the local path to the working copy which will be used as the
1598
* root of our editor. If @a target is not empty, it represents an
1599
* entry in the @a anchor path which is the subject of the editor
1600
* drive (otherwise, the @a anchor is the subject).
1602
* If @a set_locks_baton is non-@c NULL, it will be set to a baton that can
1603
* be used in a call to the @c svn_wc_status_set_repos_locks function.
1605
* Callers drive this editor to describe working copy out-of-dateness
1606
* with respect to the repository. If this information is not
1607
* available or not desired, callers should simply call the
1608
* close_edit() function of the @a editor vtable.
1610
* If the editor driver calls @a editor's set_target_revision() vtable
1611
* function, then when the edit drive is completed, @a *edit_revision
1612
* will contain the revision delivered via that interface, and any
1613
* status items reported during the drive will have their @c repos_rev
1614
* field set to this same revision.
1616
* @a config is a hash mapping @c SVN_CONFIG_CATEGORY's to @c
1619
* Assuming the target is a directory, then:
1621
* - If @a get_all is false, then only locally-modified entries will be
1622
* returned. If true, then all entries will be returned.
1624
* - If @a recurse is false, status structures will be returned only
1625
* for the target and its immediate children. Otherwise, this
1626
* operation is fully recursive.
1628
* If @a no_ignore is set, statuses that would typically be ignored
1629
* will instead be reported.
1631
* If @a cancel_func is non-null, call it with @a cancel_baton while building
1632
* the @a statushash to determine if the client has cancelled the operation.
1634
* If @a traversal_info is non-null, then record pre-update traversal
1635
* state in it. (Caller should obtain @a traversal_info from
1636
* @c svn_wc_init_traversal_info.)
1638
* Allocate the editor itself in @a pool, but the editor does temporary
1639
* allocations in a subpool of @a pool.
1641
svn_error_t *svn_wc_get_status_editor2 (const svn_delta_editor_t **editor,
1643
void **set_locks_baton,
1644
svn_revnum_t *edit_revision,
1645
svn_wc_adm_access_t *anchor,
1648
svn_boolean_t recurse,
1649
svn_boolean_t get_all,
1650
svn_boolean_t no_ignore,
1651
svn_wc_status_func2_t status_func,
1653
svn_cancel_func_t cancel_func,
1655
svn_wc_traversal_info_t *traversal_info,
1659
/** @deprecated Provided for backwards compatibility with the 1.1 API.
1661
* Same as svn_wc_get_status_editor2, but with @a set_locks_baton set
1662
* to @c NULL, and taking a deprecated svn_wc_status_func_t argument. */
1663
svn_error_t *svn_wc_get_status_editor (const svn_delta_editor_t **editor,
1665
svn_revnum_t *edit_revision,
1666
svn_wc_adm_access_t *anchor,
1669
svn_boolean_t recurse,
1670
svn_boolean_t get_all,
1671
svn_boolean_t no_ignore,
1672
svn_wc_status_func_t status_func,
1674
svn_cancel_func_t cancel_func,
1676
svn_wc_traversal_info_t *traversal_info,
1680
/** @since New in 1.2.
1682
* Associate @a locks, a hash table mapping <tt>const char*</tt>
1683
* absolute repository paths to <tt>svn_lock_t</tt> objects, with a
1684
* @a set_locks_baton returned by an earlier call to
1685
* @c svn_wc_get_status_editor2. @a repos_root is the repository root URL.
1686
* Perform all allocations in @a pool.
1688
* @note @a locks will not be copied, so it must be valid throughout the
1689
* edit. @a pool must also not be destroyed or cleared before the edit is
1693
svn_wc_status_set_repos_locks (void *set_locks_baton,
1695
const char *repos_root,
1701
/** @since New in 1.2.
1703
* Copy @a src to @a dst_basename in @a dst_parent, and schedule
1704
* @a dst_basename for addition to the repository, remembering the copy
1707
* @a src must be a file or directory under version control; @a dst_parent
1708
* must be a directory under version control in the same working copy;
1709
* @a dst_basename will be the name of the copied item, and it must not
1712
* If @a cancel_func is non-null, call it with @a cancel_baton at
1713
* various points during the operation. If it returns an error
1714
* (typically @c SVN_ERR_CANCELLED), return that error immediately.
1716
* For each file or directory copied, @a notify_func will be called
1717
* with its path and the @a notify_baton. @a notify_func may be @c NULL
1718
* if you are not interested in this information.
1720
* Important: this is a variant of @c svn_wc_add. No changes will happen
1721
* to the repository until a commit occurs. This scheduling can be
1722
* removed with @c svn_client_revert.
1724
svn_error_t *svn_wc_copy2 (const char *src,
1725
svn_wc_adm_access_t *dst_parent,
1726
const char *dst_basename,
1727
svn_cancel_func_t cancel_func,
1729
svn_wc_notify_func2_t notify_func,
1733
/** @deprecated Provided for backwards compatibility with the 1.1 API.
1735
* Similar to @c svn_wc_copy2, but takes an @c svn_wc_notify_func_t instead.
1737
svn_error_t *svn_wc_copy (const char *src,
1738
svn_wc_adm_access_t *dst_parent,
1739
const char *dst_basename,
1740
svn_cancel_func_t cancel_func,
1742
svn_wc_notify_func_t notify_func,
1746
/** @since New in 1.2.
1748
* Schedule @a path for deletion, it will be deleted from the repository on
1749
* the next commit. If @a path refers to a directory, then a recursive
1750
* deletion will occur. @a adm_access must hold a write lock for the parent
1753
* This function immediately deletes all files, modified and unmodified,
1754
* versioned and unversioned from the working copy. It also immediately
1755
* deletes unversioned directories and directories that are scheduled to be
1756
* added. Only versioned directories will remain in the working copy,
1757
* these get deleted by the update following the commit.
1759
* If @a cancel_func is non-null, call it with @a cancel_baton at
1760
* various points during the operation. If it returns an error
1761
* (typically @c SVN_ERR_CANCELLED), return that error immediately.
1763
* For each path marked for deletion, @a notify_func will be called with
1764
* the @a notify_baton and that path. The @a notify_func callback may be
1765
* @c NULL if notification is not needed.
1767
svn_error_t *svn_wc_delete2 (const char *path,
1768
svn_wc_adm_access_t *adm_access,
1769
svn_cancel_func_t cancel_func,
1771
svn_wc_notify_func2_t notify_func,
1775
/** @deprecated Provided for backwards compatibility with the 1.1 API.
1777
* Similar to @c svn_wc_delete2, but takes an @c svn_wc_notify_func_t instead.
1779
svn_error_t *svn_wc_delete (const char *path,
1780
svn_wc_adm_access_t *adm_access,
1781
svn_cancel_func_t cancel_func,
1783
svn_wc_notify_func_t notify_func,
1788
/** @since New in 1.2.
1790
* Put @a path under version control by adding an entry in its parent,
1791
* and, if @a path is a directory, adding an administrative area. The
1792
* new entry and anything under it is scheduled for addition to the
1793
* repository. @a parent_access should hold a write lock for the parent
1794
* directory of @a path. If @a path is a directory then an access baton
1795
* for @a path will be added to the set containing @a parent_access.
1797
* If @a path does not exist, return @c SVN_ERR_WC_PATH_NOT_FOUND.
1799
* If @a copyfrom_url is non-null, it and @a copyfrom_rev are used as
1800
* `copyfrom' args. This is for copy operations, where one wants
1801
* to schedule @a path for addition with a particular history.
1803
* If @a cancel_func is non-null, call it with @a cancel_baton at
1804
* various points during the operation. If it returns an error
1805
* (typically @c SVN_ERR_CANCELLED), return that error immediately.
1807
* When the @a path has been added, then @a notify_func will be called
1808
* (if it is not @c NULL) with the @a notify_baton and the path.
1810
* Return @c SVN_ERR_WC_NODE_KIND_CHANGE if @a path is both an unversioned
1811
* directory and a file that is scheduled for deletion or in state deleted.
1813
*<pre> ### This function currently does double duty -- it is also
1814
* ### responsible for "switching" a working copy directory over to a
1815
* ### new copyfrom ancestry and scheduling it for addition. Here is
1816
* ### the old doc string from Ben, lightly edited to bring it
1817
* ### up-to-date, explaining the true, secret life of this function:</pre>
1819
* Given a @a path within a working copy of type KIND, follow this algorithm:
1821
* - if @a path is not under version control:
1822
* - Place it under version control and schedule for addition;
1823
* if @a copyfrom_url is non-null, use it and @a copyfrom_rev as
1824
* 'copyfrom' history
1826
* - if @a path is already under version control:
1827
* (This can only happen when a directory is copied, in which
1828
* case ancestry must have been supplied as well.)
1830
* - Schedule the directory itself for addition with copyfrom history.
1831
* - Mark all its children with a 'copied' flag
1832
* - Rewrite all the URLs to what they will be after a commit.
1833
* - ### TODO: remove old wcprops too, see the '###'below
1835
*<pre> ### I think possibly the "switchover" functionality should be
1836
* ### broken out into a separate function, but its all intertwined in
1837
* ### the code right now. Ben, thoughts? Hard? Easy? Mauve?</pre>
1839
* ### Update: see "###" comment in svn_wc_add_repos_file()'s doc
1840
* string about this.
1842
svn_error_t *svn_wc_add2 (const char *path,
1843
svn_wc_adm_access_t *parent_access,
1844
const char *copyfrom_url,
1845
svn_revnum_t copyfrom_rev,
1846
svn_cancel_func_t cancel_func,
1848
svn_wc_notify_func2_t notify_func,
1852
/** @deprecated Provided for backwards compatibility with the 1.1 API.
1854
* Similar to @c svn_wc_add2, but takes an @c svn_wc_notify_func_t instead.
1856
svn_error_t *svn_wc_add (const char *path,
1857
svn_wc_adm_access_t *parent_access,
1858
const char *copyfrom_url,
1859
svn_revnum_t copyfrom_rev,
1860
svn_cancel_func_t cancel_func,
1862
svn_wc_notify_func_t notify_func,
1866
/** Add a file to a working copy at @a dst_path, obtaining the file's
1867
* contents from @a new_text_path and its properties from @a new_props,
1868
* which normally come from the repository file represented by the
1869
* copyfrom args, see below. The new file will be scheduled for
1870
* addition with history.
1872
* Automatically remove @a new_text_path upon successful completion.
1874
* @a adm_access, or an access baton in its associated set, must
1875
* contain a write lock for the parent of @a dst_path.
1877
* If @a copyfrom_url is non-null, then @a copyfrom_rev must be a
1878
* valid revision number, and together they are the copyfrom history
1881
* Use @a pool for temporary allocations.
1883
* ### This function is very redundant with svn_wc_add(). Ideally,
1884
* we'd merge them, so that svn_wc_add() would just take optional
1885
* new_props and optional copyfrom information. That way it could be
1886
* used for both 'svn add somefilesittingonmydisk' and for adding
1887
* files from repositories, with or without copyfrom history.
1889
* The problem with this Ideal Plan is that svn_wc_add() also takes
1890
* care of recursive URL-rewriting. There's a whole comment in its
1891
* doc string about how that's really weird, outside its core mission,
1892
* etc, etc. So another part of the Ideal Plan is that that
1893
* functionality of svn_wc_add() would move into a separate function.
1895
svn_error_t *svn_wc_add_repos_file (const char *dst_path,
1896
svn_wc_adm_access_t *adm_access,
1897
const char *new_text_path,
1898
apr_hash_t *new_props,
1899
const char *copyfrom_url,
1900
svn_revnum_t copyfrom_rev,
1904
/** Remove entry @a name in @a adm_access from revision control. @a name
1905
* must be either a file or @c SVN_WC_ENTRY_THIS_DIR. @a adm_access must
1906
* hold a write lock.
1908
* If @a name is a file, all its info will be removed from @a adm_access's
1909
* administrative directory. If @a name is @c SVN_WC_ENTRY_THIS_DIR, then
1910
* @a adm_access's entire administrative area will be deleted, along with
1911
* *all* the administrative areas anywhere in the tree below @a adm_access.
1913
* Normally, only administrative data is removed. However, if
1914
* @a destroy_wf is true, then all working file(s) and dirs are deleted
1915
* from disk as well. When called with @a destroy_wf, any locally
1916
* modified files will *not* be deleted, and the special error
1917
* @c SVN_ERR_WC_LEFT_LOCAL_MOD might be returned. (Callers only need to
1918
* check for this special return value if @a destroy_wf is true.)
1920
* If @a instant_error is TRUE, then return @c
1921
* SVN_ERR_WC_LEFT_LOCAL_MOD the instant a locally modified file is
1922
* encountered. Otherwise, leave locally modified files in place and
1923
* return the error only after all the recursion is complete.
1925
* If @a cancel_func is non-null, call it with @a cancel_baton at
1926
* various points during the removal. If it returns an error
1927
* (typically @c SVN_ERR_CANCELLED), return that error immediately.
1929
* WARNING: This routine is exported for careful, measured use by
1930
* libsvn_client. Do *not* call this routine unless you really
1931
* understand what the heck you're doing.
1934
svn_wc_remove_from_revision_control (svn_wc_adm_access_t *adm_access,
1936
svn_boolean_t destroy_wf,
1937
svn_boolean_t instant_error,
1938
svn_cancel_func_t cancel_func,
1944
* @since New in 1.2.
1946
* Assuming @a path is under version control and in a state of conflict,
1947
* then take @a path *out* of this state. If @a resolve_text is true then
1948
* any text conflict is resolved, if @a resolve_props is true then any
1949
* property conflicts are resolved. If @a recurse is true, then search
1950
* recursively for conflicts to resolve.
1952
* @a adm_access is an access baton, with a write lock, for @a path.
1954
* Needless to say, this function doesn't touch conflict markers or
1955
* anything of that sort -- only a human can semantically resolve a
1956
* conflict. Instead, this function simply marks a file as "having
1957
* been resolved", clearing the way for a commit.
1959
* The implementation details are opaque, as our "conflicted" criteria
1960
* might change over time. (At the moment, this routine removes the
1961
* three fulltext 'backup' files and any .prej file created in a conflict,
1962
* and modifies @a path's entry.)
1964
* If @a path is not under version control, return @c SVN_ERR_ENTRY_NOT_FOUND.
1965
* If @a path isn't in a state of conflict to begin with, do nothing, and
1966
* return @c SVN_NO_ERROR.
1968
* If @c path was successfully taken out of a state of conflict, report this
1969
* information to @c notify_func (if non-@c NULL.) If only text or only
1970
* property conflict resolution was requested, and it was successful, then
1971
* success gets reported.
1973
svn_error_t *svn_wc_resolved_conflict2 (const char *path,
1974
svn_wc_adm_access_t *adm_access,
1975
svn_boolean_t resolve_text,
1976
svn_boolean_t resolve_props,
1977
svn_boolean_t recurse,
1978
svn_wc_notify_func2_t notify_func,
1980
svn_cancel_func_t cancel_func,
1985
* @deprecated Provided for backward compatibility with the 1.0 API.
1987
* Similar to svn_wc_resolved_conflict2(), but takes an
1988
* svn_wc_notify_func_t and doesn't have cancellation support.
1990
svn_error_t *svn_wc_resolved_conflict (const char *path,
1991
svn_wc_adm_access_t *adm_access,
1992
svn_boolean_t resolve_text,
1993
svn_boolean_t resolve_props,
1994
svn_boolean_t recurse,
1995
svn_wc_notify_func_t notify_func,
2002
/** @since New in 1.2.
2003
* Bump a successfully committed absolute @a path to @a new_revnum after a
2004
* commit succeeds. @a rev_date and @a rev_author are the (server-side)
2005
* date and author of the new revision; one or both may be @c NULL.
2006
* @a adm_access must hold a write lock appropriate for @a path.
2008
* If non-null, @a wcprops is an array of <tt>svn_prop_t *</tt> changes to
2009
* wc properties; if an @c svn_prop_t->value is null, then that property is
2012
* If @a remove_lock is @c TRUE, any entryprops related to a repository
2013
* lock will be removed.
2015
* If @a recurse is true and @a path is a directory, then bump every
2016
* versioned object at or under @a path. This is usually done for
2019
svn_error_t *svn_wc_process_committed2 (const char *path,
2020
svn_wc_adm_access_t *adm_access,
2021
svn_boolean_t recurse,
2022
svn_revnum_t new_revnum,
2023
const char *rev_date,
2024
const char *rev_author,
2025
apr_array_header_t *wcprop_changes,
2026
svn_boolean_t remove_lock,
2030
/** @deprecated Provided for backwards compability with the 1.1 API.
2032
* Similar to @c svn_wc_process_committed2, but with @a remove_lock set to
2034
svn_error_t *svn_wc_process_committed (const char *path,
2035
svn_wc_adm_access_t *adm_access,
2036
svn_boolean_t recurse,
2037
svn_revnum_t new_revnum,
2038
const char *rev_date,
2039
const char *rev_author,
2040
apr_array_header_t *wcprop_changes,
2047
/** @since New in 1.2.
2049
* Do a depth-first crawl in a working copy, beginning at @a path.
2051
* Communicate the `state' of the working copy's revisions to
2052
* @a reporter/@a report_baton. Obviously, if @a path is a file instead
2053
* of a directory, this depth-first crawl will be a short one.
2055
* No locks are or logs are created, nor are any animals harmed in the
2056
* process. No cleanup is necessary. @a adm_access must be an access
2057
* baton for the @a path hierarchy, it does not require a write lock.
2059
* After all revisions are reported, @a reporter->finish_report() is
2060
* called, which immediately causes the RA layer to update the working
2061
* copy. Thus the return value may very well reflect the result of
2064
* If @a restore_files is true, then unexpectedly missing working files
2065
* will be restored from the administrative directory's cache. For each
2066
* file restored, the @a notify_func function will be called with the
2067
* @a notify_baton and the path of the restored file. @a notify_func may
2068
* be @c NULL if this notification is not required. If @a
2069
* use_commit_times is true, then set restored files' timestamps to
2070
* their last-commit-times.
2072
* If @a traversal_info is non-null, then record pre-update traversal
2073
* state in it. (Caller should obtain @a traversal_info from
2074
* @c svn_wc_init_traversal_info.)
2077
svn_wc_crawl_revisions2 (const char *path,
2078
svn_wc_adm_access_t *adm_access,
2079
const svn_ra_reporter2_t *reporter,
2081
svn_boolean_t restore_files,
2082
svn_boolean_t recurse,
2083
svn_boolean_t use_commit_times,
2084
svn_wc_notify_func2_t notify_func,
2086
svn_wc_traversal_info_t *traversal_info,
2089
/** @deprecated Provided for backwards compatibility with the 1.1 API.
2091
* Similar to @c svn_wc_crawl_revisions2, but takes an svn_wc_notify_func_t
2092
* and a @c svn_reporter_t instead.
2095
svn_wc_crawl_revisions (const char *path,
2096
svn_wc_adm_access_t *adm_access,
2097
const svn_ra_reporter_t *reporter,
2099
svn_boolean_t restore_files,
2100
svn_boolean_t recurse,
2101
svn_boolean_t use_commit_times,
2102
svn_wc_notify_func_t notify_func,
2104
svn_wc_traversal_info_t *traversal_info,
2110
/** Set @a *wc_root to @c TRUE if @a path represents a "working copy root",
2111
* @c FALSE otherwise. Use @a pool for any intermediate allocations.
2113
* If @a path is not found, return the error @c SVN_ERR_ENTRY_NOT_FOUND.
2115
* NOTE: Due to the way in which "WC-root-ness" is calculated, passing
2116
* a @a path of `.' to this function will always return @c TRUE.
2118
svn_error_t *svn_wc_is_wc_root (svn_boolean_t *wc_root,
2120
svn_wc_adm_access_t *adm_access,
2124
/** Conditionally split @a path into an @a anchor and @a target for the
2125
* purpose of updating and committing.
2127
* @a anchor is the directory at which the update or commit editor
2130
* @a target is the actual subject (relative to the @a anchor) of the
2131
* update/commit, or "" if the @a anchor itself is the subject.
2133
* Allocate @a anchor and @a target in @a pool.
2135
svn_error_t *svn_wc_get_actual_target (const char *path,
2136
const char **anchor,
2137
const char **target,
2142
/* Update and update-like functionality. */
2144
/** @since New in 1.2.
2146
* Set @a *editor and @a *edit_baton to an editor and baton for updating a
2149
* If @a ti is non-null, record traversal info in @a ti, for use by
2150
* post-traversal accessors such as @c svn_wc_edited_externals().
2152
* @a anchor is an access baton, with a write lock, for the local path to the
2153
* working copy which will be used as the root of our editor. Further
2154
* locks will be acquired if the update creates new directories. All
2155
* locks, both those in @a anchor and newly acquired ones, will be released
2156
* when the editor driver calls @c close_edit.
2158
* @a target is the entry in @a anchor that will actually be updated, or
2159
* empty if all of @a anchor should be updated.
2161
* The editor invokes @a notify_func with @a notify_baton as the update
2162
* progresses, if @a notify_func is non-null.
2164
* If @a cancel_func is non-null, the editor will invoke @a cancel_func with
2165
* @a cancel_baton as the update progresses to see if it should continue.
2167
* If @a diff3_cmd is non-null, then use it as the diff3 command for
2168
* any merging; otherwise, use the built-in merge code.
2170
* @a target_revision is a pointer to a revision location which, after
2171
* successful completion of the drive of this editor, will be
2172
* populated with the revision to which the working copy was updated.
2174
* If @a use_commit_times is TRUE, then all edited/added files will
2175
* have their working timestamp set to the last-committed-time. If
2176
* FALSE, the working files will be touched with the 'now' time.
2179
svn_error_t *svn_wc_get_update_editor2 (svn_revnum_t *target_revision,
2180
svn_wc_adm_access_t *anchor,
2182
svn_boolean_t use_commit_times,
2183
svn_boolean_t recurse,
2184
svn_wc_notify_func2_t notify_func,
2186
svn_cancel_func_t cancel_func,
2188
const char *diff3_cmd,
2189
const svn_delta_editor_t **editor,
2191
svn_wc_traversal_info_t *ti,
2194
/** @deprecated Provided for backwards compatibility with the 1.1 API.
2196
* Similar to @c svn_wc_get_update_editor, but takes an svn_wc_notify_func_t
2199
svn_error_t *svn_wc_get_update_editor (svn_revnum_t *target_revision,
2200
svn_wc_adm_access_t *anchor,
2202
svn_boolean_t use_commit_times,
2203
svn_boolean_t recurse,
2204
svn_wc_notify_func_t notify_func,
2206
svn_cancel_func_t cancel_func,
2208
const char *diff3_cmd,
2209
const svn_delta_editor_t **editor,
2211
svn_wc_traversal_info_t *ti,
2214
/** @since New in 1.2.
2216
* A variant of @c svn_wc_get_update_editor().
2218
* Set @a *editor and @a *edit_baton to an editor and baton for "switching"
2219
* a working copy to a new @a switch_url. (Right now, this URL must be
2220
* within the same repository that the working copy already comes
2221
* from.) @a switch_url must not be @c NULL.
2223
* If @a ti is non-null, record traversal info in @a ti, for use by
2224
* post-traversal accessors such as @c svn_wc_edited_externals().
2226
* @a anchor is an access baton, with a write lock, for the local path to the
2227
* working copy which will be used as the root of our editor. Further
2228
* locks will be acquired if the switch creates new directories. All
2229
* locks, both those in @a anchor and newly acquired ones, will be released
2230
* when the editor driver calls @c close_edit.
2232
* @a target is the entry in @a anchor that will actually be updated, or
2233
* empty if all of @a anchor should be updated.
2235
* The editor invokes @a notify_func with @a notify_baton as the switch
2236
* progresses, if @a notify_func is non-null.
2238
* If @a cancel_func is non-null, it will be called with @a cancel_baton as
2239
* the switch progresses to determine if it should continue.
2241
* If @a diff3_cmd is non-null, then use it as the diff3 command for
2242
* any merging; otherwise, use the built-in merge code.
2244
* @a target_revision is a pointer to a revision location which, after
2245
* successful completion of the drive of this editor, will be
2246
* populated with the revision to which the working copy was updated.
2248
* If @a use_commit_times is TRUE, then all edited/added files will
2249
* have their working timestamp set to the last-committed-time. If
2250
* FALSE, the working files will be touched with the 'now' time.
2253
svn_error_t *svn_wc_get_switch_editor2 (svn_revnum_t *target_revision,
2254
svn_wc_adm_access_t *anchor,
2256
const char *switch_url,
2257
svn_boolean_t use_commit_times,
2258
svn_boolean_t recurse,
2259
svn_wc_notify_func2_t notify_func,
2261
svn_cancel_func_t cancel_func,
2263
const char *diff3_cmd,
2264
const svn_delta_editor_t **editor,
2266
svn_wc_traversal_info_t *ti,
2269
/** @deprecated Provided for backwards compatibility with the 1.2 API.
2271
* Similar to @c svn_wc_get_switch_editor, but takes an @c svn_wc_notify_func_t
2274
svn_error_t *svn_wc_get_switch_editor (svn_revnum_t *target_revision,
2275
svn_wc_adm_access_t *anchor,
2277
const char *switch_url,
2278
svn_boolean_t use_commit_times,
2279
svn_boolean_t recurse,
2280
svn_wc_notify_func_t notify_func,
2282
svn_cancel_func_t cancel_func,
2284
const char *diff3_cmd,
2285
const svn_delta_editor_t **editor,
2287
svn_wc_traversal_info_t *ti,
2292
/* A word about the implementation of working copy property storage:
2294
* Since properties are key/val pairs, you'd think we store them in
2295
* some sort of Berkeley DB-ish format, and even store pending changes
2296
* to them that way too.
2298
* However, we already have libsvn_subr/hashdump.c working, and it
2299
* uses a human-readable format. That will be very handy when we're
2300
* debugging, and presumably we will not be dealing with any huge
2301
* properties or property lists initially. Therefore, we will
2302
* continue to use hashdump as the internal mechanism for storing and
2303
* reading from property lists, but note that the interface here is
2304
* _not_ dependent on that. We can swap in a DB-based implementation
2305
* at any time and users of this library will never know the
2309
/** Set @a *props to a hash table mapping <tt>char *</tt> names onto
2310
* <tt>svn_string_t *</tt> values for all the regular properties of
2311
* @a path. Allocate the table, names, and values in @a pool. If
2312
* the node has no properties, an empty hash is returned. @a adm_access
2313
* is an access baton set that contains @a path.
2315
svn_error_t *svn_wc_prop_list (apr_hash_t **props,
2317
svn_wc_adm_access_t *adm_access,
2321
/** Set @a *value to the value of property @a name for @a path, allocating
2322
* @a *value in @a pool. If no such prop, set @a *value to @c NULL.
2323
* @a name may be a regular or wc property; if it is an entry property,
2324
* return the error @c SVN_ERR_BAD_PROP_KIND. @a adm_access is an access
2325
* baton set that contains @a path.
2327
svn_error_t *svn_wc_prop_get (const svn_string_t **value,
2330
svn_wc_adm_access_t *adm_access,
2334
* @since New in 1.2.
2336
* Set property @a name to @a value for @a path, or if @a value is
2337
* null, remove property @a name from @a path. @a adm_access is an
2338
* access baton with a write lock for @a path.
2340
* If @a skip_checks is true, do no validity checking. But if @a
2341
* skip_checks is false, and @a name is not a valid property for @a
2342
* path, return an error, either @c SVN_ERR_ILLEGAL_TARGET (if the
2343
* property is not appropriate for @a path), or @c
2344
* SVN_ERR_BAD_MIME_TYPE (if @a name is "svn:mime-type", but @a value
2345
* is not a valid mime-type).
2347
* @a name may be a wc property or a regular property; but if it is an
2348
* entry property, return the error @c SVN_ERR_BAD_PROP_KIND, even if
2349
* @a skip_checks is true.
2351
* Use @a pool for temporary allocation.
2353
svn_error_t *svn_wc_prop_set2 (const char *name,
2354
const svn_string_t *value,
2356
svn_wc_adm_access_t *adm_access,
2357
svn_boolean_t skip_checks,
2362
* @deprecated Provided for backward compatibility with the 1.1 API.
2364
* Like svn_wc_prop_set2(), but with @a skip_checks always false.
2366
svn_error_t *svn_wc_prop_set (const char *name,
2367
const svn_string_t *value,
2369
svn_wc_adm_access_t *adm_access,
2373
/** Return true iff @a name is a 'normal' property name. 'Normal' is
2374
* defined as a user-visible and user-tweakable property that shows up
2375
* when you fetch a proplist.
2377
* The function currently parses the namespace like so:
2379
* - 'svn:wc:' ==> a wcprop, stored/accessed separately via different API.
2381
* - 'svn:entry:' ==> an "entry" prop, shunted into the 'entries' file.
2383
* If these patterns aren't found, then the property is assumed to be
2386
svn_boolean_t svn_wc_is_normal_prop (const char *name);
2390
/** Return true iff @a name is a 'wc' property name. */
2391
svn_boolean_t svn_wc_is_wc_prop (const char *name);
2393
/** Return true iff @a name is a 'entry' property name. */
2394
svn_boolean_t svn_wc_is_entry_prop (const char *name);
2403
* @since New in 1.2.
2405
* Return an @a editor/@a edit_baton for diffing a working copy against the
2408
* @a anchor/@a target represent the base of the hierarchy to be compared.
2410
* @a callbacks/@a callback_baton is the callback table to use when two
2411
* files are to be compared.
2413
* @a recurse determines whether to descend into subdirectories when @a target
2414
* is a directory. If @a recurse is @c TRUE then @a anchor should be part of
2415
* an access baton set for the @a target hierarchy.
2417
* @a ignore_ancestry determines whether paths that have discontinuous node
2418
* ancestry are treated as delete/add or as simple modifications. If
2419
* @a ignore_ancestry is @c FALSE, then any discontinuous node ancestry will
2420
* result in the diff given as a full delete followed by an add.
2422
* If @a use_text_base is true, then compare the repository against
2423
* the working copy's text-base files, rather than the working files.
2425
* Normally, the difference from repository->working_copy is shown.
2426
* If @ reverse_order is true, then show working_copy->repository diffs.
2428
* If @a cancel_func is non-null, it will be used along with @a cancel_baton
2429
* to periodically check if the client has canceled the operation.
2431
svn_error_t *svn_wc_get_diff_editor3 (svn_wc_adm_access_t *anchor,
2433
const svn_wc_diff_callbacks2_t *callbacks,
2434
void *callback_baton,
2435
svn_boolean_t recurse,
2436
svn_boolean_t ignore_ancestry,
2437
svn_boolean_t use_text_base,
2438
svn_boolean_t reverse_order,
2439
svn_cancel_func_t cancel_func,
2441
const svn_delta_editor_t **editor,
2447
* @deprecated Provided for backward compatibility with the 1.1 API.
2449
* Similar to @c svn_wc_get_diff_editor3(), but with an
2450
* @c svn_wc_diff_callbacks_t instead of @c svn_wc_diff_callbacks2_t. */
2451
svn_error_t *svn_wc_get_diff_editor2 (svn_wc_adm_access_t *anchor,
2453
const svn_wc_diff_callbacks_t *callbacks,
2454
void *callback_baton,
2455
svn_boolean_t recurse,
2456
svn_boolean_t ignore_ancestry,
2457
svn_boolean_t use_text_base,
2458
svn_boolean_t reverse_order,
2459
svn_cancel_func_t cancel_func,
2461
const svn_delta_editor_t **editor,
2467
* @deprecated Provided for backward compatibility with the 1.0 API.
2469
* Similar to svn_wc_get_diff_editor2(), but with @a ignore_ancestry
2470
* always set to @c FALSE.
2472
svn_error_t *svn_wc_get_diff_editor (svn_wc_adm_access_t *anchor,
2474
const svn_wc_diff_callbacks_t *callbacks,
2475
void *callback_baton,
2476
svn_boolean_t recurse,
2477
svn_boolean_t use_text_base,
2478
svn_boolean_t reverse_order,
2479
svn_cancel_func_t cancel_func,
2481
const svn_delta_editor_t **editor,
2487
* @since New in 1.2.
2489
* Compare working copy against the text-base.
2491
* @a anchor/@a target represent the base of the hierarchy to be compared.
2493
* @a callbacks/@a callback_baton is the callback table to use when two
2494
* files are to be compared.
2496
* @a recurse determines whether to descend into subdirectories when @a target
2497
* is a directory. If @a recurse is @c TRUE then @a anchor should be part of
2498
* an access baton set for the @a target hierarchy.
2500
* @a ignore_ancestry determines whether paths that have discontinuous node
2501
* ancestry are treated as delete/add or as simple modifications. If
2502
* @a ignore_ancestry is @c FALSE, then any discontinuous node ancestry will
2503
* result in the diff given as a full delete followed by an add.
2505
svn_error_t *svn_wc_diff3 (svn_wc_adm_access_t *anchor,
2507
const svn_wc_diff_callbacks2_t *callbacks,
2508
void *callback_baton,
2509
svn_boolean_t recurse,
2510
svn_boolean_t ignore_ancestry,
2514
* @deprecated Provided for backward compatibility with the 1.1 API.
2516
* Similar to @c svn_wc_diff3, but with a @c svn_wc_diff_callbacks_t argument
2517
* instead of @c svn_wc_diff_callbacks2_t. */
2518
svn_error_t *svn_wc_diff2 (svn_wc_adm_access_t *anchor,
2520
const svn_wc_diff_callbacks_t *callbacks,
2521
void *callback_baton,
2522
svn_boolean_t recurse,
2523
svn_boolean_t ignore_ancestry,
2527
* @deprecated Provided for backward compatibility with the 1.0 API.
2529
* Similar to svn_wc_diff2(), but with @a ignore_ancestry always set
2532
svn_error_t *svn_wc_diff (svn_wc_adm_access_t *anchor,
2534
const svn_wc_diff_callbacks_t *callbacks,
2535
void *callback_baton,
2536
svn_boolean_t recurse,
2540
/** Given a @a path to a file or directory under version control, discover
2541
* any local changes made to properties and/or the set of 'pristine'
2542
* properties. @a adm_access is an access baton set for @a path.
2544
* If @a propchanges is non-@c NULL, return these changes as an array of
2545
* @c svn_prop_t structures stored in @a *propchanges. The structures and
2546
* array will be allocated in @a pool. If there are no local property
2547
* modifications on @a path, then set @a *propchanges to @c NULL.
2549
* If @a original_props is non-@c NULL, then set @a *original_props to
2550
* hashtable (<tt>const char *name</tt> -> <tt>const svn_string_t *value</tt>)
2551
* that represents the 'pristine' property list of @a path. This hashtable is
2552
* allocated in @a pool, and can be used to compare old and new values of
2555
svn_error_t *svn_wc_get_prop_diffs (apr_array_header_t **propchanges,
2556
apr_hash_t **original_props,
2558
svn_wc_adm_access_t *adm_access,
2562
/** The outcome of a merge carried out (or tried as a dry-run) by
2565
typedef enum svn_wc_merge_outcome_t
2567
/** The working copy is (or would be) unchanged. The changes to be
2568
* merged were already present in the working copy
2570
svn_wc_merge_unchanged,
2572
/** The working copy has been (or would be) changed. */
2573
svn_wc_merge_merged,
2575
/** The working copy has been (or would be) changed, but there was (or
2576
* would be) a conflict
2578
svn_wc_merge_conflict,
2580
/** No merge was performed, probably because the target file was
2581
* either absent or not under version control.
2583
svn_wc_merge_no_merge
2585
} svn_wc_merge_outcome_t;
2587
/** Given paths to three fulltexts, merge the differences between @a left
2588
* and @a right into @a merge_target. (It may help to know that @a left,
2589
* @a right, and @a merge_target correspond to "OLDER", "YOURS", and "MINE",
2590
* respectively, in the diff3 documentation.) Use @a pool for any
2591
* temporary allocation.
2593
* @a adm_access is an access baton with a write lock for the directory
2594
* containing @a merge_target.
2596
* This function assumes that @a left and @a right are in repository-normal
2597
* form (linefeeds, with keywords contracted); if necessary,
2598
* @a merge_target is temporarily converted to this form to receive the
2599
* changes, then translated back again.
2601
* If @a merge_target is absent, or present but not under version
2602
* control, then set @a *merge_outcome to svn_wc_merge_no_merge and
2603
* return success without merging anything. (The reasoning is that if
2604
* the file is not versioned, then it is probably unrelated to the
2605
* changes being considered, so they should not be merged into it.)
2607
* @a dry_run determines whether the working copy is modified. When it
2608
* is @c FALSE the merge will cause @a merge_target to be modified, when it
2609
* is @c TRUE the merge will be carried out to determine the result but
2610
* @a merge_target will not be modified.
2612
* If @a diff3_cmd is non-null, then use it as the diff3 command for
2613
* any merging; otherwise, use the built-in merge code.
2615
* The outcome of the merge is returned in @a *merge_outcome. If there is
2616
* a conflict and @a dry_run is @c FALSE, then
2618
* * Put conflict markers around the conflicting regions in
2619
* @a merge_target, labeled with @a left_label, @a right_label, and
2620
* @a target_label. (If any of these labels are @c NULL, default
2621
* values will be used.)
2623
* * Copy @a left, @a right, and the original @a merge_target to unique
2624
* names in the same directory as @a merge_target, ending with the
2625
* suffixes ".LEFT_LABEL", ".RIGHT_LABEL", and ".TARGET_LABEL"
2628
* * Mark the entry for @a merge_target as "conflicted", and track the
2629
* above mentioned backup files in the entry as well.
2633
* If @a merge_target is a binary file, then no merging is attempted,
2634
* the merge is deemed to be a conflict. If @a dry_run is @c FALSE the
2635
* working @a merge_target is untouched, and copies of @a left and
2636
* @a right are created next to it using @a left_label and @a right_label.
2637
* @a merge_target's entry is marked as "conflicted", and begins
2638
* tracking the two backup files. If @a dry_run is @c TRUE no files are
2639
* changed. The outcome of the merge is returned in @a *merge_outcome.
2641
svn_error_t *svn_wc_merge (const char *left,
2643
const char *merge_target,
2644
svn_wc_adm_access_t *adm_access,
2645
const char *left_label,
2646
const char *right_label,
2647
const char *target_label,
2648
svn_boolean_t dry_run,
2649
enum svn_wc_merge_outcome_t *merge_outcome,
2650
const char *diff3_cmd,
2654
/** Given a @a path under version control, merge an array of @a propchanges
2655
* into the path's existing properties. @a propchanges is an array of
2656
* @c svn_prop_t objects. @a adm_access is an access baton for the directory
2657
* containing @a path.
2659
* If @a base_merge is @c FALSE only the working properties will be changed,
2660
* if it is @c TRUE both the base and working properties will be changed.
2662
* If @a state is non-null, set @a *state to the state of the properties
2665
* If conflicts are found when merging working properties, they are
2666
* described in a temporary .prej file (or appended to an already-existing
2667
* .prej file), and the entry is marked "conflicted". Base properties
2668
* are changed unconditionally, if @a base_merge is @c TRUE, they never result
2671
* If @a path is not under version control, return the error
2672
* SVN_ERR_UNVERSIONED_RESOURCE and don't touch anyone's properties.
2675
svn_wc_merge_prop_diffs (svn_wc_notify_state_t *state,
2677
svn_wc_adm_access_t *adm_access,
2678
const apr_array_header_t *propchanges,
2679
svn_boolean_t base_merge,
2680
svn_boolean_t dry_run,
2685
/** Given a @a path to a wc file, return a @a pristine_path which points to a
2686
* pristine version of the file. This is needed so clients can do
2687
* diffs. If the WC has no text-base, return a @c NULL instead of a
2690
svn_error_t *svn_wc_get_pristine_copy_path (const char *path,
2691
const char **pristine_path,
2696
* @since New in 1.2.
2698
* Recurse from @a path, cleaning up unfinished log business. Perform
2699
* necessary allocations in @a pool. Any working copy locks under @a path
2700
* will be taken over and then cleared by this function. If @a diff3_cmd
2701
* is non-null, then use it as the diff3 command for any merging; otherwise,
2702
* use the built-in merge code.
2704
* WARNING: there is no mechanism that will protect locks that are still
2707
* If @a cancel_func is non-null, invoke it with @a cancel_baton at
2708
* various points during the operation. If it returns an error
2709
* (typically @c SVN_ERR_CANCELLED), return that error immediately.
2712
svn_wc_cleanup2 (const char *path,
2713
const char *diff3_cmd,
2714
svn_cancel_func_t cancel_func,
2719
* @deprecated Provided for backward compatibility with the 1.1 API.
2721
* Similar to svn_wc_cleanup2(). @a optional_adm_access is an historic
2722
* relic and not used, it may be NULL.
2725
svn_wc_cleanup (const char *path,
2726
svn_wc_adm_access_t *optional_adm_access,
2727
const char *diff3_cmd,
2728
svn_cancel_func_t cancel_func,
2733
/** Relocation validation callback typedef.
2735
* Called for each relocated file/directory. @a uuid contains the
2736
* expected repository UUID, @a url contains the tentative URL.
2738
* @a baton is a closure object; it should be provided by the
2739
* implementation, and passed by the caller.
2741
typedef svn_error_t *(*svn_wc_relocation_validator_t) (void *baton,
2746
/** Change repository references at @a path that begin with @a from
2747
* to begin with @a to instead. Perform necessary allocations in @a pool.
2748
* If @a recurse is true, do so. @a validator (and its baton,
2749
* @a validator_baton), will be called for each newly generated URL.
2751
* @a adm_access is an access baton for the directory containing
2755
svn_wc_relocate (const char *path,
2756
svn_wc_adm_access_t *adm_access,
2759
svn_boolean_t recurse,
2760
svn_wc_relocation_validator_t validator,
2761
void *validator_baton,
2765
/** @since New in 1.2.
2767
* Revert changes to @a path (perhaps in a @a recursive fashion). Perform
2768
* necessary allocations in @a pool.
2770
* @a parent_access is an access baton for the directory containing @a path,
2771
* unless @a path is a wc root, in which case @a parent_access refers to
2774
* If @a cancel_func is non-null, call it with @a cancel_baton at
2775
* various points during the reversion process. If it returns an
2776
* error (typically @c SVN_ERR_CANCELLED), return that error
2779
* If @a use_commit_times is TRUE, then all reverted working-files
2780
* will have their timestamp set to the last-committed-time. If
2781
* FALSE, the reverted working-files will be touched with the 'now' time.
2783
* For each item reverted, @a notify_func will be called with @a notify_baton
2784
* and the path of the reverted item. @a notify_func may be @c NULL if this
2785
* notification is not needed.
2787
* If @a path is not under version control, return the error
2788
* SVN_ERR_UNVERSIONED_RESOURCE.
2791
svn_wc_revert2 (const char *path,
2792
svn_wc_adm_access_t *parent_access,
2793
svn_boolean_t recursive,
2794
svn_boolean_t use_commit_times,
2795
svn_cancel_func_t cancel_func,
2797
svn_wc_notify_func2_t notify_func,
2801
/** @deprecated Provided for backwards compatibility with the 1.1 API.
2803
* Similar to @c svn_wc_revert2, but takes an @c svn_wc_notify_func_t instead.
2806
svn_wc_revert (const char *path,
2807
svn_wc_adm_access_t *parent_access,
2808
svn_boolean_t recursive,
2809
svn_boolean_t use_commit_times,
2810
svn_cancel_func_t cancel_func,
2812
svn_wc_notify_func_t notify_func,
2819
/** Create a unique temporary file in administrative tmp/ area of
2820
* directory @a path. Return a handle in @a *fp.
2822
* The flags will be <tt>APR_WRITE | APR_CREATE | APR_EXCL</tt> and
2823
* optionally @c APR_DELONCLOSE (if the @a delete_on_close argument is
2826
* This means that as soon as @a fp is closed, the tmp file will vanish.
2829
svn_wc_create_tmp_file (apr_file_t **fp,
2831
svn_boolean_t delete_on_close,
2836
/* Eol conversion and keyword expansion. */
2838
/** Set @a *xlated_p to a path to a possibly translated copy of versioned
2839
* file @a vfile, or to @a vfile itself if no translation is necessary.
2840
* That is, if @a vfile's properties indicate newline conversion or
2841
* keyword expansion, point @a *xlated_p to a copy of @a vfile whose
2842
* newlines are unconverted and keywords contracted, in whatever
2843
* manner is indicated by @a vfile's properties; otherwise, set @a *xlated_p
2846
* If @a force_repair is set, the translated file will have any
2847
* inconsistent line endings repaired. This should only be used when
2848
* the resultant file is being created for comparison against @a vfile's
2851
* Caller is responsible for detecting if they are different (pointer
2852
* comparison is sufficient), and for removing @a *xlated_p if
2855
* This function is generally used to get a file that can be compared
2856
* meaningfully against @a vfile's text base.
2858
* If @a *xlated_p is different from @a vfile, then choose @a *xlated_p's
2859
* name using @c svn_io_open_unique_file() with @c SVN_WC__TMP_EXT, and
2860
* allocate it in @a pool. Also use @a pool for any temporary allocation.
2862
* If an error is returned, the effect on @a *xlated_p is undefined.
2864
svn_error_t *svn_wc_translated_file (const char **xlated_p,
2866
svn_wc_adm_access_t *adm_access,
2867
svn_boolean_t force_repair,
2872
/* Text/Prop Deltas Using an Editor */
2875
/** Send the local modifications for versioned file @a path (with
2876
* matching @a file_baton) through @a editor, then close @a file_baton
2877
* afterwards. Use @a pool for any temporary allocation and
2878
* @a adm_access as an access baton for @a path.
2880
* This process creates a copy of @a path with keywords and eol
2881
* untranslated. If @a tempfile is non-null, set @a *tempfile to the
2882
* path to this copy. Do not clean up the copy; caller can do that.
2883
* (The purpose of handing back the tmp copy is that it is usually about
2884
* to become the new text base anyway, but the installation of the new
2885
* text base is outside the scope of this function.)
2887
* If @a fulltext, send the untranslated copy of @a path through @a editor
2888
* as full-text; else send it as svndiff against the current text base.
2890
* If sending a diff, and the recorded checksum for @a path's text-base
2891
* does not match the current actual checksum, then remove the tmp
2892
* copy (and set @a *tempfile to null if appropriate), and return the
2893
* error @c SVN_ERR_WC_CORRUPT_TEXT_BASE.
2895
* Note: this is intended for use with both infix and postfix
2896
* text-delta styled editor drivers.
2898
svn_error_t *svn_wc_transmit_text_deltas (const char *path,
2899
svn_wc_adm_access_t *adm_access,
2900
svn_boolean_t fulltext,
2901
const svn_delta_editor_t *editor,
2903
const char **tempfile,
2907
/** Given a @a path with its accompanying @a entry, transmit all local
2908
* property modifications using the appropriate @a editor method (in
2909
* conjunction with @a baton). @a adm_access is an access baton set
2910
* that contains @a path. Use @a pool for all allocations.
2912
* If a temporary file remains after this function is finished, the
2913
* path to that file is returned in @a *tempfile (so the caller can
2914
* clean this up if it wishes to do so).
2916
svn_error_t *svn_wc_transmit_prop_deltas (const char *path,
2917
svn_wc_adm_access_t *adm_access,
2918
const svn_wc_entry_t *entry,
2919
const svn_delta_editor_t *editor,
2921
const char **tempfile,
2925
/** Get the run-time configured list of ignore patterns from the
2926
* @c svn_config_t's in the @a config hash, and store them in @a *patterns.
2927
* Allocate @a *patterns and its contents in @a pool.
2929
svn_error_t *svn_wc_get_default_ignores (apr_array_header_t **patterns,
2934
/** Add @a lock to the working copy for @a path. @a adm_access must contain
2935
* a write lock for @a path. If @a path is read-only, due to locking
2936
* properties, make it writable. Perform temporary allocations in @a
2938
svn_error_t *svn_wc_add_lock (const char *path, const svn_lock_t *lock,
2939
svn_wc_adm_access_t *adm_access,
2942
/** Remove any lock from @a path. @a adm_access must contain a
2943
* write-lock for @a path. If @a path has a lock and the locking
2944
* so specifies, make the file read-only. Don't return an error if @a
2945
* path didn't have a lock. Perform temporary allocations in @a pool. */
2946
svn_error_t *svn_wc_remove_lock (const char *path,
2947
svn_wc_adm_access_t *adm_access,
2953
#endif /* __cplusplus */
2955
#endif /* SVN_WC_H */