For issue #4371 ("Subversion requires Serf 1.2.1"), teach the build
system to expect Serf 1.2.1 now.

* INSTALL,
* configure.ac,
* get-deps.sh,
* build/generator/gen_win.py
  Bump Serf required version to 1.2.1.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489114 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_wc/update_editor.c
  (delete_entry): Simplify some node kind code.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489115 13f79535-47bb-0310-9956-ffa450edef68
For issue #4371 ("Subversion requires Serf 1.2.1")...

* subversion/libsvn_ra_serf/ra_serf.h
  Bump version check for Serf library to 1.2.1.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489116 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_ra_serf/util.c
  Remove all "#if SERF_VERSION_AT_LEAST()" conditionals -- those tests
  should always be true now.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489117 13f79535-47bb-0310-9956-ffa450edef68
* tools/dev/build-svn-deps-win.pl: Bump Serf to 1.2.1


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489121 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_client/merge.c
  (find_automatic_merge): Error instead of crashing if source branch is not
    related to target branch.

Found by: steveking

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489203 13f79535-47bb-0310-9956-ffa450edef68
Return "501 Not Implemented" rather than "401 Unathorized" when
anonymous LOCK requests fail.  Return "412 Precondition Failed"
rather than "401 Unathorized" when a LOCK refresh has the wrong
token.  The 401 responses were not valid HTTP.  Fixes part of
issue 4368.

* subversion/mod_dav_svn/lock.c
  (append_locks, remove_lock): Return 501.
  (refresh_locks): Return 501 or 412.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489339 13f79535-47bb-0310-9956-ffa450edef68
Avoid dropping errors when handling locking requests over serf.  I
don't know whether a standard server will ever trigger the code path
that drops the error but it's simple for a modified server to return
an error, 412 for example, that gets dropped.

* subversion/libsvn_ra_serf/locks.c
  (determine_error): Check status line if err is not set, check
   reason string is not null.
  (svn_ra_serf__get_lock, svn_ra_serf__lock): Add tracing.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489526 13f79535-47bb-0310-9956-ffa450edef68
Fix "unused variable" warning.  No functional change.

* subversion/libsvn_ra_svn/marshal.c
  (read_item): drop unused variable.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489820 13f79535-47bb-0310-9956-ffa450edef68
The standard C lib strtoul signature is flawed in that it effectively
loses the const qualifier from the input buffer when returning the
updated "end" location.  No need to make the same mistake in our
variant of it.

* subversion/include/private/svn_string_private.h
  (svn__strtoul): make output constness match input constness

* subversion/libsvn_subr/string.c
  (svn__strtoul): update implementation

* subversion/libsvn_subr/types.c
  (svn_revnum_parse): update caller


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489824 13f79535-47bb-0310-9956-ffa450edef68
Correct an error message.  No functional change.

* subversion/libsvn_subr/types.c
  (svn_revnum_parse): we can't have leading '0' in that case


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489826 13f79535-47bb-0310-9956-ffa450edef68
Another go at the relpath_is_canonical check.  As it turns out, it is
much faster to check for "." and "//" elements in seperate runs due to
the simpler patterns that we check for.

* subversion/libsvn_subr/dirent_uri.c
  (relpath_is_canonical): rework the scanner part

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489828 13f79535-47bb-0310-9956-ffa450edef68
In the python tests: Replace the most trivial 'commit the whole working copy'
calls that don't perform verifications on the result by a call to
sbox.simple_commit() that at least verifies that a new revision is created.

This way we detect some commit handling breakage (such as timestamp problems)
sooner.

* subversion/tests/cmdline/autoprop_tests.py
  (svn_prop_inheritable_autoprops_unversioned_subtrees_versioned_target):

* subversion/tests/cmdline/blame_tests.py
  (merge_sensitive_blame_and_empty_mergeinfo):

* subversion/tests/cmdline/commit_tests.py
  (commit_out_of_date_deletions):

* subversion/tests/cmdline/history_tests.py
  (cat_avoids_false_identities):

* subversion/tests/cmdline/lock_tests.py
  (verify_path_escaping):

* subversion/tests/cmdline/log_tests.py
  (merge_sensitive_log_reverse_merges,
   merge_sensitive_log_ignores_cyclic_merges,
   merge_sensitive_log_copied_path_inherited_mergeinfo):

* subversion/tests/cmdline/merge_authz_tests.py
  (reintegrate_fails_if_no_root_access):

* subversion/tests/cmdline/merge_reintegrate_tests.py
  (reintegrate_replaced_source):

* subversion/tests/cmdline/merge_tests.py
  (merge_range_predates_history,
   foreign_repos,
   foreign_repos_uuid,
   foreign_repos_2_url,
   copy_then_replace_via_merge,
   merge_source_with_replacement,
   reverse_merge_with_rename):

* subversion/tests/cmdline/resolve_tests.py
  (theirs_conflict_in_subdir):

