Checkout Tools
  • last updated 2 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates

Changeset 1660425 is being indexed.

Commit a disabled simple hack to apply some verifications at the time we close

a wc.db file. This code identified some ACTUAL cleanup problems.

No functional changes (unless VERIFY_ON_CLOSE is defined in maintainer mode)

* subversion/libsvn_wc/wc-checks.sql

(STMT_STATIC_VERIFY): New statement.

* subversion/libsvn_wc/wc_db_wcroot.c

(includes): Add svn_pools.h

(VERIFY_ON_CLOSE): Document undefined macro.

(verify_sqlite): New function, disabled by VERIFY_ON_CLOSE.

(close_wcroot): Call verify_sqlite if defined, and when

SVN_CMDLINE_VERIFY_SQL_AT_CLOSE is set.

  1. … 1 more file in changeset.
Following the availability of apr_hash_this_key() etc. in APR v1.5, use

these in Subversion code instead of svn__apr_hash_index_key() etc. Provide

substitutes only when APR is too old to provide them.

* subversion/include/svn_types.h,

subversion/libsvn_subr/iter.c

(svn__apr_hash_index_key,

svn__apr_hash_index_klen,

svn__apr_hash_index_val):

Rename to apr_hash_this_key, apr_hash_this_key_len, apr_hash_this_val.

Declare and define them only if APR is older than 1.5.

Everywhere else: track the renames.

  1. … 102 more files in changeset.
Allow clients to configure the working copy SQLite busy

timeout, this can be useful when exclusive locking is

enabled.

* subversion/include/private/svn_sqlite.h

(svn_sqlite__open): Add timeout parameter.

* subversion/include/svn_config.h

(SVN_CONFIG_OPTION_SQLITE_TIMEOUT): New.

* subversion/libsvn_subr/config_file.c

(svn_config_ensure): Describe new config option.

* subversion/libsvn_subr/sqlite.c

(internal_open, svn_sqlite__open): Add timeout parameter.

(svn_sqlite__hotcopy): Pass default timeout.

* subversion/libsvn_wc/wc_db_private.h

(struct svn_wc__db_t): Add timeout member.

(svn_wc__db_util_open_db): Add timeout parameter.

* subversion/libsvn_wc/wc_db_util.c

(svn_wc__db_util_open_db): Add timeout parameter.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_open): Get timeout from config.

(svn_wc__db_wcroot_parse_local_abspath): Pass timeout.

* subversion/libsvn_wc/wc_db.c

(create_db): Add timeout parameter.

(svn_wc__db_init, svn_wc__db_upgrade_begin,

svn_wc__db_bump_format): Pass default timeout.

* subversion/libsvn_fs_fs/rep-cache.c

* subversion/libsvn_fs_x/rep-cache.c

(open_rep_cache): Pass default timeout.

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

(open_db): Pass default timeout.

* subversion/tests/libsvn_wc/op-depth-test.c

(open_wc_db): Pass default timeout.

* subversion/tests/libsvn_wc/utils.c

(svn_test__create_fake_wc): Pass default timeout.

  1. … 12 more files in changeset.
Revert r1508225, which moved the include of svn_private_config.h before all

includes of our public headers. Public headers shouldn't depend on private

headers and all changes that required this are long reverted on trunk.

This patch excludes all conflicting cases.

* subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c

* subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c

* subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c

* subversion/libsvn_auth_gnome_keyring/gnome_keyring.c

* subversion/libsvn_client/add.c

* subversion/libsvn_client/cat.c

* subversion/libsvn_client/changelist.c

* subversion/libsvn_client/cleanup.c

* subversion/libsvn_client/commit.c

* subversion/libsvn_client/commit_util.c

* subversion/libsvn_client/copy.c

* subversion/libsvn_client/copy_foreign.c

* subversion/libsvn_client/ctx.c

* subversion/libsvn_client/delete.c

* subversion/libsvn_client/deprecated.c

* subversion/libsvn_client/diff.c

* subversion/libsvn_client/diff_local.c

* subversion/libsvn_client/diff_summarize.c

* subversion/libsvn_client/export.c

* subversion/libsvn_client/externals.c

* subversion/libsvn_client/import.c

* subversion/libsvn_client/info.c

* subversion/libsvn_client/iprops.c

* subversion/libsvn_client/list.c

* subversion/libsvn_client/locking_commands.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/merge.c

* subversion/libsvn_client/mergeinfo.c

