]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - contrib/subversion/subversion/svnsync/sync.h
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / contrib / subversion / subversion / svnsync / sync.h
1 /*
2  * sync.h :  The synchronization editor for svnsync.
3  *
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
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
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
20  *    under the License.
21  * ====================================================================
22  */
23
24 #ifndef SYNC_H
25 #define SYNC_H
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif /* __cplusplus */
30
31
32 #include "svn_types.h"
33 #include "svn_delta.h"
34
35
36 /* Normalize the encoding and line ending style of the values of properties
37  * in REV_PROPS that "need translation" (according to
38  * svn_prop_needs_translation(), which is currently all svn:* props) so that
39  * they are encoded in UTF-8 and contain only LF (\n) line endings.
40  *
41  * The number of properties that needed line ending normalization is returned in
42  * *NORMALIZED_COUNT.
43  *
44  * No re-encoding is performed if SOURCE_PROP_ENCODING is NULL.
45  */
46 svn_error_t *
47 svnsync_normalize_revprops(apr_hash_t *rev_props,
48                            int *normalized_count,
49                            const char *source_prop_encoding,
50                            apr_pool_t *pool);
51
52
53 /* Set WRAPPED_EDITOR and WRAPPED_EDIT_BATON to an editor/baton pair
54  * that wraps our own commit EDITOR/EDIT_BATON.  BASE_REVISION is the
55  * revision on which the driver of this returned editor will be basing
56  * the commit.  TO_URL is the URL of the root of the repository into
57  * which the commit is being made.
58  *
59  * If SOURCE_PROP_ENCODING is NULL, then property values are presumed to be
60  * encoded in UTF-8 and are not re-encoded. Otherwise, the property values are
61  * presumed to be encoded in SOURCE_PROP_ENCODING, and are normalized to UTF-8.
62  *
63  * As the sync editor encounters property values, it might see the need to
64  * normalize them (re-encode and/or change to LF line endings). Each carried-out
65  * line ending normalization adds 1 to the *NORMALIZED_NODE_PROPS_COUNTER
66  * (for notification).
67  */
68 svn_error_t *
69 svnsync_get_sync_editor(const svn_delta_editor_t *wrapped_editor,
70                         void *wrapped_edit_baton,
71                         svn_revnum_t base_revision,
72                         const char *to_url,
73                         const char *source_prop_encoding,
74                         svn_boolean_t quiet,
75                         const svn_delta_editor_t **editor,
76                         void **edit_baton,
77                         int *normalized_node_props_counter,
78                         apr_pool_t *pool);
79
80
81 #ifdef __cplusplus
82 }
83 #endif /* __cplusplus */
84
85 #endif  /* SYNC_H */