Checkout Tools
  • last updated 4 hours ago
Constraints: committers
Constraints: files
Constraints: dates
On all branches:

.: Removed redundant SVN properties

  1. … 78 more files in changeset.
On the authzperf branch:

Finaly sync with trunk. There were no conflicts.

On the authzperf branch:

Sync from trunk up to r1775555 with no conflicts.

    • ?
On the authzperf branch:

Minor code cleanup.

* subversion/libsvn_repos/authz.c

(svn_repos_authz_check_access): PATH cannot be NULL at that point anymore.

On the authzperf branch:

Implement the short-cut suggested in the Wiki - use the combined access

rights that the user has of the respective repo and try to answer the

authz requested based on that.

This is fairly efficient but currently not as efficient as it could be

since the global authz model can't tell when $authenticated or the default

rules never apply to a specific user.


(TODO, DONE): Last todo for this branch is done now.

* subversion/libsvn_repos/authz.c

(authz_user_rules_t): Add field for the global / aggregated access rights.

(get_user_rules): Set the new field.

(svn_repos_authz_check_access): Use the new field to short-cut the request

and to not create the filtered tree.

On the authzperf branch:

Fix the calculation of global access rights for the cases where explicit

and implicit rights need to be combined.

* subversion/libsvn_repos/authz_info.c

(resolve_global_rights): If there are no rules for the repository itself,

the global rules apply but not the ones for other


(svn_authz__get_global_rights): Even if we do have per-user rights, they

still overlap with $authenticated rights.

* subversion/tests/libsvn_repos/authz-test.c

(test_global_rights): Add test cases for per-repos and global rules

combination as well as per-user and $authenticated

user rule combinations.

On the authzperf branch:

Refactor the authz testing code to make it easier to add sub-tests.

* subversion/tests/libsvn_repos/authz-test.c


run_global_rights_tests): Factored out from ...

(test_global_rights): ... this. Fix copy'n'pastos in test cases.

On the authzperf branch:

More refactoring.

* subversion/libsvn_repos/authz.c

(authz_user_rules_t): The filtered tree might be NULL for longer now.

(get_user_rules): Only check / auto-construct the authz_user_rules_t

but move the filtered tree construction to ...

(filter_tree): ... this new function.

(svn_repos_authz_check_access): Update caller. Construct the filtered

tree on demand, i.e. always - but that

will change with the next commit.

On the authzperf branch:

A bit of refactoring before the next larger change.

* subversion/libsvn_repos/authz.c

(get_filtered_tree): Rename this to ...

(get_user_rules): ... this more appropriate name. Also, don't change

the lookup state here anymore.

(svn_repos_authz_check_access): Update caller. Initialize / update the

lookup state when we actually need it.

On the authzperf branch:

Make svn_authz__get_global_rights() more useful by resolving all rules that

may apply to the respective repo and not just the ones explicitly declared

for it. This is necessary because both sets of rules will be overlaid when

resolving access rights.

IOW, merge the global access with the per-repo ones. Add a test for it.

* subversion/libsvn_repos/authz_info.c

(combine_rights): New utility function.

(resolve_global_rights): Always combine the per-repo rights with the rights

for "any" repo.

* subversion/tests/libsvn_repos/authz-test.c

(NL): Useful define.

(test_global_rights): New test.

(test_funcs): Register the new test.


(TODO, DONE): One down, only one left to go before we are ready for /trunk.

On the authzperf branch:

Correctly implement the "per-repos rule before global rule" principle.

The crux with SVN's old lookup code was that it would look for a matching

rule first and only then check whether it applied to the current user.

Hence, we need to build the filtered pre-repo-and-user tree in a two-step

process: Collect all rules for the repo as well as the global rules and

eliminate global rules where per-repo rules exist for the same path.

Examine and filter the result by ACL afterwards.

* subversion/libsvn_repos/authz.h


svn_authz__acl_applies_to_repo): Declare new private API for functions

factored out from other private API.

* subversion/libsvn_repos/authz_info.c

(svn_authz__acl_applies_to_repo): Factored out from ...

(svn_authz__get_acl_access): ... this one.

