Checkout Tools
  • last updated a few seconds ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Revert the libsvn_client part of r1710215, leaving the JNI part. This

means JavaHL still accepts relpaths and non-canonical paths while

libsvn_client requires canonical abspaths.

* subversion/include/svn_client.h

(svn_client_vacuum, svn_client_cleanup2): Rename parameter.

* subversion/libsvn_client/cleanup.c

(svn_client_vacuum, svn_client_cleanup2): Rename parameter, assert

abspath.

  1. … 1 more file in changeset.
Allow svn_client_vacuum and svn_client_cleanup2 to accept non-absolute

paths and convert to absolute, rather than asserting that the passed

paths are absolute. This makes the functions behave like other client

functions.

* subversion/include/svn_client.h

(svn_client_vacuum, svn_client_cleanup2): Rename parameter.

* subversion/libsvn_client/cleanup.c

(svn_client_vacuum, svn_client_cleanup2): Rename parameter, convert

to abspath.

* subversion/bindings/javahl/native/SVNClient.cpp

(SVNClient::vacuum): Add Path checking to parameter.

[libsvn_client part reverted in r1710290.]

  1. … 2 more files in changeset.
When calling ctx->notify_func2 always use the same source style.

* subversion/libsvn_client/cleanup.c

(cleanup_status_walk): Use one style.

* subversion/libsvn_client/commit_util.c

(do_item_commit): Use one style.

* subversion/libsvn_client/copy.c

(repos_to_wc_copy_single): Use one style.

* subversion/libsvn_client/export.c

(svn_client_export5): Use one style.

* subversion/libsvn_client/externals.c

(switch_file_external, handle_external_item_removal,

handle_external_item_change): Use one style.

* subversion/libsvn_client/import.c

(import_file, get_filtered_children, import_children,

import_dir): Use one style.

* subversion/libsvn_client/merge.c

(record_skip, record_tree_conflict, record_update_add,

record_update_update, handle_pending_notifications,

mark_dir_edited, mark_file_edited, notify_merge_begin): Use one style.

* subversion/libsvn_client/patch.c

(send_hunk_notification, send_patch_notification): Use one style.

* subversion/libsvn_client/prop_commands.c

(svn_client_revprop_set2): Use one style.

* subversion/libsvn_client/ra.c

(svn_client__open_ra_session_internal): Use one style.

* subversion/libsvn_client/revert.c

(revert): Use one style.

* subversion/libsvn_client/status.c

(svn_client_status6): Use one style.

* subversion/libsvn_client/switch.c

(switch_internal): Use one style.

* subversion/libsvn_client/update.c

(update_internal, svn_client_update4): Use one style.

  1. … 13 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.
Extend the new in 1.9 svn_wc_cleanup4() api with notification support.

This will allow future patches to add some information on where the time

is spent during the cleanup (that used to be +- instant in 1.6).

* subversion/include/svn_wc.h

(svn_wc_cleanup4): Update prototype.

* subversion/libsvn_client/cleanup.c

(do_cleanup): Update caller.

* subversion/libsvn_wc/cleanup.c

(svn_wc_cleanup4): Update prototype.

* subversion/libsvn_wc/deprecated.c

(svn_wc_cleanup3): Update caller.

  1. … 3 more files in changeset.
* subversion/libsvn_client/cleanup.c

(do_cleanup): Following up on r1548088, resolve TODO by obtaining

a write lock around removing files from the wc.

Following up on r1548075, split the new in 1.9 svn_client_cleanup2() api into

two separate functions.

* subversion/include/svn_client.h

(svn_client_vacuum): New function.

(svn_client_cleanup2): Update prototype. Remove vacuum support.

(svn_client_cleanup): Update documentation.

* subversion/libsvn_client/cleanup.c

(cleanup_status_walk_baton): Add more flags.

(do_cleanup): Rely on svn_wc_cleanup4() for locking check when not breaking