* subversion/libsvn_client/patch.c

* subversion/libsvn_client/prop_commands.c

* subversion/libsvn_client/ra.c

* subversion/libsvn_client/repos_diff.c

* subversion/libsvn_client/resolved.c

* subversion/libsvn_client/revert.c

* subversion/libsvn_client/switch.c

* subversion/libsvn_client/update.c

* subversion/libsvn_client/util.c

* subversion/libsvn_delta/compat.c

* subversion/libsvn_delta/xdelta.c

* subversion/libsvn_diff/parse-diff.c

* subversion/libsvn_diff/util.c

* subversion/libsvn_fs/access.c

* subversion/libsvn_fs_base/bdb/changes-table.c

* subversion/libsvn_fs_base/bdb/env.c

* subversion/libsvn_fs_base/dag.c

* subversion/libsvn_fs_base/fs.c

* subversion/libsvn_fs_base/lock.c

* subversion/libsvn_fs_base/revs-txns.c

* subversion/libsvn_fs_base/tree.c

* subversion/libsvn_fs_fs/caching.c

* subversion/libsvn_fs_fs/lock.c

* subversion/libsvn_fs_fs/temp_serializer.c

* subversion/libsvn_fs_fs/tree.c

* subversion/libsvn_ra/compat.c

* subversion/libsvn_ra/deprecated.c

* subversion/libsvn_ra/ra_loader.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_ra_serf/blame.c

* subversion/libsvn_ra_serf/blncache.c

* subversion/libsvn_ra_serf/commit.c

* subversion/libsvn_ra_serf/getlocations.c

* subversion/libsvn_ra_serf/getlocationsegments.c

* subversion/libsvn_ra_serf/getlocks.c

* subversion/libsvn_ra_serf/inherited_props.c

* subversion/libsvn_ra_serf/log.c

* subversion/libsvn_ra_serf/merge.c

* subversion/libsvn_ra_serf/mergeinfo.c

* subversion/libsvn_ra_serf/options.c

* subversion/libsvn_ra_serf/property.c

* subversion/libsvn_ra_serf/replay.c

* subversion/libsvn_ra_serf/serf.c

* subversion/libsvn_ra_serf/update.c

* subversion/libsvn_ra_serf/util.c

* subversion/libsvn_ra_serf/xml.c

* subversion/libsvn_ra_svn/client.c

* subversion/libsvn_ra_svn/editorp.c

* subversion/libsvn_ra_svn/marshal.c

* subversion/libsvn_repos/authz.c

* subversion/libsvn_repos/commit.c

* subversion/libsvn_repos/delta.c

* subversion/libsvn_repos/deprecated.c

* subversion/libsvn_repos/fs-wrap.c

* subversion/libsvn_repos/hooks.c

* subversion/libsvn_repos/log.c

* subversion/libsvn_repos/replay.c

* subversion/libsvn_repos/reporter.c

* subversion/libsvn_repos/repos.c

* subversion/libsvn_repos/rev_hunt.c

* subversion/libsvn_subr/auth.c

* subversion/libsvn_subr/cmdline.c

* subversion/libsvn_subr/compat.c

* subversion/libsvn_subr/config.c

* subversion/libsvn_subr/config_auth.c

* subversion/libsvn_subr/deprecated.c

* subversion/libsvn_subr/dso.c

* subversion/libsvn_subr/hash.c

* subversion/libsvn_subr/io.c

* subversion/libsvn_subr/mergeinfo.c

* subversion/libsvn_subr/opt.c

* subversion/libsvn_subr/properties.c

* subversion/libsvn_subr/simple_providers.c

* subversion/libsvn_subr/sorts.c

* subversion/libsvn_subr/ssl_client_cert_providers.c

* subversion/libsvn_subr/ssl_client_cert_pw_providers.c

* subversion/libsvn_subr/ssl_server_trust_providers.c

* subversion/libsvn_subr/subst.c

* subversion/libsvn_subr/types.c

* subversion/libsvn_subr/username_providers.c

* subversion/libsvn_subr/utf.c

* subversion/libsvn_subr/win32_crypto.c

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/adm_files.c

* subversion/libsvn_wc/conflicts.c

* subversion/libsvn_wc/copy.c

* subversion/libsvn_wc/deprecated.c

* subversion/libsvn_wc/diff_editor.c

* subversion/libsvn_wc/diff_local.c

* subversion/libsvn_wc/entries.c

* subversion/libsvn_wc/externals.c