* subversion/libsvn_repos/authz_parse.c

(svn_authz__compare_paths): Factored out from ...

(svn_authz__compare_rules): ... this one.

* subversion/libsvn_repos/authz.c

(create_user_authz): Resolve rule precedence before filtering.

* subversion/tests/libsvn_repos/repos-test.c

(test_authz_prefixes): Correct the test expectations as precedence rules

are different now for reasons of backward compat.

On the authzperf branch:

Add support for in-registry authz under Windows.

While this is certainly a fringe use-case, there will probably be a few

installations out there where the registry was used to hold the authz

config or parts of it. There is no compelling reason to break those


The solution is to simply use the standard config parser, serialize the

result into a string buffer and process that as if it came from a file.

If need be, this code path could later be used as a fallback for any

config parsing feature that we might have missed with the new code.

* subversion/include/private/svn_config_private.h

(svn_config__write): Declare the new private serializer interface.

* subversion/libsvn_subr/config.c

(svn_config__write): Implement.

* subversion/libsvn_repos/config_file.c

(get_registry_config): New parser function, alongside "in-file" and

"in-repo" config support.

(svn_repos__get_config): Add handling of registry URLs under Windows.

* subversion/tests/libsvn_subr/config-test.c

(test_serialization): New test case for the new serializer interface.

(test_funcs): Register new test.


(TODO, DONE): Update

On the authzperf branch:

Fix a pool lifetime issue in our config pool tests. The issue would only

be triggered when there is a test failure.

* subversion/tests/libsvn_repos/repos-test.c

(test_config_pool): The config pool needs to live at least as long as

the references to its content, thus these may not

be allocated from sibling pools. Same or sub-pool

would be fine.

On the authzperf branch:


(TODO): Add items that we want to fix before merging to /trunk

On the authzperf branch:


(TODO, DONE): Update.

On the authzperf branch:

Sync with /trunk up to r1772443. Resolved a trivial text conflict in repos tests.

  1. … 65 more files in changeset.
On the authzperf branch:

Add a global cache for filtered authz trees. Concurrent and consecutive

requests of the same user to the same repository may now share the same

filtered tree struct. This saves runtime and memory.

The new cache is keyed by the triple of (authz-cache-key, user, repository).

We already calculate the first element, the cache key for full authz model,

but we must store it now as part of the svn_authz_t struct.

* subversion/libsvn_repos/authz.h

(svn_authz_t): Add the AUTHZ_ID, i.e. full model cache key.

* subversion/libsvn_repos/authz.c

(filtered_pool): The new cache.

(synchronized_authz_initialize): Initialize the new cache, too.

(construct_filtered_key): New utility function.

(get_filtered_tree): Add cache lookup and population.

(authz_read): Return the full model cache key instead of it being a local


(svn_repos_authz_read3): Update caller.

On the authzperf branch:

Remove the local cache of filtered authz trees and simply keep only the

latest one. Now, the authz struct only contains the references to the

3 authz model levels - full model, filtered tree and lookup context.

A proper cache for the filtered trees will be added shortly.

* subversion/libsvn_repos/authz.h

(AUTHZ_FILTERED_CACHE_SIZE): No longer needed.

(svn_authz_t): Replace the local USER_RULES cache with a simple reference

to a FILTERED tree.

* subversion/libsvn_repos/authz.c

(get_filtered_tree): Update, dropping the cache iteration.

On the authzperf branch:

Minor refactoring.

* subversion/libsvn_repos/authz.c

(matches_filtered_tree): Extract this new check function out of ...

(get_filtered_tree): ... this function.

On the authzperf branch:

Reorder code in preparation of upcoming changes.

* subversion/libsvn_repos/authz.c




svn_repos_authz_initialize): Move up.

(construct_authz_key): Move up and renamed from ...

(construct_key): ... this.

(authz_read): Update caller.

Revert r1771116, committed on the wrong branch.

Make the test suite work when checked out of a git repository, by not

requiring empty directories.

Subversion's import tests test behavior when importing empty

directories. These empty directories are checked in as part of

our test data. This however breaks our import tests when using

Subversion's Git mirror at, as Git is unable to

version empty directories.

