]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/subversion/subversion/include/private/svn_ra_svn_private.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / subversion / subversion / include / private / svn_ra_svn_private.h
1 /**
2  * @copyright
3  * ====================================================================
4  *    Licensed to the Apache Software Foundation (ASF) under one
5  *    or more contributor license agreements.  See the NOTICE file
6  *    distributed with this work for additional information
7  *    regarding copyright ownership.  The ASF licenses this file
8  *    to you under the Apache License, Version 2.0 (the
9  *    "License"); you may not use this file except in compliance
10  *    with the License.  You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  *    Unless required by applicable law or agreed to in writing,
15  *    software distributed under the License is distributed on an
16  *    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
17  *    KIND, either express or implied.  See the License for the
18  *    specific language governing permissions and limitations
19  *    under the License.
20  * ====================================================================
21  * @endcopyright
22  *
23  * @file svn_ra_svn_private.h
24  * @brief Functions used by the server - Internal routines
25  */
26
27 #ifndef SVN_RA_SVN_PRIVATE_H
28 #define SVN_RA_SVN_PRIVATE_H
29
30 #include "svn_ra_svn.h"
31 #include "svn_editor.h"
32
33 #ifdef __cplusplus
34 extern "C" {
35 #endif /* __cplusplus */
36
37
38 /**
39  * Set the shim callbacks to be used by @a conn to @a shim_callbacks.
40  */
41 svn_error_t *
42 svn_ra_svn__set_shim_callbacks(svn_ra_svn_conn_t *conn,
43                                svn_delta_shim_callbacks_t *shim_callbacks);
44
45 /**
46  * @defgroup ra_svn_deprecated ra_svn low-level functions
47  * @{
48  */
49
50 /** Write a number over the net.
51  *
52  * Writes will be buffered until the next read or flush.
53  */
54 svn_error_t *
55 svn_ra_svn__write_number(svn_ra_svn_conn_t *conn,
56                          apr_pool_t *pool,
57                          apr_uint64_t number);
58
59 /** Write a string over the net.
60  *
61  * Writes will be buffered until the next read or flush.
62  */
63 svn_error_t *
64 svn_ra_svn__write_string(svn_ra_svn_conn_t *conn,
65                          apr_pool_t *pool,
66                          const svn_string_t *str);
67
68 /** Write a cstring over the net.
69  *
70  * Writes will be buffered until the next read or flush.
71  */
72 svn_error_t *
73 svn_ra_svn__write_cstring(svn_ra_svn_conn_t *conn,
74                           apr_pool_t *pool,
75                           const char *s);
76
77 /** Write a word over the net.
78  *
79  * Writes will be buffered until the next read or flush.
80  */
81 svn_error_t *
82 svn_ra_svn__write_word(svn_ra_svn_conn_t *conn,
83                        apr_pool_t *pool,
84                        const char *word);
85
86 /** Write a list of properties over the net.  @a props is allowed to be NULL,
87  * in which case an empty list will be written out.
88  *
89  * @since New in 1.5.
90  */
91 svn_error_t *
92 svn_ra_svn__write_proplist(svn_ra_svn_conn_t *conn,
93                            apr_pool_t *pool,
94                            apr_hash_t *props);
95
96 /** Begin a list.  Writes will be buffered until the next read or flush. */
97 svn_error_t *
98 svn_ra_svn__start_list(svn_ra_svn_conn_t *conn,
99                        apr_pool_t *pool);
100
101 /** End a list.  Writes will be buffered until the next read or flush. */
102 svn_error_t *
103 svn_ra_svn__end_list(svn_ra_svn_conn_t *conn,
104                      apr_pool_t *pool);
105
106 /** Flush the write buffer.
107  *
108  * Normally this shouldn't be necessary, since the write buffer is flushed
109  * when a read is attempted.
110  */
111 svn_error_t *
112 svn_ra_svn__flush(svn_ra_svn_conn_t *conn,
113                   apr_pool_t *pool);
114
115 /** Write a tuple, using a printf-like interface.
116  *
117  * The format string @a fmt may contain:
118  *
119  *@verbatim
120      Spec  Argument type         Item type
121      ----  --------------------  ---------
122      n     apr_uint64_t          Number
123      r     svn_revnum_t          Number
124      s     const svn_string_t *  String
125      c     const char *          String
126      w     const char *          Word
127      b     svn_boolean_t         Word ("true" or "false")
128      (                           Begin tuple
129      )                           End tuple
130      ?                           Remaining elements optional
131      ! (at beginning or end)     Suppress opening or closing of tuple
132   @endverbatim
133  *
134  * Inside the optional part of a tuple, 'r' values may be @c
135  * SVN_INVALID_REVNUM, 'n' values may be
136  * SVN_RA_SVN_UNSPECIFIED_NUMBER, and 's', 'c', and 'w' values may be
137  * @c NULL; in these cases no data will be written.  'b' and '(' may
138  * not appear in the optional part of a tuple.  Either all or none of
139  * the optional values should be valid.
140  *
141  * (If we ever have a need for an optional boolean value, we should
142  * invent a 'B' specifier which stores a boolean into an int, using -1
143  * for unspecified.  Right now there is no need for such a thing.)
144  *
145  * Use the '!' format specifier to write partial tuples when you have
146  * to transmit an array or other unusual data.  For example, to write
147  * a tuple containing a revision, an array of words, and a boolean:
148  * @code
149      SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "r(!", rev));
150      for (i = 0; i < n; i++)
151        SVN_ERR(svn_ra_svn_write_word(conn, pool, words[i]));
152      SVN_ERR(svn_ra_svn_write_tuple(conn, pool, "!)b", flag)); @endcode
153  */
154 svn_error_t *
155 svn_ra_svn__write_tuple(svn_ra_svn_conn_t *conn,
156                         apr_pool_t *pool,
157                         const char *fmt, ...);
158
159 /** Read an item from the network into @a *item. */
160 svn_error_t *
161 svn_ra_svn__read_item(svn_ra_svn_conn_t *conn,
162                       apr_pool_t *pool,
163                       svn_ra_svn_item_t **item);
164
165 /** Scan data on @a conn until we find something which looks like the
166  * beginning of an svn server greeting (an open paren followed by a
167  * whitespace character).  This function is appropriate for beginning
168  * a client connection opened in tunnel mode, since people's dotfiles
169  * sometimes write output to stdout.  It may only be called at the
170  * beginning of a client connection.
171  */
172 svn_error_t *
173 svn_ra_svn__skip_leading_garbage(svn_ra_svn_conn_t *conn,
174                                  apr_pool_t *pool);
175
176 /** Parse an array of @c svn_sort__item_t structures as a tuple, using a
177  * printf-like interface.  The format string @a fmt may contain:
178  *
179  *@verbatim
180      Spec  Argument type          Item type
181      ----  --------------------   ---------
182      n     apr_uint64_t *         Number
183      r     svn_revnum_t *         Number
184      s     svn_string_t **        String
185      c     const char **          String
186      w     const char **          Word
187      b     svn_boolean_t *        Word ("true" or "false")
188      B     apr_uint64_t *         Word ("true" or "false")
189      l     apr_array_header_t **  List
190      (                            Begin tuple
191      )                            End tuple
192      ?                            Tuple is allowed to end here
193   @endverbatim
194  *
195  * Note that a tuple is only allowed to end precisely at a '?', or at
196  * the end of the specification.  So if @a fmt is "c?cc" and @a list
197  * contains two elements, an error will result.
198  *
199  * 'B' is similar to 'b', but may be used in the optional tuple specification.
200  * It returns TRUE, FALSE, or SVN_RA_SVN_UNSPECIFIED_NUMBER.
201  *
202  * If an optional part of a tuple contains no data, 'r' values will be
203  * set to @c SVN_INVALID_REVNUM, 'n' and 'B' values will be set to
204  * SVN_RA_SVN_UNSPECIFIED_NUMBER, and 's', 'c', 'w', and 'l' values
205  * will be set to @c NULL.  'b' may not appear inside an optional
206  * tuple specification; use 'B' instead.
207  */
208 svn_error_t *
209 svn_ra_svn__parse_tuple(const apr_array_header_t *list,
210                         apr_pool_t *pool,
211                         const char *fmt, ...);
212
213 /** Read a tuple from the network and parse it as a tuple, using the
214  * format string notation from svn_ra_svn_parse_tuple().
215  */
216 svn_error_t *
217 svn_ra_svn__read_tuple(svn_ra_svn_conn_t *conn,
218                        apr_pool_t *pool,
219                        const char *fmt, ...);
220
221 /** Parse an array of @c svn_ra_svn_item_t structures as a list of
222  * properties, storing the properties in a hash table.
223  *
224  * @since New in 1.5.
225  */
226 svn_error_t *
227 svn_ra_svn__parse_proplist(const apr_array_header_t *list,
228                            apr_pool_t *pool,
229                            apr_hash_t **props);
230
231 /** Read a command response from the network and parse it as a tuple, using
232  * the format string notation from svn_ra_svn_parse_tuple().
233  */
234 svn_error_t *
235 svn_ra_svn__read_cmd_response(svn_ra_svn_conn_t *conn,
236                               apr_pool_t *pool,
237                               const char *fmt, ...);
238
239 /** Accept commands over the network and handle them according to @a
240  * commands.  Command handlers will be passed @a conn, a subpool of @a
241  * pool (cleared after each command is handled), the parameters of the
242  * command, and @a baton.  Commands will be accepted until a
243  * terminating command is received (a command with "terminate" set in
244  * the command table).  If a command handler returns an error wrapped
245  * in SVN_RA_SVN_CMD_ERR (see the @c SVN_CMD_ERR macro), the error
246  * will be reported to the other side of the connection and the
247  * command loop will continue; any other kind of error (typically a
248  * network or protocol error) is passed through to the caller.
249  *
250  * @since New in 1.6.
251  *
252  */
253 svn_error_t *
254 svn_ra_svn__handle_commands2(svn_ra_svn_conn_t *conn,
255                              apr_pool_t *pool,
256                              const svn_ra_svn_cmd_entry_t *commands,
257                              void *baton,
258                              svn_boolean_t error_on_disconnect);
259
260 /** Write a successful command response over the network, using the
261  * same format string notation as svn_ra_svn_write_tuple().  Do not use
262  * partial tuples with this function; if you need to use partial
263  * tuples, just write out the "success" and argument tuple by hand.
264  */
265 svn_error_t *
266 svn_ra_svn__write_cmd_response(svn_ra_svn_conn_t *conn,
267                                apr_pool_t *pool,
268                                const char *fmt, ...);
269
270 /** Write an unsuccessful command response over the network. */
271 svn_error_t *
272 svn_ra_svn__write_cmd_failure(svn_ra_svn_conn_t *conn,
273                               apr_pool_t *pool,
274                               svn_error_t *err);
275
276 /**
277  * @}
278  */
279
280 /**
281  * @defgroup svn_commands sending ra_svn commands
282  * @{
283  */
284
285 /** Sets the target revision of connection @a conn to @a rev.  Use @a pool
286  * for allocations.
287  */
288 svn_error_t *
289 svn_ra_svn__write_cmd_target_rev(svn_ra_svn_conn_t *conn,
290                                  apr_pool_t *pool,
291                                  svn_revnum_t rev);
292
293 /** Send a "open-root" command over connection @a conn.  Open the
294  * repository root at revision @a rev and associate it with @a token.
295  * Use @a pool for allocations.
296  */
297 svn_error_t *
298 svn_ra_svn__write_cmd_open_root(svn_ra_svn_conn_t *conn,
299                                 apr_pool_t *pool,
300                                 svn_revnum_t rev,
301                                 const char *token);
302
303 /** Send a "delete-entry" command over connection @a conn.  Delete the
304  * @a path at optional revision @a rev below @a parent_token.
305  * Use @a pool for allocations.
306  */
307 svn_error_t *
308 svn_ra_svn__write_cmd_delete_entry(svn_ra_svn_conn_t *conn,
309                                    apr_pool_t *pool,
310                                    const char *path,
311                                    svn_revnum_t rev,
312                                    const char *parent_token);
313
314 /** Send a "add-dir" command over connection @a conn.  Add a new directory
315  * node named @a path under the directory identified by @a parent_token.
316  * Associate the new directory with the given @a token.  * @a copy_path
317  * and @a copy_rev are optional and describe the copy source.
318  * Use @a pool for allocations.
319  */
320 svn_error_t *
321 svn_ra_svn__write_cmd_add_dir(svn_ra_svn_conn_t *conn,
322                               apr_pool_t *pool,
323                               const char *path,
324                               const char *parent_token,
325                               const char *token,
326                               const char *copy_path,
327                               svn_revnum_t copy_rev);
328
329 /** Send a "open-dir" command over connection @a conn.  Associate to
330  * @a token the directory node named @a path under the directory
331  * identified by @a parent_token in revision @a rev.
332  * Use @a pool for allocations.
333  */
334 svn_error_t *
335 svn_ra_svn__write_cmd_open_dir(svn_ra_svn_conn_t *conn,
336                                apr_pool_t *pool,
337                                const char *path,
338                                const char *parent_token,
339                                const char *token,
340                                svn_revnum_t rev);
341
342 /** Send a "change-dir-prop" command over connection @a conn.  Set the
343  * property @a name to the optional @a value on the directory identified
344  * to @a token.  Use @a pool for allocations.
345  */
346 svn_error_t *
347 svn_ra_svn__write_cmd_change_dir_prop(svn_ra_svn_conn_t *conn,
348                                       apr_pool_t *pool,
349                                       const char *token,
350                                       const char *name,
351                                       const svn_string_t *value);
352
353 /** Send a "close-dir" command over connection @a conn.  Identify the node
354  * to close with @a token.  The latter will then no longer be associated
355  * with that node.  Use @a pool for allocations.
356  */
357 svn_error_t *
358 svn_ra_svn__write_cmd_close_dir(svn_ra_svn_conn_t *conn,
359                                 apr_pool_t *pool,
360                                 const char *token);
361
362 /** Send a "absent-dir" command over connection @a conn.  Directory node
363  * named @a path under the directory identified by @a parent_token is
364  * absent.  Use @a pool for allocations.
365  */
366 svn_error_t *
367 svn_ra_svn__write_cmd_absent_dir(svn_ra_svn_conn_t *conn,
368                                  apr_pool_t *pool,
369                                  const char *path,
370                                  const char *parent_token);
371
372 /** Send a "add-file" command over connection @a conn.  Add a new file
373  * node named @a path under the directory identified by @a parent_token.
374  * Associate the new file with the given @a token.  * @a copy_path and
375  * @a copy_rev are optional and describe the copy source.
376  * Use @a pool for allocations.
377  */
378 svn_error_t *
379 svn_ra_svn__write_cmd_add_file(svn_ra_svn_conn_t *conn,
380                                apr_pool_t *pool,
381                                const char *path,
382                                const char *parent_token,
383                                const char *token,
384                                const char *copy_path,
385                                svn_revnum_t copy_rev);
386
387 /** Send a "open-file" command over connection @a conn.  Associate to
388  * @a token the file node named @a path under the directory identified by
389  * @a parent_token in revision @a rev.
390  * Use @a pool for allocations.
391  */
392 svn_error_t *
393 svn_ra_svn__write_cmd_open_file(svn_ra_svn_conn_t *conn,
394                                 apr_pool_t *pool,
395                                 const char *path,
396                                 const char *parent_token,
397                                 const char *token,
398                                 svn_revnum_t rev);
399
400 /** Send a "change-file-prop" command over connection @a conn.  Set the
401  * property @a name to the optional @a value on the file identified to
402  * @a token.  Use @a pool for allocations.
403  */
404 svn_error_t *
405 svn_ra_svn__write_cmd_change_file_prop(svn_ra_svn_conn_t *conn,
406                                        apr_pool_t *pool,
407                                        const char *token,
408                                        const char *name,
409                                        const svn_string_t *value);
410
411 /** Send a "close-dir" command over connection @a conn.  Identify the node
412  * to close with @a token and provide an optional @a check_sum.  The token
413  * will then no longer be associated with that node.
414  * Use @a pool for allocations.
415  */
416 svn_error_t *
417 svn_ra_svn__write_cmd_close_file(svn_ra_svn_conn_t *conn,
418                                  apr_pool_t *pool,
419                                  const char *token,
420                                  const char *text_checksum);
421
422 /** Send a "absent-file" command over connection @a conn.  File node
423  * named @a path in the directory identified by @a parent_token is
424  * absent.  Use @a pool for allocations.
425  */
426 svn_error_t *
427 svn_ra_svn__write_cmd_absent_file(svn_ra_svn_conn_t *conn,
428                                   apr_pool_t *pool,
429                                   const char *path,
430                                   const char *parent_token);
431
432 /** Send a "apply-textdelta" command over connection @a conn.  Starts a
433  * series of text deltas to be applied to the file identified by @a token.
434  * Optionally, specify the file's current checksum in @a base_checksum.
435  * Use @a pool for allocations.
436  */
437 svn_error_t *
438 svn_ra_svn__write_cmd_apply_textdelta(svn_ra_svn_conn_t *conn,
439                                       apr_pool_t *pool,
440                                       const char *token,
441                                       const char *base_checksum);
442
443 /** Send a "textdelta-chunk" command over connection @a conn.  Apply
444  * textdelta @a chunk to the file identified by @a token.
445  * Use @a pool for allocations.
446  */
447 svn_error_t *
448 svn_ra_svn__write_cmd_textdelta_chunk(svn_ra_svn_conn_t *conn,
449                                       apr_pool_t *pool,
450                                       const char *token,
451                                       const svn_string_t *chunk);
452
453 /** Send a "textdelta-end" command over connection @a conn.  Ends the
454  * series of text deltas to be applied to the file identified by @a token.
455  * Use @a pool for allocations.
456  */
457 svn_error_t *
458 svn_ra_svn__write_cmd_textdelta_end(svn_ra_svn_conn_t *conn,
459                                     apr_pool_t *pool,
460                                     const char *token);
461
462 /** Send a "close-edit" command over connection @a conn.  Ends the editor
463  * drive (successfully).  Use @a pool for allocations.
464  */
465 svn_error_t *
466 svn_ra_svn__write_cmd_close_edit(svn_ra_svn_conn_t *conn,
467                                  apr_pool_t *pool);
468
469 /** Send a "abort-edit" command over connection @a conn.  Prematurely ends
470  * the editor drive, e.g. due to some problem on the other side.
471  * Use @a pool for allocations.
472  */
473 svn_error_t *
474 svn_ra_svn__write_cmd_abort_edit(svn_ra_svn_conn_t *conn,
475                                  apr_pool_t *pool);
476
477 /** Send a "set-path" command over connection @a conn.
478  * Use @a pool for allocations.
479  *
480  * @see set_path() in #svn_ra_reporter3_t for a description.
481  */
482 svn_error_t *
483 svn_ra_svn__write_cmd_set_path(svn_ra_svn_conn_t *conn,
484                                apr_pool_t *pool,
485                                const char *path,
486                                svn_revnum_t rev,
487                                svn_boolean_t start_empty,
488                                const char *lock_token,
489                                svn_depth_t depth);
490
491 /** Send a "delete-path" command over connection @a conn.
492  * Use @a pool for allocations.
493  *
494  * @see delete_path() in #svn_ra_reporter3_t for a description.
495  */
496 svn_error_t *
497 svn_ra_svn__write_cmd_delete_path(svn_ra_svn_conn_t *conn,
498                                   apr_pool_t *pool,
499                                   const char *path);
500
501 /** Send a "link-path" command over connection @a conn.
502  * Use @a pool for allocations.
503  *
504  * @see link_path() in #svn_ra_reporter3_t for a description.
505  */
506 svn_error_t *
507 svn_ra_svn__write_cmd_link_path(svn_ra_svn_conn_t *conn,
508                                 apr_pool_t *pool,
509                                 const char *path,
510                                 const char *url,
511                                 svn_revnum_t rev,
512                                 svn_boolean_t start_empty,
513                                 const char *lock_token,
514                                 svn_depth_t depth);
515
516 /** Send a "finish-report" command over connection @a conn.
517  * Use @a pool for allocations.
518  *
519  * @see finish_report() in #svn_ra_reporter3_t for a description.
520  */
521 svn_error_t *
522 svn_ra_svn__write_cmd_finish_report(svn_ra_svn_conn_t *conn,
523                                     apr_pool_t *pool);
524
525 /** Send a "abort-report" command over connection @a conn.
526  * Use @a pool for allocations.
527  *
528  * @see abort_report() in #svn_ra_reporter3_t for a description.
529  */
530 svn_error_t *
531 svn_ra_svn__write_cmd_abort_report(svn_ra_svn_conn_t *conn,
532                                    apr_pool_t *pool);
533
534 /** Send a "reparent" command over connection @a conn.
535  * Use @a pool for allocations.
536  *
537  * @see #svn_ra_reparent for a description.
538  */
539 svn_error_t *
540 svn_ra_svn__write_cmd_reparent(svn_ra_svn_conn_t *conn,
541                                apr_pool_t *pool,
542                                const char *url);
543
544 /** Send a "get-latest-rev" command over connection @a conn.
545  * Use @a pool for allocations.
546  *
547  * @see #svn_ra_get_latest_revnum for a description.
548  */
549 svn_error_t *
550 svn_ra_svn__write_cmd_get_latest_rev(svn_ra_svn_conn_t *conn,
551                                      apr_pool_t *pool);
552
553 /** Send a "get-dated-rev" command over connection @a conn.
554  * Use @a pool for allocations.
555  *
556  * @see #svn_ra_get_dated_revision for a description.
557  */
558 svn_error_t *
559 svn_ra_svn__write_cmd_get_dated_rev(svn_ra_svn_conn_t *conn,
560                                     apr_pool_t *pool,
561                                     apr_time_t tm);
562
563 /** Send a "change-rev-prop2" command over connection @a conn.
564  * Use @a pool for allocations.
565  *
566  * @see #svn_ra_change_rev_prop2 for a description.
567  */
568 svn_error_t *
569 svn_ra_svn__write_cmd_change_rev_prop2(svn_ra_svn_conn_t *conn,
570                                        apr_pool_t *pool,
571                                        svn_revnum_t rev,
572                                        const char *name,
573                                        const svn_string_t *value,
574                                        svn_boolean_t dont_care,
575                                        const svn_string_t *old_value);
576
577 /** Send a "change-rev-prop" command over connection @a conn.
578  * Use @a pool for allocations.
579  *
580  * @see #svn_ra_change_rev_prop for a description.
581  */
582 svn_error_t *
583 svn_ra_svn__write_cmd_change_rev_prop(svn_ra_svn_conn_t *conn,
584                                       apr_pool_t *pool,
585                                       svn_revnum_t rev,
586                                       const char *name,
587                                       const svn_string_t *value);
588
589 /** Send a "rev-proplist" command over connection @a conn.
590  * Use @a pool for allocations.
591  *
592  * @see #svn_ra_rev_proplist for a description.
593  */
594 svn_error_t *
595 svn_ra_svn__write_cmd_rev_proplist(svn_ra_svn_conn_t *conn,
596                                    apr_pool_t *pool,
597                                    svn_revnum_t rev);
598
599 /** Send a "rev-prop" command over connection @a conn.
600  * Use @a pool for allocations.
601  *
602  * @see #svn_ra_rev_prop for a description.
603  */
604 svn_error_t *
605 svn_ra_svn__write_cmd_rev_prop(svn_ra_svn_conn_t *conn,
606                                apr_pool_t *pool,
607                                svn_revnum_t rev,
608                                const char *name);
609
610 /** Send a "get-file" command over connection @a conn.
611  * Use @a pool for allocations.
612  *
613  * @see #svn_ra_get_file for a description.
614  */
615 svn_error_t *
616 svn_ra_svn__write_cmd_get_file(svn_ra_svn_conn_t *conn,
617                                apr_pool_t *pool,
618                                const char *path,
619                                svn_revnum_t rev,
620                                svn_boolean_t props,
621                                svn_boolean_t stream);
622
623 /** Send a "update" command over connection @a conn.
624  * Use @a pool for allocations.
625  *
626  * @see #svn_ra_do_update3 for a description.
627  */
628 svn_error_t *
629 svn_ra_svn__write_cmd_update(svn_ra_svn_conn_t *conn,
630                              apr_pool_t *pool,
631                              svn_revnum_t rev,
632                              const char *target,
633                              svn_boolean_t recurse,
634                              svn_depth_t depth,
635                              svn_boolean_t send_copyfrom_args,
636                              svn_boolean_t ignore_ancestry);
637
638 /** Send a "switch" command over connection @a conn.
639  * Use @a pool for allocations.
640  *
641  * @see #svn_ra_do_switch3 for a description.
642  */
643 svn_error_t *
644 svn_ra_svn__write_cmd_switch(svn_ra_svn_conn_t *conn,
645                              apr_pool_t *pool,
646                              svn_revnum_t rev,
647                              const char *target,
648                              svn_boolean_t recurse,
649                              const char *switch_url,
650                              svn_depth_t depth,
651                              svn_boolean_t send_copyfrom_args,
652                              svn_boolean_t ignore_ancestry);
653
654 /** Send a "status" command over connection @a conn.
655  * Use @a pool for allocations.
656  *
657  * @see #svn_ra_do_status2 for a description.
658  */
659 svn_error_t *
660 svn_ra_svn__write_cmd_status(svn_ra_svn_conn_t *conn,
661                              apr_pool_t *pool,
662                              const char *target,
663                              svn_boolean_t recurse,
664                              svn_revnum_t rev,
665                              svn_depth_t depth);
666
667 /** Send a "diff" command over connection @a conn.
668  * Use @a pool for allocations.
669  *
670  * @see #svn_ra_do_diff3 for a description.
671  */
672 svn_error_t *
673 svn_ra_svn__write_cmd_diff(svn_ra_svn_conn_t *conn,
674                            apr_pool_t *pool,
675                            svn_revnum_t rev,
676                            const char *target,
677                            svn_boolean_t recurse,
678                            svn_boolean_t ignore_ancestry,
679                            const char *versus_url,
680                            svn_boolean_t text_deltas,
681                            svn_depth_t depth);
682
683 /** Send a "check-path" command over connection @a conn.
684  * Use @a pool for allocations.
685  *
686  * @see #svn_ra_check_path for a description.
687  */
688 svn_error_t *
689 svn_ra_svn__write_cmd_check_path(svn_ra_svn_conn_t *conn,
690                                  apr_pool_t *pool,
691                                  const char *path,
692                                  svn_revnum_t rev);
693
694 /** Send a "stat" command over connection @a conn.
695  * Use @a pool for allocations.
696  *
697  * @see #svn_ra_stat for a description.
698  */
699 svn_error_t *
700 svn_ra_svn__write_cmd_stat(svn_ra_svn_conn_t *conn,
701                            apr_pool_t *pool,
702                            const char *path,
703                            svn_revnum_t rev);
704
705 /** Send a "get-file-revs" command over connection @a conn.
706  * Use @a pool for allocations.
707  *
708  * @see #svn_ra_get_file_revs2 for a description.
709  */
710 svn_error_t *
711 svn_ra_svn__write_cmd_get_file_revs(svn_ra_svn_conn_t *conn,
712                                     apr_pool_t *pool,
713                                     const char *path,
714                                     svn_revnum_t start,
715                                     svn_revnum_t end,
716                                     svn_boolean_t include_merged_revisions);
717
718 /** Send a "lock" command over connection @a conn.
719  * Use @a pool for allocations.
720  *
721  * @see #svn_ra_lock for a description.
722  */
723 svn_error_t *
724 svn_ra_svn__write_cmd_lock(svn_ra_svn_conn_t *conn,
725                            apr_pool_t *pool,
726                            const char *path,
727                            const char *comment,
728                            svn_boolean_t steal_lock,
729                            svn_revnum_t revnum);
730
731 /** Send a "unlock" command over connection @a conn.
732  * Use @a pool for allocations.
733  *
734  * @see #svn_ra_unlock for a description.
735  */
736 svn_error_t *
737 svn_ra_svn__write_cmd_unlock(svn_ra_svn_conn_t *conn,
738                              apr_pool_t *pool,
739                              const char *path,
740                              const char *token,
741                              svn_boolean_t break_lock);
742
743 /** Send a "get-lock" command over connection @a conn.
744  * Use @a pool for allocations.
745  *
746  * @see #svn_ra_get_lock for a description.
747  */
748 svn_error_t *
749 svn_ra_svn__write_cmd_get_lock(svn_ra_svn_conn_t *conn,
750                                apr_pool_t *pool,
751                                const char *path);
752
753 /** Send a "get-locks" command over connection @a conn.
754  * Use @a pool for allocations.
755  *
756  * @see #svn_ra_get_locks2 for a description.
757  */
758 svn_error_t *
759 svn_ra_svn__write_cmd_get_locks(svn_ra_svn_conn_t *conn,
760                                 apr_pool_t *pool,
761                                 const char *path,
762                                 svn_depth_t depth);
763
764 /** Send a "replay" command over connection @a conn.
765  * Use @a pool for allocations.
766  *
767  * @see #svn_ra_replay for a description.
768  */
769 svn_error_t *
770 svn_ra_svn__write_cmd_replay(svn_ra_svn_conn_t *conn,
771                              apr_pool_t *pool,
772                              svn_revnum_t rev,
773                              svn_revnum_t low_water_mark,
774                              svn_boolean_t send_deltas);
775
776 /** Send a "replay-range" command over connection @a conn.
777  * Use @a pool for allocations.
778  *
779  * @see #svn_ra_replay_range for a description.
780  */
781 svn_error_t *
782 svn_ra_svn__write_cmd_replay_range(svn_ra_svn_conn_t *conn,
783                                    apr_pool_t *pool,
784                                    svn_revnum_t start_revision,
785                                    svn_revnum_t end_revision,
786                                    svn_revnum_t low_water_mark,
787                                    svn_boolean_t send_deltas);
788
789 /** Send a "get-deleted-rev" command over connection @a conn.
790  * Use @a pool for allocations.
791  *
792  * @see #svn_ra_get_deleted_rev for a description.
793  */
794 svn_error_t *
795 svn_ra_svn__write_cmd_get_deleted_rev(svn_ra_svn_conn_t *conn,
796                                       apr_pool_t *pool,
797                                       const char *path,
798                                       svn_revnum_t peg_revision,
799                                       svn_revnum_t end_revision);
800
801 /** Send a "get-iprops" command over connection @a conn.
802  * Use @a pool for allocations.
803  *
804  * @see #svn_ra_get_inherited_props for a description.
805  */
806 svn_error_t *
807 svn_ra_svn__write_cmd_get_iprops(svn_ra_svn_conn_t *conn,
808                                  apr_pool_t *pool,
809                                  const char *path,
810                                  svn_revnum_t revision);
811
812 /** Send a "finish-replay" command over connection @a conn.
813  * Use @a pool for allocations.
814  */
815 svn_error_t *
816 svn_ra_svn__write_cmd_finish_replay(svn_ra_svn_conn_t *conn,
817                                     apr_pool_t *pool);
818
819 /**
820  * @}
821  */
822 #ifdef __cplusplus
823 }
824 #endif /* __cplusplus */
825
826 #endif /* SVN_RA_SVN_PRIVATE_H */