* subversion/libsvn_wc/info.c

* subversion/libsvn_wc/lock.c

* subversion/libsvn_wc/node.c

* subversion/libsvn_wc/old-and-busted.c

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/revert.c

* subversion/libsvn_wc/status.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/upgrade.c

* subversion/libsvn_wc/wc_db_update_move.c

* subversion/libsvn_wc/wc_db_wcroot.c

* subversion/mod_dav_svn/repos.c

* subversion/mod_dav_svn/version.c

* subversion/svn/cl-conflicts.c

* subversion/svn/commit-cmd.c

* subversion/svn/conflict-callbacks.c

* subversion/svn/diff-cmd.c

* subversion/svn/help-cmd.c

* subversion/svn/notify.c

* subversion/svn/propedit-cmd.c

* subversion/svn/propget-cmd.c

* subversion/svn/props.c

* subversion/svn/status-cmd.c

* subversion/svn/status.c

* subversion/svn/svn.c

* subversion/svn/util.c

* subversion/svnadmin/svnadmin.c

* subversion/svnlook/svnlook.c

* subversion/svnrdump/dump_editor.c

* subversion/svnrdump/svnrdump.c

* subversion/svnrdump/util.c

* subversion/svnserve/serve.c

* subversion/svnsync/svnsync.c

* subversion/svnsync/sync.c

* subversion/tests/libsvn_fs/fs-test.c

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

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

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

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

* subversion/tests/libsvn_wc/conflict-data-test.c

* subversion/tests/libsvn_wc/op-depth-test.c

* subversion/tests/libsvn_wc/wc-test.c

* subversion/tests/svn_test_fs.c

* tools/server-side/fsfs-stats.c

Move the svn_string_private.h include back to the original location.

  1. … 162 more files in changeset.
Make upgrade_tests.py:upgrade_1_7_dir_external PASS with exclusive

working copy locking.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): Don't abandon an open sdb.

Fix the #include order such that svn_private_config.h is always

included first before any other svn header - if we also include

svn_hash.h.

* subversion/bindings/javahl/native/org_apache_subversion_javahl_ConfigImpl_Category.cpp,

subversion/bindings/swig/perl/libsvn_swig_perl/swigutil_pl.c,

subversion/bindings/swig/python/libsvn_swig_py/swigutil_py.c,

subversion/bindings/swig/ruby/libsvn_swig_ruby/swigutil_rb.c,

subversion/libsvn_auth_gnome_keyring/gnome_keyring.c,

subversion/libsvn_client/add.c,

subversion/libsvn_client/cat.c,

subversion/libsvn_client/changelist.c,

subversion/libsvn_client/cleanup.c,

subversion/libsvn_client/commit.c,

subversion/libsvn_client/commit_util.c,

subversion/libsvn_client/copy.c,

subversion/libsvn_client/copy_foreign.c,

subversion/libsvn_client/ctx.c,

subversion/libsvn_client/delete.c,

subversion/libsvn_client/deprecated.c,

subversion/libsvn_client/diff.c,

subversion/libsvn_client/diff_local.c,

subversion/libsvn_client/diff_summarize.c,

subversion/libsvn_client/export.c,

subversion/libsvn_client/externals.c,

subversion/libsvn_client/import.c,

subversion/libsvn_client/info.c,

subversion/libsvn_client/iprops.c,

subversion/libsvn_client/list.c,

subversion/libsvn_client/locking_commands.c,

subversion/libsvn_client/log.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/mergeinfo.c,

subversion/libsvn_client/patch.c,

subversion/libsvn_client/prop_commands.c,

subversion/libsvn_client/ra.c,

subversion/libsvn_client/repos_diff.c,

subversion/libsvn_client/resolved.c,

subversion/libsvn_client/revert.c,

subversion/libsvn_client/status.c,

subversion/libsvn_client/switch.c,

subversion/libsvn_client/update.c,

subversion/libsvn_client/util.c,

subversion/libsvn_delta/compat.c,

subversion/libsvn_delta/xdelta.c,

subversion/libsvn_diff/parse-diff.c,

subversion/libsvn_diff/util.c,

subversion/libsvn_fs/access.c,

subversion/libsvn_fs_base/bdb/changes-table.c,

subversion/libsvn_fs_base/bdb/env.c,

subversion/libsvn_fs_base/dag.c,

subversion/libsvn_fs_base/fs.c,

subversion/libsvn_fs_base/lock.c,