* subversion/tests/cmdline/revert_tests.py
  (revert_add_over_not_present_dir):

* subversion/tests/cmdline/stat_tests.py
  (status_depth_update):

* subversion/tests/cmdline/svnadmin_tests.py
  (dump_copied_dir,
   dump_move_dir_modify_child,
   recover_fsfs,
   fsfs_recover_handle_missing_revs_or_revprops_file):

* subversion/tests/cmdline/switch_tests.py
  (nonrecursive_switching):

* subversion/tests/cmdline/tree_conflict_tests.py
  (up_add_onto_add_revert):
    Use sandbox.simple_commit() instead of
    main.run_svn(None, 'ci', ..., wc_dir) with no verifications.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489837 13f79535-47bb-0310-9956-ffa450edef68
* subversion/tests/cmdline/switch_tests.py
  (imports): Remove unused import from externals_tests.py


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489840 13f79535-47bb-0310-9956-ffa450edef68
Fix a key mapping inefficiency in simplified scheme used by the
1.9 membuffer cache.  In cases of fixed length 16 byte key structures,
the first bytes usually contain a revision number.  Rotating that before
mapping it onto index buckets creates unnecessary "hot buckets",
i.e. local index overflows causing data eviction.

* subversion/libsvn_subr/cache-membuffer.c
  (combine_key): don't rotate the first 8-bytes of a 16 byte key

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489850 13f79535-47bb-0310-9956-ffa450edef68
Minor simplification of the cache stats code.  Clear the aggregated
stats strcut before passing it on to the specific implementatations.

* subversion/libsvn_subr/cache.c
  (svn_cache__get_info): clear all stats before filling them

* subversion/libsvn_subr/cache-membuffer.c
  (svn_membuffer_cache_get_info): simplify

* subversion/libsvn_subr/cache-memcache.c
  (memcache_get_info): simplify

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489855 13f79535-47bb-0310-9956-ffa450edef68
Move the merge test helper code that is used outside merge_tests.py to a new
helper file, to remove a dependency on 18500 lines of python in each test.

For now name the file after a similar file for treeconflicts. This code
should eventually be refactored to a more generic form.

* subversion/tests/cmdline/blame_tests.py
* subversion/tests/cmdline/log_tests.py
* subversion/tests/cmdline/mergeinfo_tests.py
* subversion/tests/cmdline/merge_authz_tests.py
* subversion/tests/cmdline/merge_automatic_tests.py
* subversion/tests/cmdline/merge_reintegrate_tests.py
* subversion/tests/cmdline/merge_tree_conflict_tests.py
* subversion/tests/cmdline/resolve_tests.py
  (imports): Import from svntest.mergetrees instead of merge_tests.py

* subversion/tests/cmdline/merge_tests.py
  (imports): Explicitly import everything from svntest.mergetrees.

  (expected_merge_output,
   check_mergeinfo_recursively,
   set_up_dir_replace,
   set_up_branch,
   local_path,
   svn_mkfile,
   svn_modfile,
   svn_copy,
   svn_merge,
   noninheritable_mergeinfo_test_set_up): Move functions to ...

* subversion/tests/cmdline/svntest/mergetrees.py
  (*): .. here.
  Copied from ../merge_tests.py, keeping just the 'generic' code.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489856 13f79535-47bb-0310-9956-ffa450edef68
* subversion/tests/cmdline/update_tests.py
  (imports): Following up on r1489856, fixup imports.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489858 13f79535-47bb-0310-9956-ffa450edef68
Improve cache statistics in particular for membuffer caches:
- show index bucket usage distribution
- show size stats only as an option
- provide global membuffer stats
Update our reporting code to use all these nice features.

* subversion/include/private/svn_cache.h
  (svn_cache__info_t): add bucket fill level histogram
  (svn_cache__get_info): add option to reduce output
  (svn_cache__membuffer_get_global_info): new private API function

* subversion/libsvn_subr/cache.c
  (svn_cache__format_info): extend implementation

* subversion/libsvn_fs_fs/caching.c
  (dump_cache_statistics): access stats only; skip unused caches
  (dump_global_cache_statistics): new utility function
  (svn_fs_fs__initialize_caches): register global stats dump

* subversion/libsvn_subr/cache-membuffer.c
  (svn_membuffer_get_segment_info): optionally include histogram
  (svn_membuffer_cache_get_info): update caller
  (svn_membuffer_get_global_segment_info): new utility
  (svn_cache__membuffer_get_global_info): implement new private API


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1489883 13f79535-47bb-0310-9956-ffa450edef68
Add regression test for the 'svn ci ci' problem I just found out.
I expected to commit the current directory, but instead I committed nothing
at all without a warning that I had two 'ci'-s.

* subversion/tests/cmdline/commit_tests.py
  (commit_unversioned): New test. Mark as XFail.
  (test_list): Add commit_unversioned.


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