locks. Pass and handle flags.

(cleanup_status_walk): Update caller.

(svn_client_cleanup2): Update api.

(svn_client_vacuum): New function.

* subversion/libsvn_client/deprecated.c

(svn_client_cleanup): Update caller.

* subversion/svn/cleanup-cmd.c

(svn_cl__cleanup): Update caller. Choose the right function for the job.

  1. … 3 more files in changeset.
Make it possible to selectively use the cleanup features break locks, fix

timestamps, clear dav cache and vacuum pristines, to allow api users to

use them in a safe way.

Without this patch there is no safe way to use these features as that would

require an external locking agent to verify if no other subversion client

is using the same working copy.

* subversion/include/svn_wc.h

(svn_wc_cleanup4): New function.

* subversion/libsvn_client/cleanup.c

(do_cleanup): Remove hack that works for SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE,

but not for SVN_CONFIG_OPTION_SQLITE_EXCLUSIVE_CLIENTS. This case is now

properly handled by svn_wc_cleanup4().

* subversion/libsvn_wc/cleanup.c

(cleanup_internal): Make several features optional.

(svn_wc_cleanup3): Rename to...

(svn_wc_cleanup4): ... this. Make features optional.

* subversion/libsvn_wc/deprecated.c

(svn_wc_cleanup3): new function.

  1. … 3 more files in changeset.
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.
* subversion/libsvn_client/cleanup.c

(do_cleanup): Indentation fix. No functional change.

Fix a bug with 'svn cleanup --remove-unversioned' where items that do not

match a user-configured global ignores list are not removed, even though

they should be removed.

Found by: danielsh

* subversion/libsvn_client/cleanup.c

(do_cleanup): Unconditionally load the configured global ignores list,

not just if --remove-ignored was passed. And don't bother with loading

ignore patterns for the cleanup target here, since the status walk

will do that for us.

* subversion/tests/cmdline/wc_tests.py

(cleanup_unversioned_items): Extend this test to detect the bug fixed.

  1. … 1 more file in changeset.
* subversion/libsvn_client/cleanup.c

(cleanup_status_walk): Check ctx->notify_func2 for NULL before calling it.

Suggested by: danielsh

* subversion/libsvn_client/cleanup.c

(do_cleanup): Honour user-configured default ignore list, as well as

ignore patterns defined on the cleanup target.

* subversion/include/svn_client.h,

subversion/libsvn_client/cleanup.c:

(svn_client_cleanup2): Rename parameters remove_unversioned_children and

remove_ignored_children to remove_unversioned_items and remove_ignored_items

for consistency with names used within the implementation.

  1. … 1 more file in changeset.
Add support for cleaning up externals via 'svn cleanup --include-externals'.

This should address the feature request from issue #2325.

* subversion/include/svn_client.h

(svn_client_cleanup2): Add include_externals parameter.

* subversion/include/svn_wc.h

(svn_wc_notify_t): New action svn_wc_notify_cleanup_external.

* subversion/libsvn_client/cleanup.c

(remove_unversioned_items_baton): Rename to ...

(cleanup_status_walk_baton): ... this, and replace notify/cancel support

members with a client context member which includes them.

(do_cleanup): New helper function, extracted from svn_client_cleanup2().

(remove_unversioned_items): Rename to ...

(cleanup_status_walk): ... this, and extend to optionally clean up externals

found during the status walk. Adjust for baton changes, too.

(svn_client_cleanup2): New parameter include_externals. Call the do_cleanup()

helper function which replaces most of this function's body.

* subversion/libsvn_client/deprecated.c

(svn_client_cleanup): Account for new parameter to svn_client_cleanup2().

* subversion/svn/cleanup-cmd.c

(svn_cl__cleanup): Pass opt_state->include_externals to svn_client_cleanup2().

* subversion/svn/notify.c

(notify): Handle svn_wc_notify_cleanup_external.

