Make sure we properly reset an sqlite statement in the upgrade code to avoid
an sqlite assertion which hides the actual error.

* subversion/libsvn_wc/upgrade.c
  (bump_30_upgrade_one_conflict): New function, extracted from...
  (bump_to_30): ... this function. Properly handle errors from
    bump_30_upgrade_one_conflict.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1439802 13f79535-47bb-0310-9956-ffa450edef68
Since working copy upgrades from 1.7 to 1.8 are now explicit, instead of
implicit some wc_db apis can now return a working copy upgrade required error.

Make sure the working copy upgrade code doesn't interpret an error from
the sqlite upgrade code as a trigger to try upgrading from entries.


* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_bump_format): Wrap SVN_ERR_WC_UPGRADE_REQUIRED errors from
    the sqlite upgrade code, to avoid falling in the entries code inside
    svn_wc_upgrade.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1439813 13f79535-47bb-0310-9956-ffa450edef68
Move deprecated function to deprecated.c. Use public api instead of internal
api to obtain temp dir.

* subversion/libsvn_wc/adm_files.c
  (svn_wc_create_tmp_file2): Move this function from here...

* subversion/libsvn_wc/deprecated.c
  (svn_wc_create_tmp_file2): ... to here. Stop opening a raw
    db handle.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1439842 13f79535-47bb-0310-9956-ffa450edef68
* subversion/cmdline/upgrade_tests.py
  (upgrade_from_1_7): Update comment.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1439853 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_wc/workqueue.c (run_postupgrade): Fix an error leak.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1439859 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_wc/wc_db_update_move.c
  (get_info): Sort the children list with svn_sort_compare_items_lexically,
   instead of svn_sort_compare_items_as_paths, since the children list contains
   basenames only and sorting lexically is slightly more efficient.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1439863 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_extend_parent_delete): Move docstring to header file, unchanged.

* subversion/libsvn_wc/wc_db_private.h
  (svn_wc__db_extend_parent_delete): This declaration now has the docstring.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1439866 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_wc/wc_db_wcroot.c
  (try_symlink_as_dir): Don't bother clearing an error known to be SUCCESS.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1439868 13f79535-47bb-0310-9956-ffa450edef68
* subversion/libsvn_wc/revert.c (revert_restore): Don't ignore/leak an error.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1439873 13f79535-47bb-0310-9956-ffa450edef68
* CHANGES (for 1.8.): List issue #4176 fix.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1439968 13f79535-47bb-0310-9956-ffa450edef68
Make notifications during move-update transaction-safe, by only issuing
notifiations if the transaction actually succeeds.

We store notifications in a temporary wc.db table during the update-move
editor drive, and spool notifications from it when the edit completes.

* subversion/libsvn_wc/wc-queries.sql
  (STMT_CREATE_UPDATE_MOVE_LIST,
   STMT_INSERT_UPDATE_MOVE_LIST,
   STMT_FINALIZE_UPDATE_MOVE): New statements.

* subversion/libsvn_wc/wc_db_update_move.c
  (update_move_list_add, update_move_list_notify): New helper functions.
  (tc_editor_alter_directory, update_working_file): Add notifiations to
   the update-move notification list instead of sending them directly.
  (update_moved_away_conflict_victim): Create the move-update notification
   list before starting the editor drive.

* subversion/tests/libsvn_wc/wc-queries-test.c
  (schema_statements): Add STMT_CREATE_UPDATE_MOVE_LIST to this list
   of statements which create temporary tables.
  (slow_statements): Add STMT_SELECT_UPDATE_MOVE_LIST to the list of
   statements which fail if temporary tables don't exist.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1439975 13f79535-47bb-0310-9956-ffa450edef68
Add two tests for the 'svnauthz --groups-file' behavior.  Follow-up to r1438407.

* subversion/tests/cmdline/svnauthz_tests.py
  (svnauthz_accessof_groups_repo_test, svnauthz_accessof_groups_file_test):
    New tests.
  (test_list): Add new tests.

Patch by: Evgeny Kotkov <evgeny.kotkov{_AT_}visualsvn.com>



git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1439992 13f79535-47bb-0310-9956-ffa450edef68
Following up on the explicit 'svn upgrade' requirement, reinstate the option of
opening a wc.db without upgrading for the upgrade process itself. This allows the
upgrade code to use a limited subset of the wc_db api to avoid having to
reimplement code just for upgrades.

* subversion/libsvn_wc/upgrade.c
  (bump_to_30): Obtain wc_db without upgrading to allow creating conflicts.