As our tests rely on the fact that these directories are indeed

empty it is not possible to work around the issue by creating a

`.gitkeep` file inside these directories, as is commonly done

with git. Instead, the issue is fixed inside the tests itself by

creating the test data at run time.

* subversion/tests/cmdline/

(import_inherited_ignores): Create the tree to be imported at run time.

* subversion/tests/cmdline/import_tests_data


Suggested by: Patrick Steinhardt

On the authzperf branch:

Update references to svn_repos_authz_read to the lastest API version.

* subversion/mod_authz_svn/mod_authz_svn.c

(canonicalize_access_file): Update commentary.

(get_access_conf): We don't have a repos we can use here but that

is fine ...

* tools/server-side/svnauthz.c

(get_authz): Same.

    • ?
On the authzperf branch:

Get rid of the obsolete svnserve-specific authz caching.

* subversion/include/private/svn_repos_private.h



svn_repos__authz_pool_get): Remove obsolete private API.

* subversion/libsvn_repos/authz_pool.c

(): Delete file.

* subversion/svnserve/server.h

(serve_params_t): Remove authz cache instance.

* subversion/svnserve/serve.c



construct_server_baton): There's no authz cache to use here anymore.

* subversion/svnserve/svnserve.c

(sub_main): No private authz cache to initialize anymore.

On the authzperf branch:

Bump the svn_repos_authz_read API to be able to provide the repository

hint for faster in-repo authz lookup.

* subversion/include/svn_repos.h

(svn_repos_authz_read3): Bumped version.

(svn_repos_authz_read2): Deprecate.

* subversion/libsvn_repos/authz.c

(svn_repos_authz_read3): Bump.

* subversion/libsvn_repos/deprecated.c

(svn_repos_authz_read2): Implement in terms of the newer API.

* subversion/svnserve/serve.c

(load_authz_config): Call the new API instead of the old caching code.

On the authzperf branch:

Add caching support to our authz parsers.

There is only one authz parser function anymore and we simply need to add

a global object cache to be used by that function. However, the cache /

object pool needs to be created early on to guarantee pool lifetimes. To

this end, the cache is optional and we add a public *_initialize function.

* subversion/include/svn_repos.h

(svn_repos_authz_initialize): New API.

* subversion/libsvn_repos/authz.c




svn_repos_authz_initialize): Adds the authz object cache and the

initialization infrastructure.

(construct_key): New utility function.

(authz_read): Add cache lookup and insertion code.

* subversion/mod_dav_svn/mod_dav_svn.c

(init): Initialize the authz caching.

* subversion/svnserve/svnserve.c

(sub_main): Same.

On the authzperf branch:

Get rid of obsolete code.

* subversion/include/private/svn_repos_private.h

(svn_repos__retrieve_config): Remove.

* subversion/libsvn_repos/authz.c




svn_repos__retrieve_config): Remove.

* subversion/libsvn_repos/config_pool.c

(svn_repos__config_pool_get): Eliminate the unnecessary retry code for urls.

On the authzperf branch:

Use the new generalized access to config data for authz input as well.

* subversion/libsvn_repos/authz.c

(authz_read): Call the common access functions instead of the local code.

(svn_repos_authz_read2): Update code.

* subversion/tests/cmdline/

(svnauthz_accessof_is_file_test): Update test expectation.

On the authzperf branch: Refine error handling.

* subversion/libsvn_repos/config_file.c

(handle_missing_file): New utility function for unified "not a file"


(get_repos_config): Use the new helper to return the same error message

on missing in-repo config files as currently on /trunk.

(get_file_config): Add support for the same error handling as for in-repos

config files.

* subversion/libsvn_repos/config_pool.c

(svn_repos__config_pool_get): Provide the file path/url with the error

message as we do in other places that

parse a config stream.

On the authzperf branch: Minor touch-up.

* subversion/libsvn_repos/config_file.h

(svn_repos__create_config_access): Rename PREFERRED_REPOS to REPOS_HINT

to not mislead people.

* subversion/libsvn_repos/config_file.c

(get_repos_config): Update commentary.

(svn_repos__create_config_access): Mirror header change.