* subversion/svn/svn.c

(svn_cl__cmd_table): Add --include-extenals option to 'svn cleanup'.

* subversion/tests/cmdline/wc_tests.py

(cleanup_dir_external, test_list): New rather simple test.

  1. … 7 more files in changeset.
Follow-up to r1497310, fix 'svn cleanup --remove-unversioned' with sqlite

exclusive locking mode.

* subversion/libsvn_client/cleanup.c

(svn_client_cleanup2): If sqlite exclusive locking is enabled, close the DB

after checking for existing locks. Else, we dead-lock in svn_wc_cleanup3().

Also, don't error out if there is an existing lock owned by our own context,

just reject locks from other contexts.

Forbid 'svn cleanup --remove-unversioned --remove-ignored' if the working

copy is already write-locked. This prevents accidental working copy

corruption in case users routinely run 'svn cleanup' with either of

these options while other Subversion clients are using the working copy.

Also, update and extend the help text of svn cleanup. The previous help text

failed to properly warn users of potentially bad consequences when running

'svn cleanup' in parallel with other operations on the same working copy,

and failed to explain what kind of locks are being removed.

* subversion/include/svn_client.h

(svn_client_cleanup2): Extend docstring.

* subversion/libsvn_client/cleanup.c

(svn_client_cleanup2): If asked to remove unversioned or ignored items,

ensure that the working copy is not already locked via another WC context

before running any cleanup actions that steal write locks.

* subversion/svn/cleanup-cmd.c

(svn_cl__cleanup): Provide a reasonable error message if users try to

remove unversioned or ignored items from a locked working copy.

* subversion/svn/svn.c

(svn_cl__cmd_table): Update and extend 'svn cleanup' help text.

* subversion/tests/cmdline/wc_tests.py

(cleanup_unversioned_items_in_locked_wc, test_list): New test.

  1. … 4 more files in changeset.
Add a new --remove-ignored option to 'svn cleanup', replacing --no-ignore.

Previously, --no-ignore was only valid with --remove-unversioned. The new

--remove-ignored option allows removing ignored items separately from

non-ignored unversioned items.

Suggested by: gstein

* subversion/include/svn_client.h

(svn_client_cleanup2): Rename 'no_ignore' parameter to

'remove_ignored_children'.

* subversion/libsvn_client/cleanup.c

(remove_unversioned_items_baton): Add 'remove_unversioned_items' member.

(remove_unversioned_items): Only remove unversioned items if the

'remove_unversioned_items' is set in the baton.

(svn_client_cleanup2): Account for renamed parameter and new baton member.

Run the delete-items status walk if either unversioned or ignored items

are to be removed, not just for unversioned items.

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add remove_ignored.

* subversion/svn/cleanup-cmd.c

(svn_cl__cleanup): Replace handling of --no-ignore with --remove-ignored.

* subversion/svn/svn.c

(svn_cl__longopt_t): Add opt_remove_ignored.

(svn_cl__options): Add --remove-ignored.

(svn_cl__cmd_table): Adjust 'svn help cleanup' output.

(sub_main): Handle --remove-ignored.

* subversion/tests/cmdline/wc_tests.py

(cleanup_unversioned_items): Replace --no-ignore with --remove-ignored.

  1. … 5 more files in changeset.
* subversion/libsvn_client/cleanup.c

(svn_client_cleanup2): Reduce scope of a local variable. No functional change.

Allow 'svn cleanup' to remove unversioned items from the working copy.

This should address the feature request from issue #3549.

Add two new options to 'svn cleanup', --remove-unversioned and --no-ignore.

The former causes unversioned files and directories to be removed after

successful cleanup. The latter causes ignored items to be removed as well.

One remaining question is what to do with externals. Right now, 'svn cleanup'

never recurses into externals. Should it recurse into externals if the

--remove-unversioned option is given? Should we change it to always recurse

