diff options
Diffstat (limited to 'subversion/mod_dav_svn/dav_svn.h')
-rw-r--r-- | subversion/mod_dav_svn/dav_svn.h | 112 |
1 files changed, 90 insertions, 22 deletions
diff --git a/subversion/mod_dav_svn/dav_svn.h b/subversion/mod_dav_svn/dav_svn.h index ab776f1..8786518 100644 --- a/subversion/mod_dav_svn/dav_svn.h +++ b/subversion/mod_dav_svn/dav_svn.h @@ -52,6 +52,15 @@ extern "C" { /* a pool-key for the shared dav_svn_root used by autoversioning */ #define DAV_SVN__AUTOVERSIONING_ACTIVITY "svn-autoversioning-activity" +/* Option values for SVNAllowBulkUpdates. Note that + it's important that CONF_BULKUPD_DEFAULT is 0 to make + dav_svn_merge_dir_config do the right thing. */ +typedef enum dav_svn__bulk_upd_conf { + CONF_BULKUPD_DEFAULT, + CONF_BULKUPD_ON, + CONF_BULKUPD_OFF, + CONF_BULKUPD_PREFER +} dav_svn__bulk_upd_conf; /* dav_svn_repos * @@ -110,7 +119,7 @@ typedef struct dav_svn_repos { svn_boolean_t autoversioning; /* Whether bulk updates are allowed for this repository. */ - svn_boolean_t bulk_updates; + dav_svn__bulk_upd_conf bulk_updates; /* Whether HTTP protocol version 2 is allowed to be used. */ svn_boolean_t v2_protocol; @@ -278,11 +287,15 @@ struct dav_resource_private { svn_boolean_t auto_checked_out; /* was this resource fetched using our public peg-/working-rev CGI - interface (ie: /path/to/item?p=PEGREV]? */ + interface (ie: /path/to/item?p=PEGREV)? */ svn_boolean_t pegged; /* Cache any revprop change error */ svn_error_t *revprop_error; + + /* was keyword substitution requested using our public CGI interface + (ie: /path/to/item?kw=1)? */ + svn_boolean_t keyword_subst; }; @@ -302,10 +315,7 @@ const char *dav_svn__get_fs_parent_path(request_rec *r); svn_boolean_t dav_svn__get_autoversioning_flag(request_rec *r); /* for the repository referred to by this request, are bulk updates allowed? */ -svn_boolean_t dav_svn__get_bulk_updates_flag(request_rec *r); - -/* for the repository referred to by this request, should httpv2 be advertised? */ -svn_boolean_t dav_svn__get_v2_protocol_flag(request_rec *r); +dav_svn__bulk_upd_conf dav_svn__get_bulk_updates_flag(request_rec *r); /* for the repository referred to by this request, are subrequests active? */ svn_boolean_t dav_svn__get_pathauthz_flag(request_rec *r); @@ -316,6 +326,9 @@ svn_boolean_t dav_svn__get_txdelta_cache_flag(request_rec *r); /* for the repository referred to by this request, is fulltext caching active? */ svn_boolean_t dav_svn__get_fulltext_cache_flag(request_rec *r); +/* for the repository referred to by this request, is revprop caching active? */ +svn_boolean_t dav_svn__get_revprop_cache_flag(request_rec *r); + /* for the repository referred to by this request, are subrequests bypassed? * A function pointer if yes, NULL if not. */ @@ -325,6 +338,17 @@ authz_svn__subreq_bypass_func_t dav_svn__get_pathauthz_bypass(request_rec *r); SVNParentPath allowed? */ svn_boolean_t dav_svn__get_list_parentpath_flag(request_rec *r); +/* For the repository referred to by this request, should HTTPv2 + protocol support be advertised? Note that this also takes into + account the support level expected of based on the specified + master server version (if provided via SVNMasterVersion). */ +svn_boolean_t dav_svn__check_httpv2_support(request_rec *r); + +/* For the repository referred to by this request, should ephemeral + txnprop support be advertised? */ +svn_boolean_t dav_svn__check_ephemeral_txnprops_support(request_rec *r); + + /* SPECIAL URI @@ -373,6 +397,11 @@ const char *dav_svn__get_xslt_uri(request_rec *r); /* ### Is this assumed to be URI-encoded? */ const char *dav_svn__get_master_uri(request_rec *r); +/* Return the version of the master server (used for mirroring) iff a + master URI is in place for this location; otherwise, return NULL. + Comes from the <SVNMasterVersion> directive. */ +svn_version_t *dav_svn__get_master_version(request_rec *r); + /* Return the disk path to the activities db. Comes from the <SVNActivitiesDB> directive. */ const char *dav_svn__get_activities_db(request_rec *r); @@ -383,7 +412,10 @@ const char *dav_svn__get_activities_db(request_rec *r); const char *dav_svn__get_root_dir(request_rec *r); /* Return the data compression level to be used over the wire. */ -int dav_svn__get_compression_level(void); +int dav_svn__get_compression_level(request_rec *r); + +/* Return the hook script environment parsed from the configuration. */ +const char *dav_svn__get_hooks_env(request_rec *r); /** For HTTP protocol v2, these are the new URIs and URI stubs returned to the client in our OPTIONS response. They all depend @@ -414,10 +446,17 @@ const char *dav_svn__get_vtxn_root_stub(request_rec *r); /*** activity.c ***/ /* Create a new transaction based on HEAD in REPOS, setting *PTXN_NAME - to the name of that transaction. Use POOL for allocations. */ + to the name of that transaction. REVPROPS is an optional hash of + const char * property names and const svn_string_t * values which + will be set as transactions properties on the transaction this + function creates. Use POOL for allocations. + + NOTE: This function will overwrite the svn:author property, if + any, found in REVPROPS. */ dav_error * dav_svn__create_txn(const dav_svn_repos *repos, const char **ptxn_name, + apr_hash_t *revprops, apr_pool_t *pool); /* If it exists, abort the transaction named TXN_NAME from REPOS. Use @@ -614,6 +653,7 @@ static const dav_report_elem dav_svn__reports_list[] = { { SVN_XML_NAMESPACE, "replay-report" }, { SVN_XML_NAMESPACE, "get-deleted-rev-report" }, { SVN_XML_NAMESPACE, SVN_DAV__MERGEINFO_REPORT }, + { SVN_XML_NAMESPACE, SVN_DAV__INHERITED_PROPS_REPORT }, { NULL, NULL }, }; @@ -661,23 +701,22 @@ dav_svn__get_deleted_rev_report(const dav_resource *resource, const apr_xml_doc *doc, ap_filter_t *output); +dav_error * +dav_svn__get_inherited_props_report(const dav_resource *resource, + const apr_xml_doc *doc, + ap_filter_t *output); /*** posts/ ***/ -/* The list of Subversion's custom POSTs. */ -/* ### TODO: Populate this list and transmit its contents in the - ### OPTIONS response. -static const char * dav_svn__posts_list[] = { - "create-txn", - NULL -}; -*/ - /* The various POST handlers, defined in posts/, and used by repos.c. */ dav_error * dav_svn__post_create_txn(const dav_resource *resource, svn_skel_t *request_skel, ap_filter_t *output); +dav_error * +dav_svn__post_create_txn_with_props(const dav_resource *resource, + svn_skel_t *request_skel, + ap_filter_t *output); /*** authz.c ***/ @@ -720,6 +759,20 @@ dav_svn__allow_read_resource(const dav_resource *resource, apr_pool_t *pool); +/* Return TRUE iff the current user (as determined by Apache's + authentication system) has permission to read repository REPOS_NAME. + This will invoke any authz modules loaded into Apache unless this + Subversion location has been configured to bypass those in favor of a + direct lookup in the Subversion authz subsystem. Use POOL for any + temporary allocation. + IMPORTANT: R must be request for DAV_SVN_RESTYPE_PARENTPATH_COLLECTION + resource. +*/ +svn_boolean_t +dav_svn__allow_list_repos(request_rec *r, + const char *repos_name, + apr_pool_t *pool); + /* If authz is enabled in the specified BATON, return a read authorization function. Otherwise, return NULL. */ svn_repos_authz_func_t @@ -733,11 +786,15 @@ dav_svn__authz_read_func(dav_svn__authz_read_baton *baton); processing. See dav_new_error_tag for parameter documentation. Note that DESC may be null (it's hard to track this down from dav_new_error_tag()'s documentation, but see the dav_error type, - which says that its desc field may be NULL). */ + which says that its desc field may be NULL). + + If ERROR_ID is 0, SVN_ERR_RA_DAV_REQUEST_FAILED will be used as a + default value for the error code. +*/ dav_error * dav_svn__new_error_tag(apr_pool_t *pool, int status, - int errno_id, + int error_id, const char *desc, const char *namespace, const char *tagname); @@ -748,11 +805,15 @@ dav_svn__new_error_tag(apr_pool_t *pool, processing. See dav_new_error for parameter documentation. Note that DESC may be null (it's hard to track this down from dav_new_error()'s documentation, but see the dav_error type, - which says that its desc field may be NULL). */ + which says that its desc field may be NULL). + + If ERROR_ID is 0, SVN_ERR_RA_DAV_REQUEST_FAILED will be used as a + default value for the error code. +*/ dav_error * dav_svn__new_error(apr_pool_t *pool, int status, - int errno_id, + int error_id, const char *desc); @@ -808,7 +869,8 @@ enum dav_svn__build_what { DAV_SVN__BUILD_URI_BC, /* a Baseline Collection */ DAV_SVN__BUILD_URI_PUBLIC, /* the "public" VCR */ DAV_SVN__BUILD_URI_VERSION, /* a Version Resource */ - DAV_SVN__BUILD_URI_VCC /* a Version Controlled Configuration */ + DAV_SVN__BUILD_URI_VCC, /* a Version Controlled Configuration */ + DAV_SVN__BUILD_URI_REVROOT /* HTTPv2: Revision Root resource */ }; const char * @@ -841,6 +903,12 @@ dav_svn__simple_parse_uri(dav_svn__uri_info *info, const char *uri, apr_pool_t *pool); +/* Test the request R to determine if we should return the list of + * repositories at the parent path. Only true if SVNListParentPath directive + * is 'on' and the request is for our configured root path. */ +svn_boolean_t +dav_svn__is_parentpath_list(request_rec *r); + int dav_svn__find_ns(const apr_array_header_t *namespaces, const char *uri); |