2 * sync.h : The synchronization editor for svnsync.
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 #endif /* __cplusplus */
32 #include "svn_types.h"
33 #include "svn_delta.h"
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.
41 * The number of properties that needed line ending normalization is returned in
44 * No re-encoding is performed if SOURCE_PROP_ENCODING is NULL.
47 svnsync_normalize_revprops(apr_hash_t *rev_props,
48 int *normalized_count,
49 const char *source_prop_encoding,
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.
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.
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
69 svnsync_get_sync_editor(const svn_delta_editor_t *wrapped_editor,
70 void *wrapped_edit_baton,
71 svn_revnum_t base_revision,
73 const char *source_prop_encoding,
75 const svn_delta_editor_t **editor,
77 int *normalized_node_props_counter,
83 #endif /* __cplusplus */