into externals by default? I'm not quite sure.

* subversion/include/svn_client.h

(svn_client_cleanup2): Declare.

(svn_client_cleanup): Deprecate.

* subversion/libsvn_client/cleanup.c

(remove_unversioned_items): New helper function.

(svn_client_cleanup2): Implement as an extension of svn_client_cleanup(),

which can optionally remove unversioned items after all other cleanup

actions, via a status walk.

* subversion/libsvn_client/deprecated.c

(svn_client_cleanup): Implement as a wrapper around svn_client_cleanup2().

* subversion/svn/cl.h

(svn_cl__opt_state_t): Add new 'remove_unversioned' option.

* subversion/svn/cleanup-cmd.c

(svn_cl__cleanup): Run svn_client_cleanup2() to support removal of

unversioned items. Reject --no-ignore option without --remove-unversioned.

* subversion/svn/svn.c

(svn_cl__longopt_t): Add opt_remove_unversioned.

(svn_cl__options): Add --remove-unversioned option.

(svn_cl__cmd_table): Extend help text of 'svn cleanup'.

(sub_main): Handle --remove-unversioned option.

* subversion/tests/cmdline/wc_tests.py

(cleanup_unversioned_items, test_list): New test.

  1. … 6 more files in changeset.
For easier code navigation: separate cleanup from upgrade in libsvn_client.

We decided that after 1.7 explicit upgrades will still be required.

No functional changes, but gen-make required.

* subversion/libsvn_client/cleanup.c

(*): Remove everything upgrade specific.

* subversion/libsvn_client/upgrade.c

(*): Remove everything cleanup specific.

  1. … 1 more file in changeset.
Combine two svn_wc__node_repos_* apis into one. Fix some corner cases in the

remaining function to properly calculate urls on all cases of shadowed nodes.

* subversion/include/private/svn_wc_private.h

(svn_wc__node_get_repos_info): Add arguments. Update documentation.

(svn_wc__node_get_repos_relpath): Remove function.

* subversion/libsvn_client/cleanup.c

(svn_client_upgrade): Update caller.

* subversion/libsvn_client/commit_util.c

(harvest_copy_committables): Update caller.

* subversion/libsvn_client/diff.c

(make_repos_relpath): Update caller.

* subversion/libsvn_client/externals.c

(switch_dir_external): Update caller.

(handle_external_item_change): Update caller.

* subversion/libsvn_client/merge.c

(open_target_wc): Update caller. Avoid adding error cases.

(calculate_left_hand_side): Update caller.

* subversion/libsvn_client/mergeinfo.c

(svn_client__get_wc_mergeinfo_catalog): Update caller, by combining calls.

(svn_client_mergeinfo_get_merged): Update caller.

(svn_client_mergeinfo_log2): Rename variable to match common practice.

Update caller.

* subversion/libsvn_wc/info.c

(svn_wc__get_info): Fetch repository information on the parent directory,

not the tree conflict victim to avoid getting path not found.

(requires r1442335, to avoid a segfault.)

* subversion/libsvn_wc/node.c

(svn_wc__internal_get_repos_info): Add two arguments. Return an error on

not-versioned (like svn_wc__internal_get_repos_relpath used to).

Fetch id and repos-relpath.

(svn_wc__internal_get_repos_relpath): Remove function.

(svn_wc__node_get_repos_info): Add two arguments. Update caller.

(svn_wc__node_get_repos_relpath): Remove function.

* subversion/libsvn_client/util.c

(svn_client_get_repos_root): Update caller. Copy error handling from wc

function to keep public api stable.

* subversion/libsvn_client/ra.c

(svn_client__open_ra_session_internal): Update caller.

* subversion/libsvn_wc/wc.h

(svn_wc__internal_get_repos_info): Add revision and repos_relpath arguments.

(svn_wc__internal_get_repos_relpath): Remove function.