subversion/libsvn_fs_base/revs-txns.c,

subversion/libsvn_fs_base/tree.c,

subversion/libsvn_fs_fs/caching.c,

subversion/libsvn_fs_fs/fs_fs.c,

subversion/libsvn_fs/fs-loader.c,

subversion/libsvn_fs_fs/lock.c,

subversion/libsvn_fs_fs/temp_serializer.c,

subversion/libsvn_fs_fs/tree.c,

subversion/libsvn_fs_util/fs-util.c,

subversion/libsvn_ra/compat.c,

subversion/libsvn_ra/deprecated.c,

subversion/libsvn_ra_local/ra_plugin.c,

subversion/libsvn_ra/ra_loader.c,

subversion/libsvn_ra_serf/blame.c,

subversion/libsvn_ra_serf/blncache.c,

subversion/libsvn_ra_serf/commit.c,

subversion/libsvn_ra_serf/getlocations.c,

subversion/libsvn_ra_serf/getlocationsegments.c,

subversion/libsvn_ra_serf/getlocks.c,

subversion/libsvn_ra_serf/inherited_props.c,

subversion/libsvn_ra_serf/log.c,

subversion/libsvn_ra_serf/merge.c,

subversion/libsvn_ra_serf/mergeinfo.c,

subversion/libsvn_ra_serf/options.c,

subversion/libsvn_ra_serf/property.c,

subversion/libsvn_ra_serf/replay.c,

subversion/libsvn_ra_serf/serf.c,

subversion/libsvn_ra_serf/update.c,

subversion/libsvn_ra_serf/util.c,

subversion/libsvn_ra_serf/xml.c,

subversion/libsvn_ra_svn/client.c,

subversion/libsvn_ra_svn/editorp.c,

subversion/libsvn_ra_svn/marshal.c,

subversion/libsvn_repos/authz.c,

subversion/libsvn_repos/commit.c,

subversion/libsvn_repos/delta.c,

subversion/libsvn_repos/deprecated.c,

subversion/libsvn_repos/fs-wrap.c,

subversion/libsvn_repos/hooks.c,

subversion/libsvn_repos/log.c,

subversion/libsvn_repos/replay.c,

subversion/libsvn_repos/reporter.c,

subversion/libsvn_repos/repos.c,

subversion/libsvn_repos/rev_hunt.c,

subversion/libsvn_subr/auth.c,

subversion/libsvn_subr/cmdline.c,

subversion/libsvn_subr/compat.c,

subversion/libsvn_subr/config_auth.c,

subversion/libsvn_subr/config.c,

subversion/libsvn_subr/deprecated.c,

subversion/libsvn_subr/dso.c,

subversion/libsvn_subr/hash.c,

subversion/libsvn_subr/io.c,

subversion/libsvn_subr/mergeinfo.c,

subversion/libsvn_subr/opt.c,

subversion/libsvn_subr/properties.c,

subversion/libsvn_subr/simple_providers.c,

subversion/libsvn_subr/sorts.c,

subversion/libsvn_subr/ssl_client_cert_providers.c,

subversion/libsvn_subr/ssl_client_cert_pw_providers.c,

subversion/libsvn_subr/ssl_server_trust_providers.c,

subversion/libsvn_subr/subst.c,

subversion/libsvn_subr/types.c,

subversion/libsvn_subr/username_providers.c,

subversion/libsvn_subr/utf.c,

subversion/libsvn_subr/win32_crypto.c,

subversion/libsvn_wc/adm_crawler.c,

subversion/libsvn_wc/adm_files.c,

subversion/libsvn_wc/adm_ops.c,

subversion/libsvn_wc/conflicts.c,

subversion/libsvn_wc/copy.c,

subversion/libsvn_wc/deprecated.c,

subversion/libsvn_wc/diff_editor.c,

subversion/libsvn_wc/diff_local.c,

subversion/libsvn_wc/entries.c,

subversion/libsvn_wc/externals.c,

subversion/libsvn_wc/info.c,

subversion/libsvn_wc/lock.c,

subversion/libsvn_wc/node.c,

subversion/libsvn_wc/old-and-busted.c,

subversion/libsvn_wc/props.c,

subversion/libsvn_wc/revert.c,

subversion/libsvn_wc/status.c,

subversion/libsvn_wc/translate.c,

subversion/libsvn_wc/update_editor.c,

subversion/libsvn_wc/upgrade.c,

subversion/libsvn_wc/wc_db.c,

