1251881Speter/** 2251881Speter * @copyright 3251881Speter * ==================================================================== 4251881Speter * Licensed to the Apache Software Foundation (ASF) under one 5251881Speter * or more contributor license agreements. See the NOTICE file 6251881Speter * distributed with this work for additional information 7251881Speter * regarding copyright ownership. The ASF licenses this file 8251881Speter * to you under the Apache License, Version 2.0 (the 9251881Speter * "License"); you may not use this file except in compliance 10251881Speter * with the License. You may obtain a copy of the License at 11251881Speter * 12251881Speter * http://www.apache.org/licenses/LICENSE-2.0 13251881Speter * 14251881Speter * Unless required by applicable law or agreed to in writing, 15251881Speter * software distributed under the License is distributed on an 16251881Speter * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 17251881Speter * KIND, either express or implied. See the License for the 18251881Speter * specific language governing permissions and limitations 19251881Speter * under the License. 20251881Speter * ==================================================================== 21251881Speter * @endcopyright 22251881Speter * 23251881Speter * @file svn_repos_private.h 24251881Speter * @brief Subversion-internal repos APIs. 25251881Speter */ 26251881Speter 27251881Speter#ifndef SVN_REPOS_PRIVATE_H 28251881Speter#define SVN_REPOS_PRIVATE_H 29251881Speter 30251881Speter#include <apr_pools.h> 31251881Speter 32251881Speter#include "svn_types.h" 33251881Speter#include "svn_repos.h" 34251881Speter#include "svn_editor.h" 35251881Speter 36251881Speter#ifdef __cplusplus 37251881Speterextern "C" { 38251881Speter#endif /* __cplusplus */ 39251881Speter 40251881Speter 41251881Speter/** Validate that property @a name is valid for use in a Subversion 42251881Speter * repository; return @c SVN_ERR_REPOS_BAD_ARGS if it isn't. For some 43251881Speter * "svn:" properties, also validate the @a value, and return 44251881Speter * @c SVN_ERR_BAD_PROPERTY_VALUE if it is not valid. 45251881Speter * 46251881Speter * Use @a pool for temporary allocations. 47251881Speter * 48251881Speter * @note This function is used to implement server-side validation. 49251881Speter * Consequently, if you make this function stricter in what it accepts, you 50251881Speter * (a) break svnsync'ing of existing repositories that contain now-invalid 51251881Speter * properties, (b) do not preclude such invalid values from entering the 52251881Speter * repository via tools that use the svn_fs_* API directly (possibly 53251881Speter * including svnadmin and svnlook). This has happened before and there 54251881Speter * are known (documented, but unsupported) upgrade paths in some cases. 55251881Speter * 56251881Speter * @since New in 1.7. 57251881Speter */ 58251881Spetersvn_error_t * 59251881Spetersvn_repos__validate_prop(const char *name, 60251881Speter const svn_string_t *value, 61251881Speter apr_pool_t *pool); 62251881Speter 63251881Speter/** 64251881Speter * Given the error @a err from svn_repos_fs_commit_txn(), return an 65251881Speter * string containing either or both of the svn_fs_commit_txn() error 66251881Speter * and the SVN_ERR_REPOS_POST_COMMIT_HOOK_FAILED wrapped error from 67251881Speter * the post-commit hook. Any error tracing placeholders in the error 68251881Speter * chain are skipped over. 69251881Speter * 70251881Speter * This function does not modify @a err. 71251881Speter * 72251881Speter * ### This method should not be necessary, but there are a few 73251881Speter * ### places, e.g. mod_dav_svn, where only a single error message 74251881Speter * ### string is returned to the caller and it is useful to have both 75251881Speter * ### error messages included in the message. 76251881Speter * 77251881Speter * Use @a pool to do any allocations in. 78251881Speter * 79251881Speter * @since New in 1.7. 80251881Speter */ 81251881Speterconst char * 82251881Spetersvn_repos__post_commit_error_str(svn_error_t *err, 83251881Speter apr_pool_t *pool); 84251881Speter 85251881Speter/* A repos version of svn_fs_type */ 86251881Spetersvn_error_t * 87251881Spetersvn_repos__fs_type(const char **fs_type, 88251881Speter const char *repos_path, 89251881Speter apr_pool_t *pool); 90251881Speter 91251881Speter 92251881Speter/* Create a commit editor for REPOS, based on REVISION. */ 93251881Spetersvn_error_t * 94251881Spetersvn_repos__get_commit_ev2(svn_editor_t **editor, 95251881Speter svn_repos_t *repos, 96251881Speter svn_authz_t *authz, 97251881Speter const char *authz_repos_name, 98251881Speter const char *authz_user, 99251881Speter apr_hash_t *revprops, 100251881Speter svn_commit_callback2_t commit_cb, 101251881Speter void *commit_baton, 102251881Speter svn_cancel_func_t cancel_func, 103251881Speter void *cancel_baton, 104251881Speter apr_pool_t *result_pool, 105251881Speter apr_pool_t *scratch_pool); 106251881Speter 107251881Spetersvn_error_t * 108251881Spetersvn_repos__replay_ev2(svn_fs_root_t *root, 109251881Speter const char *base_dir, 110251881Speter svn_revnum_t low_water_mark, 111251881Speter svn_editor_t *editor, 112251881Speter svn_repos_authz_func_t authz_read_func, 113251881Speter void *authz_read_baton, 114251881Speter apr_pool_t *scratch_pool); 115251881Speter 116289166Speter/* A private addition to svn_repos_notify_warning_t. */ 117289166Speter#define svn_repos__notify_warning_invalid_mergeinfo \ 118289166Speter ((svn_repos_notify_warning_t)(-1)) 119251881Speter 120289166Speter 121251881Speter#ifdef __cplusplus 122251881Speter} 123251881Speter#endif /* __cplusplus */ 124251881Speter 125251881Speter#endif /* SVN_REPOS_PRIVATE_H */ 126