* subversion/tests/libsvn_wc/entries-compat.c

(test_access_baton_like_locking): Update caller.

  1. … 12 more files in changeset.
Remove deprecated function use, bump callers from svn_client_propget4() to

svn_client_propget5().

* subversion/svn/propedit-cmd.c

(svn_cl__propedit),

* subversion/libsvn_client/merge.c

(get_wc_explicit_mergeinfo_catalog),

* subversion/libsvn_client/cleanup.c

(svn_client_upgrade):

Use svn_client_propget5(), but don't fetch inherited properties.

  1. … 2 more files in changeset.
Eliminate svn_uri__is_child().

* subversion/include/svn_dirent_uri.h,

subversion/libsvn_subr/dirent_uri.c

(svn_uri__is_child): Delete.

* subversion/libsvn_client/cleanup.c

(fetch_repos_info): s/is_child/is_ancestor; benefit when relpath is "".

* subversion/libsvn_wc/upgrade.c

(ensure_repos_info): Same.

* subversion/libsvn_client/copy.c

(repos_to_repos_copy): s/is_child/skip_ancestor four times; in two cases

add a check for relpath "", and in the other two cases eliminate one.

Also fix an out-of-date comment and reduce scope of the variable.

(wc_to_repos_copy): s/is_child/skip_ancestor; it was clear that the

relpath is never "".

* subversion/libsvn_client/delete.c

(delete_urls_multi_repos): s/is_child/skip_ancestor twice; relpath "" is

not valid (and, in cases where relpath is "", it will merely crash at a

different place than it did before).

* subversion/libsvn_client/info.c

(push_dir_info): s/is_child/skip_ancestor; it was clear that the

relpath is never "".

* subversion/libsvn_client/merge.c

(make_conflict_versions): Same.

* subversion/libsvn_client/commit.c

(collect_lock_tokens): Eliminate an is_ancestor call by using the existing

skip_ancestor result.

* subversion/libsvn_client/util.c

(svn_client__path_relative_to_root): Same.

* subversion/libsvn_wc/update_editor.c

(svn_wc_add_repos_file4): Same.

* subversion/libsvn_ra_local/ra_plugin.c

(reporter_link_path): Same.

(svn_ra_local__reparent): s/is_child/is_ancestor and eliminate a strcmp.

* subversion/libsvn_subr/target.c

(svn_path_remove_redundancies): s/is_child/skip_ancestor, both for URI and

dirent, and eliminate a strcmp.

* subversion/libsvn_wc/adm_files.c

(svn_wc__internal_ensure_adm): s/is_child/skip_ancestor; eliminate both

the check for relpath "" and an is_ancestor call in an assertion.

* subversion/libsvn_wc/entries.c

(write_entry): s/is_child/skip_ancestor three times; in two cases

eliminate checks for relpath "" and in the third case adjust the check.

* subversion/libsvn_wc/externals.c

(close_file, svn_wc__get_file_external_editor): s/is_child/skip_ancestor

twice; trust that the semantic change is unlikely to be harmful, since

it seems likely and passes tests, but the use of these paths is

insufficiently documented to be sure.

* subversion/svnsync/main.c

(do_initialize): s/is_child/strcmp, as the URL has to be either a child or

the same as the repository root so we just need to test whether it's the

same.

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

(test_uri_is_child): Delete.

(test_list): Remove test_uri_is_child.

  1. … 17 more files in changeset.
* subversion/libsvn_client/cleanup.c

(svn_client_upgrade): Pass FALSE for svn_wc_parse_externals_description3's

canonicalize_url argument to make sure it doesn't munge relative urls.

This fixes upgrade_tests.py 2 (upgrade with externals) on Windows.

Follow-up to r1174342.

Fix some errors around relative externals URLs during upgrade, and around

checked out WCs at an external's target path which don't match the external

definition. Also improve upgrade continuation on errors with externals.