subversion/libsvn_wc/wc_db_update_move.c,

subversion/libsvn_wc/wc_db_wcroot.c,

subversion/libsvn_wc/workqueue.c,

subversion/mod_dav_svn/activity.c,

subversion/mod_dav_svn/deadprops.c,

subversion/mod_dav_svn/lock.c,

subversion/mod_dav_svn/merge.c,

subversion/mod_dav_svn/mod_dav_svn.c,

subversion/mod_dav_svn/reports/update.c,

subversion/mod_dav_svn/repos.c,

subversion/mod_dav_svn/version.c,

subversion/svnadmin/svnadmin.c,

subversion/svnauth/svnauth.c,

subversion/svn/cl-conflicts.c,

subversion/svn/commit-cmd.c,

subversion/svn/conflict-callbacks.c,

subversion/svn/diff-cmd.c,

subversion/svn/help-cmd.c,

subversion/svnlook/svnlook.c,

subversion/svnmucc/svnmucc.c,

subversion/svn/notify.c,

subversion/svn/propedit-cmd.c,

subversion/svn/propget-cmd.c,

subversion/svn/props.c,

subversion/svnrdump/dump_editor.c,

subversion/svnrdump/svnrdump.c,

subversion/svnrdump/util.c,

subversion/svnserve/serve.c,

subversion/svn/status.c,

subversion/svn/status-cmd.c,

subversion/svn/svn.c,

subversion/svnsync/svnsync.c,

subversion/svnsync/sync.c,

subversion/svn/util.c,

subversion/tests/libsvn_fs/fs-test.c,

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

subversion/tests/libsvn_subr/hashdump-test.c,

subversion/tests/libsvn_subr/mergeinfo-test.c,

subversion/tests/libsvn_subr/subst_translate-test.c,

subversion/tests/libsvn_wc/conflict-data-test.c,

subversion/tests/libsvn_wc/op-depth-test.c,

subversion/tests/libsvn_wc/wc-test.c,

subversion/tests/svn_test_fs.c,

tools/dev/fsfs-reorg.c,

tools/server-side/fsfs-stats.c): #include svn_private_config.h first

  1. … 180 more files in changeset.
Fix issue #4390, "parallel nested checkout not possible with wc-ng".

Change the meaning of the enforce_empty_wq flag in svn_wc__db_t such

that the flag is checked only when the DB is locked for writing,

rather than when the DB is merely opened. This allows nested checkouts

to proceed in parallel to enclosing checkouts, and should also fix some

other issues for multi-process clients (according to Bert).

Suggested by: rhuijben

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_init, svn_wc__db_upgrade_begin): Update callers of

svn_wc__db_pdh_create_wcroot().

(svn_wc__db_wclock_obtain): Verify that no work items are queued up

if db->enforce_empty_wq is set.

* subversion/libsvn_wc/wc_db_private.h

(svn_wc__db_t): Adjust documentation of enforce_empty_wq.

(svn_wc__db_pdh_create_wcroot): Remove enforce_empty_wq parameter.

(svn_wc__db_verify_no_work): Declare.

* subversion/libsvn_wc/wc_db_wcroot.c

(verify_no_work): Rename to ...

(svn_wc__db_verify_no_work): ... this and make this function re-usable

within libsvn_wc.

(svn_wc__db_pdh_create_wcroot): Remove enforce_empty_wq parameter, and

ignore that flag for the purpose of checking for empty work queue items.

As before, this function still checks the work queue during upgrades.

(svn_wc__db_wcroot_parse_local_abspath: Update caller of

svn_wc__db_pdh_create_wcroot().

* subversion/tests/cmdline/wc_tests.py

(checkout_within_locked_wc): Adjust expected output and remove XFail marker.

  1. … 3 more files in changeset.
Follow-up to r1496007:

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): If a WCROOT was discovered via a

symlink, cache it only under the symlink path, not under both the symlink

path and the symlink target path. This function is supposed to maintain

a 1:1 mapping between WCROOT objects and paths.

Suggested by: rhuijben

Fix issue #4383, "Subversion 1.8.0 crash when WC path is symlink (regression)".

In 1.7, if a working copy root was found through a symlink, WCROOT->abspath

was set to the symlink itself, rather than the target of the symlink.

In 1.8.0, WCROOT->abspath is set to the symlink target instead.

It turns out that at least one caller relies on the 1.7 behaviour.

It computes relative paths within the working copy like this:

