Make the size of the thread pool in svnserve CL configurable.

* subversion/svnserve/svnserve.c
  (SVNSERVE_OPT_MIN_THREADS,
   SVNSERVE_OPT_MAX_THREADS): #define new option IDs
  (svnserve__options): Add option definitions if threads are available.
                       Unfortunately, there seems to be no way to use
                       THREADPOOL_*_SIZE constants here.
  (sub_main): Parse the new options and apply limits to the thread pool.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584353 13f79535-47bb-0310-9956-ffa450edef68
Fix APR memory pool usage issue in config_pool.

* subversion/libsvn_repos/config_pool.c
  (auto_parse): Results must be allocated in the RESULT_POOL.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584354 13f79535-47bb-0310-9956-ffa450edef68
Ensure consistency between proto rev and proto index files in FSFS f7
after a write operation to the transaction crashed.

Bottom line here is that the proto rev file may contain extra (garbage)
data that is not being referenced by anybody.

* subversion/libsvn_fs_fs/index.h
  (svn_fs_fs__p2l_proto_index_next_offset): Add private API to retrieve
                                            the expected length of the
                                            proto-rev file.

* subversion/libsvn_fs_fs/index.c
  (svn_fs_fs__p2l_proto_index_next_offset): Implement.

* subversion/libsvn_fs_fs/transaction.c
  (auto_truncate_proto_rev): New function matching the actual proto-rev
                             file size with the value expected as per
                             proto-index.
  (get_writable_proto_rev): Call the new function whenever we open the
                            proto-rev file.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584356 13f79535-47bb-0310-9956-ffa450edef68
Small svnadmin --help output fixes.

* subversion/svnserve/svnserve.c
  (svnserve__options): Caching is for FSX as well. Make sure all
                       text fits nicely into 80 columns.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584358 13f79535-47bb-0310-9956-ffa450edef68
Tweak comments, no functional change.

* subversion/include/svn_fs.h
  (svn_fs_lock_many, svn_fs_unlock_many): Tweak docs.

* subversion/include/svn_repos.h
  (svn_repos_fs_lock_many, svn_repos_fs_unlock_many): Tweak docs.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584368 13f79535-47bb-0310-9956-ffa450edef68
Fix the rev / pack file re-open logic after a background pack run. 

* subversion/libsvn_fs_fs/cached_data.c
  (block_read): Before checking the pack status, re-read it from disk.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584374 13f79535-47bb-0310-9956-ffa450edef68
Add an XFAIL regression test for issue 3515, a DAV client cannot
refresh a lock using a LOCK request with an If: header.

Patch by: Sergey Raevskiy <sergey.raevskiy{_AT_}visualsvn.com>


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584576 13f79535-47bb-0310-9956-ffa450edef68
Fix issue 3515, DAV clients cannot refresh LOCK.

* subversion/mod_dav_svn/lock.c
  (get_locks, has_locks): Make the 'Big Lie' only apply to Subversion
   clients, other clients get standard WebDAV behaviour.

* subversion/tests/cmdline/lock_tests.py
  (dav_lock_refresh): Remove XFAIL.

Patch by: rhuijben


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584592 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_client/update.c
  (update_internal): Add comment.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584595 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_repos/fs-wrap.c
  (svn_repos_fs_begin_txn_for_commit2): Fix typo in comment. No functional 
   change.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584597 13f79535-47bb-0310-9956-ffa450edef68
Make two invocations of svn_ra_get_locks() check for the documented error code
instead of also for the invalid error code that ra_serf returned.

* subversion/libsvn_client/info.c
  (svn_client_info4): Just check for the documented error.

* subversion/libsvn_client/status.c
  (reporter_finish_report): Just check for the documented error.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584601 13f79535-47bb-0310-9956-ffa450edef68
Add doc strings to several locking-related functions and structures
in fs_base, fs_fs and fs_x.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584604 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_ra_serf/getlocks.c
  (svn_ra_serf__get_locks): Improve error handling behavior by no longer
    disabling the standard error handling, but handling the proper error
    from older mod_dav_svn versions. This will make us properly attach
    the server error to the error chain.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584606 13f79535-47bb-0310-9956-ffa450edef68
* subversion/include/private/svn_ra_svn_private.h,
  subversion/libsvn_ra_svn/marshal.c
  (svn_ra_svn__write_cmd_failure): Document that the 'err' input parameter
    is not cleared, and make it 'const' to reinforce this.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584610 13f79535-47bb-0310-9956-ffa450edef68
Add 'const' to the error input parameter of some error-related APIs that
don't clear or modify the error, for clarity.

A follow-up to r1584610 which did this to a function in svnserve, which gave
warnings indicating we need to do the same to some lower level functions.

* subversion/include/private/svn_error_private.h,
  subversion/include/svn_error.h,
  subversion/libsvn_subr/error.c
  (svn_err_best_message,
   svn_handle_warning2,
   svn_error__is_tracing_link): Make the input error pointer 'const'.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584613 13f79535-47bb-0310-9956-ffa450edef68
Fix typos in local variable names and comments.

* subversion/libsvn_fs_fs/lock.c,
  subversion/libsvn_fs_x/lock.c
  (svn_fs_fs__lock, svn_fs_fs__unlock,
   svn_fs_x__lock, svn_fs_x__unlock): s/cannonical/canonical/.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584615 13f79535-47bb-0310-9956-ffa450edef68
Add comments, no functional change.

* subversion/libsvn_fs_fs/lock.c
* subversion/libsvn_fs_x/lock.c
  (struct unlock_baton, unlock_single): Add comments.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584706 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_fs_fs/lock.c
* subversion/libsvn_fs_x/lock.c
  (unlock_single): Followup to 1584706, remove spurious variable declaration.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584710 13f79535-47bb-0310-9956-ffa450edef68
* subversion/tests/cmdline/lock_tests.py
  (dav_lock_refresh): Use svn to obtain the lock, to make the test more
    compatible with maintainance branches.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584745 13f79535-47bb-0310-9956-ffa450edef68
Make svn_fs_lock_target_t opaque in the public API so that any
future changes to the target parameters are easier.

* subversion/include/svn_fs.h
  (struct svn_fs_lock_target_t): Change to forward declaration.
  (svn_fs_lock_target_create, svn_fs_lock_target_set_token): New.

* subversion/libsvn_fs/fs-loader.h
  (struct svn_fs_lock_target_t): Define.

* subversion/libsvn_fs/fs-loader.c
  (svn_fs_lock_target_create, svn_fs_lock_target_set_token): New.

* subversion/libsvn_repos/fs-wrap.c
  (svn_repos_fs_lock_many): Use svn_fs_lock_target_set_token.
  (svn_repos_fs_lock): Use svn_fs_lock_target_create.

* subversion/libsvn_ra_local/ra_plugin.c
  (svn_ra_local__lock): Use svn_fs_lock_target_create.

* subversion/svnserve/serve.c
  (lock_many): Use svn_fs_lock_target_create.

* subversion/tests/libsvn_fs/locks-test.c
  (lock_multiple_paths): Use svn_fs_lock_target_create.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1584872 13f79535-47bb-0310-9956-ffa450edef68