The function that resolves relative externals URLs to absolute ones is needed

in svn_client_upgrade(), so it goes from static to private API. Makes a lot of

sense: svn_wc_external_item2_t already is even *public* API, but there's no

function to make proper use of the svn_wc_external_item2_t.url field. IMHO

svn_wc__resolve_relative_external_url() should go to public API eventually,

but such move is unrelated to this patch.

* subversion/libsvn_client/cleanup.c

(svn_client_upgrade):

- Use svn_wc__resolve_relative_external_url() to properly resolve relative

external URLs. Previously, this would wrongly assume all externals' URLs

to be absolute already.

- Verify that the URL, if gotten from a readily checked out external,

actually is identical to the externals definition (i.e. detect if a

mismatching WC is checked out at the target path).

- Don't abort on errors in externals definitions, go on with the next

external definition (like the inner loop does already).

- Instead of obtaining an absolute path of every external item, get the

abspath of the path that defines the externals once, and join relpaths

with that.

- Make the error handling slightly less complex to read by a little bit of

code dup.

- Rename local var (EXTERNAL_KIND), tweak comments.

* subversion/include/private/svn_wc_private.h,

* subversion/libsvn_wc/externals.c

(svn_wc__resolve_relative_external_url):

Move here and rename from ...

* subversion/libsvn_client/externals.c

(resolve_relative_external_url):

... this.

(uri_scheme):

Move along with resolve_relative_external_url, keep as static.

(handle_external_item_change, svn_client__export_externals):

Apply rename, no functional change.

  1. … 3 more files in changeset.
Issue #4016. Try to find proper URL information on externals during upgrade.

Do this after the entire upgrade ran through, as repository information is

easiest to obtain after all the rest has been upgraded.

(This might obsolete some parts of the existing externals prop upgrade code.

But removing is for another patch, and might just be micro-optimization.)

* subversion/libsvn_client/cleanup.c

(svn_client_upgrade):

Fetch all URL and revisions information from upgraded externals' working

copies, or from fetch_repos_info() if not checked out yet. This properly

populates the EXTERNALS table rows for upgraded externals of all kinds.

Furthermore, change error handling in the externals upgrade loop so that

one externals failure does not abort upgrade of other externals.

* subversion/include/private/svn_wc_private.h,

* subversion/libsvn_wc/upgrade.c

(svn_wc__upgrade_add_external_info): New function.

* subversion/libsvn_wc/wc_db.h,

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_upgrade_insert_external): New function.

  1. … 4 more files in changeset.
Revert r1174139. (No time to fix right now, unbreak the buildbots until then.)

  1. … 4 more files in changeset.
-- This was reverted in r1174166, then fixed & committed in r1174342. --

Try to find proper URL information on externals during upgrade. Do this only

after the existing prop upgrade ran through, as repository information is

easiest to obtain after all that. Issue #4016.

(This might obsolete some parts of the existing externals upgrade code. But

that is stuff for another patch, and might just be micro-optimization.)

* subversion/libsvn_client/cleanup.c

(svn_client_upgrade):

Fetch all URL and revisions information from upgraded externals working

copies, or from fetch_repos_info() if not checked out yet. This properly

populates the EXTERNALS table rows for upgraded externals of all kinds.

Furthermore, change error handling in the externals upgrade loop so that

one externals failure does not abort upgrade of other externals.

* subversion/include/private/svn_wc_private.h,

* subversion/libsvn_wc/upgrade.c

(svn_wc__upgrade_add_external_info): New function.

* subversion/libsvn_wc/wc_db.h,

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_upgrade_insert_external): New function.

  1. … 4 more files in changeset.
Fix a segfault in upgrade code.

* subversion/libsvn_client/cleanup.c (fetch_repos_info): Pass a scratch pool.

* subversion/libsvn_subr/dirent_uri.c (svn_uri__is_child): Assert.

  1. … 1 more file in changeset.