local_relpath = svn_dirent_skip_ancestor(wcroot->abspath, local_abspath);

and blindly uses the returned value as a path. If local_abspath is not a

child of wcroot->abspath, the skip_ancestor() function returns NULL.

So 1.8.0 ended up crashing with a NULL deref when updating working copies

through symlinks.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): Restore 1.7 behaviour from the

caller's point of view. When a working copy root is found through a

symlink, ensure that WCROOT->ABSPATH is set to the symlink itself,

rather than its target.

* subversion/tests/cmdline/wc_tests.py

(update_through_unversioned_symlink): New test. Without the above fix,

this test fails with a crash when exclusive WC locking is disabled, and

fails with an SQLITE_BUSY error when exclusive WC locking is enabled.

Reported by: Lev Serebryakov <lev@FreeBSD.org>

  1. … 1 more file in changeset.
* **/**

Run tools/dev/remove-trailing-whitespace.sh to remove all trailing whitespace

before we branch 1.8, like we did before creating previous branches.

No functional changes.

  1. … 199 more files in changeset.
Don't error out with "svn: E200030: sqlite: no such table: nodes"

when opening old working copies and if compiled with SVN_DEBUG.

Instead, print a message advising an upgrade.

I found this problem while trying to use a format 18 WC with a trunk client.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): Verification triggers don't

install properly with old WC format databases, so ignore sqlite errors

while installing the triggers. Allows old working copies in 1.7-dev

format to be upgraded to format 29 (at which point there is yet another

problem which I'll investigate next).

Use svn_hash_gets and svn_hash_puts.

* subversion/libsvn_wc/adm_crawler.c

* subversion/libsvn_wc/adm_ops.c

* subversion/libsvn_wc/conflicts.c

* subversion/libsvn_wc/copy.c

* subversion/libsvn_wc/deprecated.c

* subversion/libsvn_wc/diff_local.c

* subversion/libsvn_wc/entries.c

* subversion/libsvn_wc/externals.c

* subversion/libsvn_wc/info.c

* subversion/libsvn_wc/old-and-busted.c

* subversion/libsvn_wc/props.c

* subversion/libsvn_wc/revert.c

* subversion/libsvn_wc/status.c

* subversion/libsvn_wc/translate.c

* subversion/libsvn_wc/update_editor.c

* subversion/libsvn_wc/upgrade.c

* subversion/libsvn_wc/wc_db.c

* subversion/libsvn_wc/wc_db_update_move.c

* subversion/libsvn_wc/wc_db_wcroot.c

* subversion/libsvn_wc/workqueue.c

  1. … 19 more files in changeset.
Merge svn_kind_t into svn_node_kind_t, leaving only one public enumeration

that describes node kinds.

* subversion/include/svn_types.h (svn_kind_t): Removed.

All uses of svn_kind_t were replaced with svn_node_kind_t.

(svn_node_kind_t): New enumeration constant, svn_node_symlink.

Replaces all previous uses of svn_kind_symlink.

(svn__node_kind_from_kind): Removed. All call sites updated.

(svn__kind_from_node_kind): Removed. All call sites updated.

* subversion/libsvn_wc/tree_conflicts.c (node_kind_map):

Added comment about incompatible representation of svn_node_unknown.

* subversion/libsvn_wc/node.c (convert_db_kind_to_node_kind):

May be redundant, and comment is out of date. Added a note about that.

There are also a zillion changes in dependent files, and they all result

from the following renames:

svn_kind_t to svn_node_kind_t

svn_kind_none to svn_node_none

svn_kind_file to svn_node_file

svn_kind_dir to svn_node_dir

svn_kind_unknown to svn_node_unknown

svn_kind_symlink to svn_node_symlink

  1. … 65 more files in changeset.
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.

  1. … 6 more files in changeset.
* subversion/libsvn_wc/wc_db_wcroot.c

(try_symlink_as_dir): Don't bother clearing an error known to be SUCCESS.

Fix issue #4118 (wrong error message if wc.db is missing, or SQL error).

* subversion/libsvn_wc/wc_db_wcroot.c (svn_wc__db_wcroot_parse_local_abspath):

Handle several cases where we could not find a valid .svn/wc.db, but

.svn/entries is also obviously not valid for a pre-wc-ng working copy.

* subversion/tests/cmdline/wc_tests.py

(status_with_various_degrees_of_broken_wc): New test case for the

failure modes detected by this change.

  1. … 1 more file in changeset.
Fix issue 4091, symlink-ness change causes spurious tree-conflict.

* subversion/libsvn_wc/update_editor.c

(close_file): Only flag symlink-ness conflict if locally modified.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): Only close db if really opened.

* subversion/tests/cmdline/special_tests.py

(replace_symlinks): Deepcopy the r2 status for later use, remove XFAIL.

  1. … 2 more files in changeset.
* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): If a working copy that requires an

upgrade is found when traversing upwards from a symlink, try to find a

supported working copy where the symlink points to instead.

Fixes the following tests when run within a 1.7 WC:

special_tests.py 19: operate on symlink to wc

special_tests.py 20: svnversion on symlink to wc

Disable automatic working copy upgrades. This has been discussed over and

over, with many people in the community indicating they prefer manual upgrades.

For now, this is a hard-coded default. There is no way to enable auto-upgrade.

And unfortunately there is no single knob to globally switch auto-upgrade on

and off in the code. Rather, function parameters have to be tweaked in various

places where a working copy database is opened.

Some parts of the upgrade code were written and tested exclusively for

upgrading from 1.6 and earlier working copy formats to wc-ng, and thus

needed small fixes to allow 'svn upgrade' to run wc-ng -> wn-ng format

bumps without crashing.

* subversion/libsvn_wc/adm_files.c

(svn_wc_create_tmp_file2): Don't auto-upgrade working copies.

* subversion/libsvn_wc/adm_ops.c

(svn_wc_get_pristine_copy_path): Don't auto-upgrade working copies.

* subversion/libsvn_wc/cleanup.c

(svn_wc_cleanup3): Don't auto-upgrade working copies.

* subversion/libsvn_wc/context.c

(svn_wc_context_create): Don't auto-upgrade working copies.

* subversion/libsvn_wc/lock.c

(pool_cleanup_locked, svn_wc_adm_open3, svn_wc_adm_probe_open3,

open_anchor): Don't auto-upgrade working copies.

* subversion/libsvn_wc/upgrade.c

(svn_wc__upgrade_sdb): Initialise *result_format before use if the

working copy is already at format SVN_WC__VERSION to prevent an assertion

during no-op upgrades of wc-ng working copies.

(is_old_wcroot): Remove Subversion version numbers from error messages.

It is now misleading to say that an upgrade is not possible because a

pre-1.7 working copy was found since 'svn upgrade' now runs on any format.

(svn_wc_upgrade): Handle upgrades from wc-ng-style working copies.

Enable auto-upgrade of the db during upgrades from pre-1.7 WCs to avoid

'svn upgrade' advising users to run 'svn upgrade'.

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_bump_format): New helper function for wc-ng -> wc-ng upgrades.

Ensures that the upgrade target is a working copy root, and performs a

format bump of wcroot->sdb, which isn't exposed outside of the wc_db layer.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_bump_format): Declare.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_pdh_create_wcroot): Properly handle the case where we do not

auto-upgrade and run into a working copy using an older format.

Previously, we ended up asserting in VERIFY_USABLE_WCROOT() somewhere

because no upgrade happened but no error was returned either. Instead,

return an error advising the user to upgrade the working copy.

* subversion/tests/cmdline/upgrade_tests.py

(wc_is_too_old_regex): The error message matched by this regex has changed

in some cases, so adjust the regex accordingly.

(basic_upgrade): Expect slightly different error messages resulting from

above changes. The error code returned is unchanged, however.

(upgrade_tree_conflict_data, upgrade_from_format_28): These tests were

running 'svn status' and 'svn info' to trigger auto-upgrades. Make them

run 'svn upgrade' instead to keep them passing.

  1. … 9 more files in changeset.
Enable SQLite exclusive locking for the command line client as this is

a major performance gain for working copies on network disks. The

libraries default to shared locking for backward compatibility, the

command line client defaults to exclusive locking and a config setting

allows the user to override the command line client.

Addresses issue 4176.

* subversion/libsvn_wc/wc-queries.sql

(STMT_PRAGA_LOCKING_MODE): New.

* subversion/libsvn_wc/wc_db.c

(create_db): Add exclusive parameter.

(svn_wc__db_init): Get exclusive setting from config.

(svn_wc__db_upgrade_begin): Use exclusive locking.

* subversion/libsvn_wc/wc_db_private.h

(struct svn_wc__db_t): Make config non-const.

(svn_wc__db_util_open_db): Add exclusive parameter.

* subversion/libsvn_wc/wc_db_util.c

(svn_wc__db_util_open_db): Add exclusive parameter.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_open): Make config parameter non-const.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_open): Make config parameter non-const.

(svn_wc__db_wcroot_parse_local_abspath): Get exclusive setting from

config, close unused SQLite handle when following a symlink.

* subversion/include/svn_client.h

(svn_client_create_context2): New.

(svn_client_create_context): Deprecate.

* subversion/libsvn_client/ctx.c

(svn_client_create_context2): Add config hash parameter, pass config

to WC context.

(svn_client_create_context): Call new version.

* subversion/include/svn_config.h

(SVN_CONFIG_SECTION_WORKING_COPY,

SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE): New.

* subversion/libsvn_subr/config_file.c

(svn_config_ensure): Add [working-copy] section.

* subversion/svn/main.c

(sub_main): Get config hash earlier, pass to client context, set

exclusive locking if client does not already set it, move log

message checking later.

* subversion/tests/libsvn_wc/utils.c

(svn_test__create_fake_wc): Use shared locking.

* subversion/tests/libsvn_wc/op-depth-test.c

(open_wc_db): Use shared locking.

  1. … 12 more files in changeset.
* subversion/libsvn_wc/wc_db_wcroot.c

(read_link_target): Error out on symlinks that point nowhere. Just in case.

* subversion/libsvn_wc/wc_db_wcroot.c

(read_link_target): Minor code simplification, no functional change.

Fix adding symlinks pointing at working copy roots to version control,

which had been broken since r1395027.

Fixes special_tests 23, "externals as symlink targets", which adds

a symlink pointing at an external. This test failed because the

symlink path itself was cached as WC root when adding the symlink

to the external's parent WC. The code then tried a propset on the

symlink path to set the svn:special prop and was redirected at the

external working copy which it didn't have a lock for.

We can fix this by never caching a symlink itself as a WC root but

caching the directory the symlink points to as a WC root instead.

* subversion/libsvn_wc/wc_db_wcroot.c

(read_link_target): New helper function to calculate the absolute path

of a symlink target.

(svn_wc__db_wcroot_parse_local_abspath): When retrying the scan through a

symlink, resolve the symlink and scan up from the link target, rather

than treating the symlink itself as a directory. If the symlink points

at a WC root, this prevents the symlink itself from being added to the

WC root cache -- the cache should only contain directories anyway.

* subversion/tests/cmdline/special_tests.py

(symlink_to_wc_basic): When operating on a WC through a symlink, we'll

now see the resolved symlink target path as Working Copy Root path

in 'svn info' output. Adjust test expectations accordingly. This test

was expecting to see the symlink itself as WC root path.

  1. … 1 more file in changeset.
Fix working copy access via a symlink which points to a working copy nested

within an unrelated working copy of an unsupported format.

This patch fixes special_tests 19 and 20 on the 1.7.x branch when run

within a format 30 working copy (backport nomination will follow).

To reproduce the problem fixed by this commit with just a trunk client:

- Check out a working copy WC1.

- Check out one nested working copy WC2 within WC1's root dir.

- Use sqlite3 to set "pragma user_version = 31" in WC1's .svn/wc.db.

- Create a symlink S within WC1 which points at WC2.

- Try to run 'svn status' on the symlink S.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): If we find an unsupported working

copy after traversing upwards from a symlink, and the symlink points to

a directory, try to find a working copy at that directory instead.

Stat for ".svn" before statting ".svn/wc.db" and ".svn/entries" for an uncached

directory in a working copy. For any directory except the working copy root

this will return that this directory does not exist and avoid the two further

stats.

This reduces the time to run svn status on the root of my semi-network working

copy with Subversion trunk, branches: 1.5.x, 1.6.x and 1.7.x by about 20-30%.

(semi network = VM to host system using network protocols over virtual NIC)

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): Use a filestat on ".svn" to avoid

further filestats.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): Revert r1340535.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): The fact that we found a symlink

doesn't undo that we might have moved upwards before, so don't reset

this variable that would make us perform additional stats for entries

files.

Purge trailing whitespace, in the spirit of r1138109.

  1. … 97 more files in changeset.
* subversion/libsvn_wc/wc_db_wcroot.c

(get_path_kind): Remove obsolete information in comment.

* subversion/libsvn_wc/wc_db_wcroot.c

(svn_wc__db_wcroot_parse_local_abspath): Following up on r1245935, allow a

few more errors to indicate that a node is unversioned.