Finish issue #2991: client should announce capabilities to server, and
server should pass them along to start-commit hook.  This would allow
a server to reject commits from clients that don't don't know how to
keep mergeinfo up to date, for example.

* subversion/libsvn_repos/repos.h
  (struct svn_repos_t): Add new capabilities field.
  (svn_repos__hooks_start_commit): Take new capabilities parameter.

* subversion/svnserve/serve.c: Include svn_repos_private.h.
  (find_repos): Take new capabilities parameter, use it to set a
    capabilities list in the new repos object.
  (serve): Pass the capabilities to find_repos.

* subversion/libsvn_repos/fs-wrap.c
  (svn_repos_fs_begin_txn_for_commit2): Pass capabilities along to 
    svn_repos__hooks_start_commit.

* subversion/libsvn_repos/hooks.c
  (svn_repos__hooks_start_commit): Take new capabilities parameter,
    convert the list to a string, and pass along to the hook program. 

* subversion/include/private/svn_repos_private.h: New file.
  (svn_repos__capabilities_as_list): New declaration.
  (svn_repos__set_capabilities): New declaration.

* subversion/libsvn_repos/repos.c: Include svn_ra.h, svn_repos_private.h.
  (svn_repos__capabilities_as_list): Define new function.
  (svn_repos__set_capabilities): Define new function.
  (create_hooks): Document the new capabilities list passed to the
    start-commit hook.

* subversion/mod_dav_svn/repos.c: Include svn_repos_private.h.
  (get_resource): Handle new SVN_RA_CAPABILITY_LOG_REVPROPS; store
    all capabilities in repos.

* subversion/libsvn_ra_local/split_url.c: Include svn_repos_private.h.
  (svn_ra_local__split_URL): Set capabilities in new repos object.

* subversion/libsvn_ra_serf/util.c
  (svn_ra_serf__setup_serf_req): Send new SVN_RA_CAPABILITY_LOG_REVPROPS.

* subversion/include/svn_dav.h
  (SVN_DAV_PROP_NS_DAV_SVN_LOG_REVPROPS): Move definition, fix formatting.

* subversion/libsvn_ra_serf/propfind_buckets.c
  (become_request): Send SVN_DAV_PROP_NS_DAV_SVN_LOG_REVPROPS.

* subversion/libsvn_ra_neon/util.c
  (svn_ra_neon__request_dispatch): Send SVN_DAV_PROP_NS_DAV_SVN_LOG_REVPROPS.

* subversion/libsvn_ra_svn/client.c
  (open_session): Count args correctly; send SVN_RA_SVN_CAP_LOG_REVPROPS.
  (ra_svn_has_capability): Rewrite for compactness.

* subversion/include/svn_ra.h
  (svn_ra_has_capability): Document error behavior.

* subversion/libsvn_ra_serf/serf.c
  (capabilities_headers_iterator_callback): Formatting fix for
    consistency with the rest of the capabilities code.

* subversion/include/svn_ra_svn.h
  (SVN_RA_SVN_CAP_LOG_REVPROPS): Fix comment formatting, for consistency.

* subversion/tests/cmdline/commit_tests.py
  (start_commit_detect_capabilities): New test.
  (test_list): Run it.


git-svn-id: https://svn.apache.org/repos/asf/subversion/branches/issue-2991-dev@867687 13f79535-47bb-0310-9956-ffa450edef68
17 files changed