2 * svnrdump.h: Internal header file for svnrdump.
4 * ====================================================================
5 * Licensed to the Apache Software Foundation (ASF) under one
6 * or more contributor license agreements. See the NOTICE file
7 * distributed with this work for additional information
8 * regarding copyright ownership. The ASF licenses this file
9 * to you under the Apache License, Version 2.0 (the
10 * "License"); you may not use this file except in compliance
11 * with the License. You may obtain a copy of the License at
13 * http://www.apache.org/licenses/LICENSE-2.0
15 * Unless required by applicable law or agreed to in writing,
16 * software distributed under the License is distributed on an
17 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
18 * KIND, either express or implied. See the License for the
19 * specific language governing permissions and limitations
21 * ====================================================================
29 #include "svn_error.h"
30 #include "svn_pools.h"
32 #include "svn_delta.h"
35 #include "private/svn_editor.h"
39 #endif /* __cplusplus */
43 * Get a dump editor @a editor along with a @a edit_baton allocated in
44 * @a pool. The editor will write output to @a stream.
46 * @a update_anchor_relpath is the repository relative path of the
47 * anchor of the update-style drive which will happen on @a *editor;
48 * if a replay-style drive will instead be used, it should be passed
51 * Use @a cancel_func and @a cancel_baton to check for user
52 * cancellation of the operation (for timely-but-safe termination).
55 svn_rdump__get_dump_editor(const svn_delta_editor_t **editor,
57 svn_revnum_t revision,
59 svn_ra_session_t *ra_session,
60 const char *update_anchor_relpath,
61 svn_cancel_func_t cancel_func,
65 /* Same as above, only returns an Ev2 editor. */
67 svn_rdump__get_dump_editor_v2(svn_editor_t **editor,
68 svn_revnum_t revision,
70 svn_ra_session_t *ra_session,
71 const char *edit_root_relpath,
72 svn_cancel_func_t cancel_func,
74 apr_pool_t *scratch_pool,
75 apr_pool_t *result_pool);
79 * Load the dumpstream carried in @a stream to the location described
80 * by @a session. Use @a aux_session (which is opened to the same URL
81 * as @a session) for any secondary, out-of-band RA communications
82 * required. If @a quiet is set, suppress notifications. Use @a pool
83 * for all memory allocations. Use @a cancel_func and @a cancel_baton
84 * to check for user cancellation of the operation (for
85 * timely-but-safe termination).
88 svn_rdump__load_dumpstream(svn_stream_t *stream,
89 svn_ra_session_t *session,
90 svn_ra_session_t *aux_session,
92 svn_cancel_func_t cancel_func,
97 /* Normalize the line ending style of the values of properties in PROPS
98 * that "need translation" (according to svn_prop_needs_translation(),
99 * currently all svn:* props) so that they contain only LF (\n) line endings.
101 * Put the normalized props into NORMAL_PROPS, allocated in RESULT_POOL.
103 * Note: this function does not do a deep copy; it is expected that PROPS has
104 * a longer lifetime than NORMAL_PROPS.
107 svn_rdump__normalize_props(apr_hash_t **normal_props,
109 apr_pool_t *result_pool);
111 /* Normalize the line ending style of a single property that "needs
112 * translation" (according to svn_prop_needs_translation(),
113 * currently all svn:* props) so that they contain only LF (\n) line endings.
114 * "\r" characters found mid-line are replaced with "\n".
115 * "\r\n" sequences are replaced with "\n"
117 * NAME is used to check that VALUE should be normalized, and if this is the
118 * case, VALUE is then normalized, allocated from RESULT_POOL
121 svn_rdump__normalize_prop(const char *name,
122 const svn_string_t **value,
123 apr_pool_t *result_pool);
127 #endif /* __cplusplus */
129 #endif /* SVNRDUMP_H */