36
36
* Return path to the thing in the tmp area if TMP is non-zero.
37
37
* Varargs are (const char *)'s, the final one must be NULL.
39
const char * svn_wc__adm_path (const char *path,
39
const char * svn_wc__adm_path(const char *path,
45
45
/* Return TRUE if a thing in the administrative area exists, FALSE
47
svn_boolean_t svn_wc__adm_path_exists (const char *path,
47
svn_boolean_t svn_wc__adm_path_exists(const char *path,
53
53
/* Make `PATH/<adminstrative_subdir>/THING'. */
54
svn_error_t *svn_wc__make_adm_thing (svn_wc_adm_access_t *adm_access,
57
apr_fileperms_t perms,
54
svn_error_t *svn_wc__make_adm_thing(svn_wc_adm_access_t *adm_access,
57
apr_fileperms_t perms,
61
61
/* Atomically rename a temporary text-base file to its canonical
62
62
location. The tmp file should be closed already. */
64
svn_wc__sync_text_base (const char *path, apr_pool_t *pool);
64
svn_wc__sync_text_base(const char *path, apr_pool_t *pool);
67
67
/* Return a path to PATH's text-base file.
68
68
If TMP is set, return a path to the tmp text-base file. */
69
const char *svn_wc__text_base_path (const char *path,
69
const char *svn_wc__text_base_path(const char *path,
74
/* Return a path to PATH's revert file.
75
If TMP is set, return a path to the tmp revert file. */
77
svn_wc__text_revert_path(const char *path,
74
82
/* Return a path to the 'wcprop' file for PATH, possibly in TMP area.
75
ADM_ACCESS is an access baton set that contains PATH. */
76
svn_error_t *svn_wc__wcprop_path (const char **wcprop_path,
78
svn_wc_adm_access_t *adm_access,
83
Valid values for KIND are svn_node_dir and svn_node_file. */
84
svn_error_t *svn_wc__wcprop_path(const char **wcprop_path,
83
91
/* Set *PROP_PATH to PATH's working properties file.
84
92
If TMP is set, return a path to the tmp working property file.
85
93
PATH can be a directory or file, and even have changed w.r.t. the
86
working copy's adm knowledge. ADM_ACCESS is an access baton set
87
that contains PATH. */
88
svn_error_t *svn_wc__prop_path (const char **prop_path,
90
svn_wc_adm_access_t *adm_access,
94
working copy's adm knowledge. Valid values for KIND are svn_node_dir
96
svn_error_t *svn_wc__prop_path(const char **prop_path,
95
103
/* Set *PROP_PATH to PATH's `pristine' properties file.
96
104
If TMP is set, return a path to the tmp working property file.
97
105
PATH can be a directory or file, and even have changed w.r.t. the
98
working copy's adm knowledge. ADM_ACCESS is an access baton set
99
that contains PATH. */
100
svn_error_t *svn_wc__prop_base_path (const char **prop_path,
102
svn_wc_adm_access_t *adm_access,
106
working copy's adm knowledge. Valid values for KIND are svn_node_dir
107
and svn_node_file. */
108
svn_error_t *svn_wc__prop_base_path(const char **prop_path,
110
svn_node_kind_t kind,
115
/* Set *PROP_PATH to PATH's revert properties file.
116
If TMP is set, return a path to the tmp working property file.
117
PATH can be a directory or file, and even have changed w.r.t. the
118
working copy's adm knowledge. Valid values for KIND are svn_node_dir
119
and svn_node_file. */
120
svn_error_t *svn_wc__prop_revert_path(const char **prop_path,
122
svn_node_kind_t kind,
108
127
/*** Opening all kinds of adm files ***/
127
146
/* Open `PATH/<adminstrative_subdir>/FNAME'. */
128
svn_error_t *svn_wc__open_adm_file (apr_file_t **handle,
147
svn_error_t *svn_wc__open_adm_file(apr_file_t **handle,
154
/* Close `PATH/<adminstrative_subdir>/FNAME'. */
155
svn_error_t *svn_wc__close_adm_file(apr_file_t *fp,
129
156
const char *path,
130
157
const char *fname,
132
159
apr_pool_t *pool);
135
/* Close `PATH/<adminstrative_subdir>/FNAME'. */
136
svn_error_t *svn_wc__close_adm_file (apr_file_t *fp,
142
161
/* Remove `PATH/<adminstrative_subdir>/THING'. */
143
svn_error_t *svn_wc__remove_adm_file (const char *path,
147
/* Return the path to the empty file in the adm area of PATH */
148
const char *svn_wc__empty_file_path (const char *path,
152
/* Open *readonly* the empty file in the in adm area of PATH */
153
svn_error_t *svn_wc__open_empty_file (apr_file_t **handle,
157
/* Close the empty file in the adm area of PATH. FP was obtain from
158
* svn_wc__open_empty_file().
160
svn_error_t *svn_wc__close_empty_file (apr_file_t *fp,
162
svn_error_t *svn_wc__remove_adm_file(const char *path,
165
166
/* Open the text-base for FILE.
166
167
* FILE can be any kind of path ending with a filename.
167
168
* Behaves like svn_wc__open_adm_file(), which see.
169
svn_error_t *svn_wc__open_text_base (apr_file_t **handle,
170
svn_error_t *svn_wc__open_text_base(apr_file_t **handle,
175
/* Open the revert-base for FILE.
176
* FILE can be any kind of path ending with a filename.
177
* Behaves like svn_wc__open_adm_file(), which see.
179
svn_error_t *svn_wc__open_revert_base(apr_file_t **handle,
174
184
/* Close the text-base for FILE.
175
185
* FP was obtained from svn_wc__open_text_base().
176
186
* Behaves like svn_wc__close_adm_file(), which see.
178
svn_error_t *svn_wc__close_text_base (apr_file_t *fp,
188
svn_error_t *svn_wc__close_text_base(apr_file_t *fp,
193
/* Close the revert-base for FILE.
194
* FP was obtained from svn_wc__open_revert_base().
195
* Behaves like svn_wc__close_adm_file(), which see.
197
svn_error_t *svn_wc__close_revert_base(apr_file_t *fp,
183
202
/* Open the property file for PATH.
184
203
* PATH can be any kind of path, either file or dir.
203
222
* Like svn_wc__close_adm_file(), SYNC indicates the file should be
204
223
* atomically written.
206
svn_error_t *svn_wc__close_props (apr_file_t *fp,
209
svn_boolean_t wcprops,
225
svn_error_t *svn_wc__close_props(apr_file_t *fp,
228
svn_boolean_t wcprops,
213
232
/* Atomically rename a temporary property file to its canonical
214
233
location. The tmp file should be closed already.
216
235
Again, BASE and WCPROPS flags should be identical to those used to
217
236
open the file. */
218
svn_error_t *svn_wc__sync_props (const char *path,
220
svn_boolean_t wcprops,
237
svn_error_t *svn_wc__sync_props(const char *path,
239
svn_boolean_t wcprops,
223
242
/* Blow away the admistrative directory associated with the access baton
224
243
ADM_ACCESS. This closes ADM_ACCESS, but it is safe to close ADM_ACCESS
225
244
again, after calling this function. */
226
svn_error_t *svn_wc__adm_destroy (svn_wc_adm_access_t *adm_access,
245
svn_error_t *svn_wc__adm_destroy(svn_wc_adm_access_t *adm_access,
230
249
/* Cleanup the temporary storage area of the administrative
232
svn_error_t *svn_wc__adm_cleanup_tmp_area (svn_wc_adm_access_t *adm_access,
235
/* Carries out platform specific operations needed before a file is
236
* replaced via a rename or copy. Currently it only runs
237
* svn_io_set_file_read_write() on Windows. */
238
svn_error_t *svn_wc__prep_file_for_replacement (const char *path,
239
svn_boolean_t ignore_enoent,
251
svn_error_t *svn_wc__adm_cleanup_tmp_area(svn_wc_adm_access_t *adm_access,
243
255
#ifdef __cplusplus