* subversion/libsvn_wc/wc_db.c
  (svn_wc__db_to_relpath,
   svn_wc__db_from_relpath,
   svn_wc__db_get_wcroot): Apply the same check for wcroots using a new macro.

* subversion/libsvn_wc/wc_db.h
  (svn_wc__db_open): Rename argument. Update documentation.
  (svn_wc__db_to_relpath
   svn_wc__db_from_relpath,
   svn_wc__db_get_wcroot): Document non-upgraded compatibility.

* subversion/libsvn_wc/wc_db_private.h
  (svn_wc__db_t):  Remove auto upgrade variable (always FALSE), and introduce
    verify_format and exclusive.

  (svn_wc__db_pdh_create_wcroot): Rename argument.
  (CHECK_MINIMAL_WCROOT): New macro.

* subversion/libsvn_wc/wc_db_wcroot.c
  (svn_wc__db_open): Initialize variables that affect opening db files.
  (svn_wc__db_pdh_create_wcroot): Remove upgrade code. Only verify versions.
  (svn_wc__db_wcroot_parse_local_abspath): Use config from db instead of
    reparsing it from inside a loop. Update caller.

* subversion/tests/cmdline/upgrade_tests.py
  (upgrade_from_1_7): Rename to ...
  (upgrade_from_1_7_conflict): ... this, update comment and remove XFail.
  (test_list): Update reference.

* subversion/tests/libsvn_wc/entries-compat.c
  (create_open): Update comment.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1440008 13f79535-47bb-0310-9956-ffa450edef68
Resolve incorrect exit code from svnauthz when testing a non-existant url.

* subversion/include/svn_repos.h
  (svn_repos_authz_read2): Improve the documentation to be clear that
    SVN_ERR_AUTHZ_INVALID_CONFIG is only returned for validation failures
    and not for missing files.

* subversion/libsvn_repos/authz.c
  (authz_retrieve_config_repo): Never return SVN_AUTHZ_INVALID_CONFIG since
    all of these error paths are not validation errors but some sort of  
    operational error like invalid paths.  Documentation adjusted to match.
  (authz_retrieve_config): This never returns SVN_AUTHZ_INVALID_CONFIG,
    documentation adjusted to reflect this.

* subversion/tests/cmdline/svnauthz_tests.py
  (svnauthz_validate_repo_test, svnauthz_compat_mode_repo_test): Adjust
    the expected return code for the two tests that test non-existant urls.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1440023 13f79535-47bb-0310-9956-ffa450edef68
* build/win32/make_dist.py
  (_disttree): Add svnauthz-validate.* back to the distributed files, to
    provide the compat mode.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1440030 13f79535-47bb-0310-9956-ffa450edef68
When the merge code detects and installs a tree conflict, the single file
merge notification handling shouldn't tell that we just skipped the file.

* subversion/libsvn_client/merge.c
  (single_file_merge_notify): Don't accidentally overwrite a tree conflict.

* subversion/tests/cmdline/merge_tests.py
  (merge_target_selection): Update expected result.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1440037 13f79535-47bb-0310-9956-ffa450edef68
* subversion/include/private/svn_sqlite.h
  (svn_sqlite__bindf): Fix doc string.

git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1440046 13f79535-47bb-0310-9956-ffa450edef68
Fix test failures after r1440023.

* subversion/tests/libsvn_repos/repos-test.c
  (in_repo_authz, in_repo_groups_authz): Expect SVN_ERR_ILLEGAL_TARGET
    for non-existant paths in the repo.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1440047 13f79535-47bb-0310-9956-ffa450edef68
Further tweaks of the merge notification handling towards handling it from the
merge code itself.


* subversion/libsvn_client/merge.c
  (merge_cmd_baton_t): New variable with the current merge range.
  (record_skip): Reinstate the no-skip for record only merges.
  (merge_file_changed): Record property only changes as a node change.
  (record_operative_merge_action): Handle merge headers for single file
    merges.
  (single_file_merge_notify): Disable code when using merge notifications.
    Remove code that was duplicated here.
  (do_file_merge): Don't call single_file_merge_notify when using merge
    notifications as the merge will handle this itself.

* subversion/tests/cmdline/merge_tests.py
  (expected_output): Expect that a tree conflict is not a functional merge.


git-svn-id: https://svn.apache.org/repos/asf/subversion/trunk@1440058 13f79535-47bb-0310-9956-ffa450edef68
* subversion/include/private/svn_sqlite.h
  (svn_sqlite__column_blob, svn_sqlite__column_text): Document more precisely
    when the result is valid if the pool is NULL.
  (svn_sqlite__column_properties, svn_sqlite__column_iprops): Tweak doc
    string wording.

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