Checkout Tools
  • last updated 7 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
Fix doc-strings of 'revert' API.

* subversion/include/svn_client.h

(svn_client_revert4): Document 'use commit times' behaviour.

* subversion/libsvn_client/revert.c

(revert): Refer to existing docs.

  1. … 1 more file in changeset.
Add an option to the 'revert' APIs to choose whether to delete or keep a

schedule-add file or directory.

Previously reverting a copied (add-with-history) file or directory would

delete it, while reverting a plain add would keep it on disk.

* subversion/include/svn_client.h,

subversion/libsvn_client/deprecated.c,

subversion/libsvn_client/revert.c

(svn_client_revert4): New, revved with a new option 'added_keep_local'.

(svn_client_revert3): Deprecated.

(revert_with_write_lock_baton,

revert): Pass the new option along.

* subversion/include/svn_wc.h,

subversion/libsvn_wc/deprecated.c,

subversion/libsvn_wc/revert.c

(svn_wc_revert6): New, revved with a new option 'added_keep_local'.

(svn_wc_revert5): Deprecated.

(revert_restore):

(revert_wc_data): Allow deleting an on-disk item even in cases (such as a

plain add) where its new metadata status is 'not present'.

(revert,

revert_changelist,

revert_partial): Pass the new option along.

  1. … 5 more files in changeset.
As we are revving svn_client_revert() for 1.9 anyway, now is the time to

give it a 'metadata_only' flag, like we have on copy and move.

This helps gui clients that should record changes after they occured, who

don't want to revert local changes just to re-apply them using the Subversion

function. (And thereby avoiding file lock challenges on Windows)

Note that some of the refactoring in this patch is preparation for a

followup performance patch for reverting huge trees (like entire WC).

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

(Java_org_apache_subversion_javahl_SVNClient_revert): Add another boolean.

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

(SVNClient::revert): Forward metadata_only.

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

(SVNClient::revert): Add metadata_only boolean.

* subversion/bindings/javahl/src/org/apache/subversion/javahl/ISVNClient.java

(revert): Add and document argument.

* subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java

(revert): Add argument (3*)

* subversion/include/svn_client.h

(svn_client_revert3): Add and document argument.

(svn_client_revert2): Document behavior of new argument.

* subversion/include/svn_wc.h

(svn_wc_revert5): Add and document argument.

(svn_wc_revert4): Document behavior of new argument.

* subversion/libsvn_client/deprecated.c

(svn_client_revert2): Update caller.

* subversion/libsvn_client/revert.c

(revert_with_write_lock_baton): Add flag.

(revert): Update caller. Pass error to notify.

(svn_client_revert3): Add argument. Properly use iterpool.

Update caller.

* subversion/libsvn_wc/deprecated.c

(svn_wc_revert4): Update caller.

* subversion/libsvn_wc/revert.c

(revert_wc_data): Add prototype.

(revert_restore): Add argument. Extract the non metadata work

code to revert_wc_data.

(revert_wc_data): New function. Placed below revert_restore to

minimize changes to this file in this patch.

* subversion/svn/revert-cmd.c

(svn_cl__revert): Update caller.

* subversion/tests/libsvn_wc/utils.c

(sbox_wc_revert): Update caller.

  1. … 12 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.
Make it possible to clear changelists while reverting nodes by updating the

svn_client_revert2 api.

While this might look like a separate operation, revert does quite some work

to preserve existing changelists during reverts. Making this optional makes

the common revert code more efficient, while at the same time helping GUI

clients that use changelists only for marking changes.

* subversion/include/svn_client.h

(svn_client_revert3): New function.

(svn_client_revert2): Deprecate function.

(svn_client_revert): Use @deprecate as we do it now.

* subversion/include/svn_wc.h

(svn_wc_revert5): New function.

(svn_wc_revert4): Deprecate function.

* subversion/libsvn_client/deprecated.c

(svn_client_revert2): New function.

* subversion/libsvn_client/revert.c

(revert_with_write_lock_baton): Add variable.

(revert): Update caller.

(svn_client_revert2): Rename to ...

(svn_client_revert3): ... this. Add argument. Update caller.

* subversion/libsvn_wc/deprecated.c

(svn_wc_revert4): New function.

* subversion/libsvn_wc/revert.c

(svn_wc__revert_internal): Rename to...

(revert): ... this. Make static and add argument. Update caller.

(revert_changelist,

revert_partial): Add argument. Update caller.

(svn_wc_revert4): Rename to ...

(svn_wc_revert5): ... this. Update caller.

* subversion/libsvn_wc/wc.h

(svn_wc__revert_internal): Remove function that is only used in revert.c.

* subversion/libsvn_wc/wc_db.c

(revert_baton_t): New struct.

(op_revert_txn): Use new baton. Handle complete ACTUAL delete.

(op_revert_recursive_txn): Use baton. Handle complete ACTUAL deletes.

(svn_wc__db_op_revert): Add argument. Update caller.

* subversion/libsvn_wc/wc_db.h

(svn_wc__db_op_revert): Add argument.

  1. … 8 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.
Sleep for timestamps even if using commit times as timestamps.

Before r1463721, 'revert' did not sleep if using commit times, while

'checkout' and 'update' and 'switch' would sleep regardless. r1463721 made

all of those operations omit the sleep if using commit times, but Philip and

Ben discussed and pointed out that the commit time could still be within the

timestamp resolution and so that could be unsafe. Therefore we will sleep

anyway, in all of those operations, to be safe.

(The commit time could also be *after* the local time because of clock skew,

which adds the possibility that the sleep takes us *into* an unsafe time

period, but we're not trying to address that problem here.)

Found by: breser

* subversion/libsvn_client/revert.c

(svn_client_revert2): Sleep regardless of use-commit-times.

* subversion/libsvn_client/switch.c

(switch_internal): Sleep regardless of use-commit-times.

* subversion/libsvn_client/update.c

(update_internal): Sleep regardless of use-commit-times. (Checkout also

uses this code.)

  1. … 2 more files in changeset.
Fix some sleep-for-timestamps code: avoid missing some cases where we need

to sleep -- especially error cases -- and avoid sleeping in some cases where

we don't need to. Simplify the code by using a consistent pattern: make the

decision of whether to sleep at the lowest level possible (ideally in the WC

layer, but not yet), and do the sleep at the highest level possible

(immediately below the libsvn_client API).

Currently we sleep before releasing the WC write lock in some places, and

after releasing it in other places. We should pick one and be consistent.

* subversion/libsvn_client/client.h

(svn_client__update_internal,

svn_client__checkout_internal,

svn_client__switch_internal,

svn_client__handle_externals): Document that the 'sleep' output is set

even if the function returns an error, and don't let it be NULL.

(svn_client__export_externals): Remove the unused and unneeded 'sleep'

output parameter.

* subversion/libsvn_client/checkout.c

(svn_client__checkout_internal): Rely on the caller to sleep even if we

throw an error. Don't always sleep on success, only if we actually

update the WC.

(svn_client_checkout3): Handle the sleep here.

* subversion/libsvn_client/commit.c

(svn_client_commit6): Sleep, if needed, even if there is an error during

the post-commit 'bumping' of the WC.

* subversion/libsvn_client/copy.c

(do_wc_to_wc_copies_with_write_lock,

do_wc_to_wc_moves,

repos_to_wc_copy_single): Return a flag instead of sleeping here. A

multi-target repos-to-WC copy will now only sleep once, not once per

target.

(do_wc_to_wc_copies,

repos_to_wc_copy_locked,

repos_to_wc_copy,

try_copy): Pass the flag through.

(svn_client_copy6,

svn_client_move7): Handle the sleep here.

* subversion/libsvn_client/export.c

(export_directory): Remove the unneeded 'sleep' variable.

* subversion/libsvn_client/externals.c

(svn_client__export_externals): Remove the unused and unneeded 'sleep'

output parameter.

* subversion/libsvn_client/revert.c

(svn_client_revert2): Sleep even when returning an error. It was missing

the case where, after reverting at least one target, a subsequent target

fails.

* subversion/libsvn_client/switch.c

(switch_internal): Rely on the caller to sleep even if we throw an error.

It missed the case where externals handling fails. Don't require a sleep

if we're using commit times as the WC timestamps.

(svn_client_switch3): Handle the sleep here.

* subversion/libsvn_client/update.c

(update_internal): Rely on the caller to sleep even if we throw an error.

It missed the case where externals handling fails. Don't require a sleep

if we're using commit times as the WC timestamps. This is also used by

checkout, so these changes affect checkout as well.

(svn_client_update4): Handle the sleep here in all cases. It missed the

case where, after updating at least one target, a subsequent target

fails.

  1. … 8 more files in changeset.
Use svn_hash_gets and svn_hash_sets.

* subversion/libsvn_client/add.c

* subversion/libsvn_client/cat.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/revert.c

* subversion/libsvn_client/status.c

* subversion/libsvn_client/switch.c

* subversion/libsvn_client/update.c

* subversion/libsvn_client/util.c

  1. … 30 more files in changeset.
Rename svn_wc__strictly_is_wc_root() to svn_wc__is_wcroot() for consistency

with the name of the DB-layer equivalent function svn_wc__db_is_wcroot().

* subversion/include/private/svn_wc_private.h,

subversion/libsvn_wc/update_editor.c

(svn_wc__strictly_is_wc_root): Rename to svn_wc__is_wcroot. Update doc

string and rename the output parameter for consistency.

* subversion/libsvn_client/add.c

(svn_client_add5): Track the rename.

* subversion/libsvn_client/patch.c

(check_dir_empty): Track the rename.

* subversion/libsvn_client/revert.c

(svn_client_revert2): Track the rename.

* subversion/libsvn_client/switch.c

(switch_internal): Track the rename.

* subversion/libsvn_wc/relocate.c

(svn_wc_relocate4): Track the rename.

* subversion/libsvn_wc/wc_db.h,

subversion/libsvn_wc/wc_db.c

(svn_wc__db_is_wcroot): Refer to svn_wc_is_wc_root() for documentation.

Rename the output parameter for consistency.

  1. … 8 more files in changeset.
Revert r1157172. I have changed my mind about how revert should handle

moves (see http://svn.haxx.se/dev/archive-2011-08/0232.shtml).

A future commit will make 'svn revert' transform the other half of a move

into a plain copy/deletion if only one half of a move is reverted.

  1. … 1 more file in changeset.
Make 'svn revert' error out if only one side of a move is reverted.

For now, 'revert' always refuses to incompletely revert a move.

This will later be extended so that both sides of a move are reverted

if no other local mods affect the moved nodes.

* subversion/libsvn_client/revert.c

(path_is_in_target_list): New helper. Figures out of a given node is

within the revert target list.

(check_moves): New helper. Checks for moved-away and moved-here nodes

within the to-be-reverted subtree, and throws an error if only one half

of a move is present.

(svn_client_revert2): Run check_moves() if we're not reverting the entire WC.

* subversion/tests/cmdline/copy_tests.py

(mv_and_revert_directory): Revert both sides of move to avoid test failure.

  1. … 1 more file in changeset.
Whitespace changes only: move opening parentheses of calls-to-pointed-

to-functions to the line of the function pointer symbol.

* subversion/libsvn_subr/ssl_client_cert_pw_providers.c

(svn_auth__ssl_client_cert_pw_file_save_creds_helper),

* subversion/libsvn_client/revert.c

(revert),

* subversion/libsvn_client/externals.c

(handle_external_item_change, svn_client__do_external_status):

  1. … 2 more files in changeset.
Fix for issue #3938: Make 'svn revert' skip unversioned targets.

* subversion/libsvn_client/revert.c

(revert): Send 'skip' notification when svn_wc_revert4() returns

SVN_ERR_WC_PATH_NOT_FOUND.

* subversion/tests/cmdline/revert_tests.py

(revert_with_unversioned_targets): Expect it to pass.

Patch by: Noorul Islam K M <noorul{_AT_}collab.net>

  1. … 1 more file in changeset.
Rename the 'svn_error_return' macro to 'svn_error_trace'.

See email thread "[RFC] Rename 'svn_error_return' to 'svn_error_trace'?" on

2011-06-23, <http://svn.haxx.se/dev/archive-2011-06/0708.shtml>.

* subversion/include/svn_error.h

(svn_error_return): Rename to svn_error_trace.

(SVN_ERR, svn_error_purge_tracing): Track the rename.

* [everywhere]: Track the rename.

  1. … 120 more files in changeset.
With rhuijben, fix issue #3886 ("'svn revert' of switched tree lock

acquisition regression").

* subversion/libsvn_wc/update_editor.c

(svn_wc__strictly_is_wc_root): Rework in terms of svn_wc__db_is_wcroot().

* subversion/libsvn_client/revert.c

(svn_client_revert2): Lock the parent directory of the switch

target, unless it happens to be a true working copy root.

  1. … 1 more file in changeset.
Just padding my stats.

(Actually, doing my regular trailing whitespace removal, similar to r875968.)

* everywhere:

for extsn in c h cpp java py pl rb; do

sed -i -e 's/[ \t]*$//' `find . -name "*.$extsn" | xargs grep '[ \t]$' -l`

done

  1. … 166 more files in changeset.
Remove redundant svn_error_return() wrapper.

* subversion/svn/add-cmd.c,

subversion/svn/changelist-cmd.c,

subversion/svn/cleanup-cmd.c,

subversion/svn/export-cmd.c,

subversion/svn/import-cmd.c,

subversion/svn/log-cmd.c,

subversion/svn/patch-cmd.c,

subversion/svn/resolve-cmd.c,

subversion/svn/resolved-cmd.c,

subversion/svn/revert-cmd.c,

subversion/svn/status-cmd.c,

subversion/svn/upgrade-cmd.c,

subversion/libsvn_client/add.c,

subversion/libsvn_client/changelist.c,

subversion/libsvn_client/cleanup.c,

subversion/libsvn_client/commit.c,

subversion/libsvn_client/export.c,

subversion/libsvn_client/log.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/patch.c,

subversion/libsvn_client/resolved.c,

subversion/libsvn_client/revert.c,

subversion/libsvn_client/status.c

(svn_cl__add, svn_cl__changelist, svn_cl__cleanup, svn_cl__export,

svn_cl__import, svn_cl__log, svn_cl__patch, svn_cl__resolve,

svn_cl__resolved, svn_cl__revert, svn_cl__status, svn_cl__upgrade,

svn_client_add4, svn_client_add_to_changelist,

svn_client_remove_from_changelists, svn_client_cleanup,

svn_client_commit5, svn_client_export5, svn_client_log5,

svn_client_merge4, svn_client_patch, svn_client_resolve,

svn_client_revert2, svn_client_status5):

Remove redundant svn_error_return() wrapper. Also add blank line

before/after 'if' block where ever required.

Patch by: Noorul Islam K M <noorul{_AT_}collab.net>

  1. … 22 more files in changeset.
Make 'svn revert' verify that none of its targets are URLs.

* subversion/libsvn_client/revert.c,

subversion/svn/revert-cmd.c

(svn_client_revert2, svn_cl__revert): Raise an error if any targets

look like URLs.

* subversion/tests/cmdline/input_validation_tests.py

(invalid_revert_targets, test_list): New test.

Patch by: Noorul Islam K M <noorul{_AT_}collab.net>

  1. … 2 more files in changeset.
Make the lock release code a bit less smart on finding which target a caller

might want to unlock to avoid having to ignore errors on releasing locks on

just deleted directories, or on the wrong target if it just turned from a file

into a directory, etc. etc.

The lock acquire code can now (optionally) always return the path it tried

to acquire a lock on and the unlock code must now alway pass a valid locked

target. (Except for a few specific cases for handling multi-db as single-db)

* subversion/libsvn_wc/wc_db.c

(svn_wc__db_wclock_release): Just allow releasing locks on 'hidden'

directories, in multi db mode. Return an error if neither the node

itself exist, nor its parent.

* subversion/libsvn_wc/update_editor.c

(prep_directory): Update caller.

* subversion/libsvn_wc/lock.c

(svn_wc__acquire_write_lock): Split lock_abspath retrieval from anchor

calculation, to allow callers always access to the lock_root_abspath.

(svn_wc__release_write_lock): If the node is not locked, just unlock it

in wc_db, to allow ignoring errors on not-wcroot directories.

Ignore not-locked on subdirs, but not on the root of the operation.

(svn_wc__call_with_write_lock): Allow locking an anchor of a node. Obtain

the lock_root_abspath and release the lock on this node.

* subversion/libsvn_client/update.c

(update_internal): Don't release locks not obtained here!

(svn_client__update_internal): Store the lock-path and release the lock

on that.

* subversion/libsvn_client/switch.c

(svn_client__switch_internal): Update caller.

* subversion/libsvn_client/revert.c

(svn_client_revert2): Update caller. Lock the anchor of the operation.

* subversion/libsvn_client/prop_commands.c

(svn_client_propset3): Update caller.

* subversion/libsvn_client/patch.c

(svn_client_patch): Update caller.

* subversion/libsvn_client/merge.c

(svn_client_merge3,

svn_client_merge_reintegrate,

svn_client_merge_peg3): Update callers.

* subversion/libsvn_client/externals.c

(switch_dir_external): On relegating only obtain a lock

and don't release it.

(switch_file_external): Update caller.

(handle_external_item_change): Update caller.

* subversion/libsvn_client/delete.c

(svn_client_delete4): Update caller.

* subversion/libsvn_client/copy.c

(do_wc_to_wc_copies): Update caller.

* subversion/libsvn_client/commit.c

(svn_client_commit5): Update caller.

* subversion/libsvn_client/add.c

(add_parent_dirs): Update caller.

* subversion/include/private/svn_wc_private.h

(svn_wc__acquire_write_lock): Update arguments and documentation.

(svn_wc__release_write_lock): Add new requirements to documentation.

(svn_wc__call_with_write_lock): Add lock_anchor argument.

  1. … 14 more files in changeset.
Trailing whitespace scrub.

* subversion/libsvn_subr/prompt.c,

subversion/bindings/javahl/tests/org/apache/subversion/javahl/BasicTests.java,

subversion/bindings/javahl/tests/org/tigris/subversion/javahl/BasicTests.java,

subversion/bindings/javahl/native/CreateJ.cpp,

subversion/bindings/javahl/src/org/apache/subversion/javahl/SVNClient.java,

subversion/bindings/javahl/src/org/apache/subversion/javahl/NativeResources.java,

subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNClient.java,

subversion/bindings/javahl/src/org/tigris/subversion/javahl/Info2.java,

subversion/bindings/javahl/src/org/tigris/subversion/javahl/SVNAdmin.java,

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

subversion/bindings/swig/ruby/test/test_wc.rb,

subversion/bindings/swig/ruby/svn/wc.rb,

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

subversion/tests/cmdline/mergeinfo_tests.py,

subversion/tests/cmdline/log_tests.py,

subversion/tests/cmdline/upgrade_tests.py,

subversion/tests/cmdline/lock_tests.py,

subversion/tests/cmdline/switch_tests.py,

subversion/tests/cmdline/merge_authz_tests.py,

subversion/tests/cmdline/update_tests.py,

subversion/tests/cmdline/svntest/actions.py,

subversion/tests/cmdline/patch_tests.py,

subversion/tests/cmdline/merge_tests.py,

subversion/tests/cmdline/checkout_tests.py,

subversion/tests/libsvn_fs_fs/fs-pack-test.c,

subversion/libsvn_ra_svn/client.c,

subversion/svn/cl.h,

subversion/svn/notify.c,

subversion/include/svn_io.h,

subversion/include/svn_wc.h,

subversion/include/private/svn_wc_private.h,

subversion/libsvn_wc/util.c,

subversion/libsvn_wc/adm_ops.c,

subversion/libsvn_wc/status.c,

subversion/libsvn_wc/update_editor.c,

subversion/libsvn_wc/wc_db.c,

subversion/libsvn_wc/wc_db.h,

subversion/libsvn_wc/upgrade.c,

subversion/libsvn_wc/workqueue.c,

subversion/libsvn_client/switch.c,

subversion/libsvn_client/externals.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/patch.c,

subversion/libsvn_client/revert.c,

subversion/libsvn_client/copy.c,

subversion/libsvn_client/mergeinfo.c,

subversion/libsvn_client/update.c,

subversion/libsvn_client/commit_util.c,

subversion/libsvn_client/cleanup.c,

subversion/libsvn_ra_neon/ra_neon.h,

subversion/libsvn_repos/load.c,

subversion/libsvn_fs_fs/fs_fs.c,

subversion/libsvn_fs_fs/fs.h,

build/generator/gen_vcnet_vcproj.py,

build/generator/gen_win.py:

Scrub trailing whitespace.

  1. … 54 more files in changeset.
In libsvn_client, switch most current callers of svn_wc__acquire_write_lock()

and svn_wc__release_write_lock() to just svn_wc__call_with_write_lock().

Leaving one caller in libsvn_client/externals.c for later.

* subversion/libsvn_client/add.c

(add_with_write_lock_baton): New.

(add): Move all arguments into above baton to be passed in via

svn_wc__call_with_write_lock().

(svn_client_add4): Call add() via svn_wc__call_with_write_lock().

* subversion/libsvn_client/externals.c

(relegate_dir_external_with_write_lock_baton): New.

(relegate_dir_external): Move all arguments into above baton to be passed

in via svn_wc__call_with_write_lock(). Convert the PATH argument to

an absolute LOCAL_ABSPATH.

(switch_dir_external): Call relegate_dir_external() via

svn_wc__call_with_write_lock().

* subversion/libsvn_client/revert.c

(revert_with_write_lock_baton): New.

(revert): Move all arguments into above baton to be passed in via

svn_wc__call_with_write_lock(). Convert the PATH argument to

an absolute LOCAL_ABSPATH.

(svn_client_revert2): Call revert() via svn_wc__call_with_write_lock().

  1. … 2 more files in changeset.
A better fix for the SEGV fixed in r881265: replace another use

of access batons. This no longer leaves .svn directories around.

* subversion/libsvn_wc/adm_files.h

(svn_wc__adm_destroy): Pass svn_wc__db_t and abspath rather than

svn_wc_adm_access_t.

* subversion/libsvn_wc/adm_files.c

(svn_wc__adm_destroy): Use svn_wc__db_t directly.

* subversion/libsvn_wc/adm_ops.c

(svn_wc__internal_remove_from_revision_control): Revert r881265: no

need to check for null access baton.

* subversion/include/private/svn_wc_private.h

(svn_wc_acquire_write_lock): Add anchor_abspath parameter.

* subversion/libsvn_wc/lock.c

(svn_wc_acquire_write_lock): Add anchor_abspath parameter and code.

* subversion/libsvn_client/revert.c

(revert): Acquire and release locks on the anchor.

* subversion/libsvn_client/add.c

(svn_client_add4): Update svn_wc_acquire_write_lock call.

  1. … 6 more files in changeset.
Replace another use of access batons with the working copy locking APIs.

This has the side effect of allowing behavior that would otherwise error, so

update a test to expect the (improved) behavior.

* subversion/tests/cmdline/schedule_tests.py

(revert_inside_newly_added_dir): Update docs and expectation.

* subversion/libsvn_client/revert.c

(revert): Use the locking APIs in place of access batons.

  1. … 1 more file in changeset.
Test out my new and fancy ASF commit priviledges by changing the copyright

wording in our license headers to reflect ownership by the ASF.

* NOTICE:

Change terminology to ASF, and update a link.

* subversion/libsvn_subr/opt.c

(svn_opt__print_version_info): Note that the product as a whole is

copyrighted by the ASF, and update the project website.

* everywhere:

Change license text to reflect ASF ownership.

  1. … 891 more files in changeset.
Use the newer, not-deprecated revert api.

* subversion/libsvn_client/revert.c

(includes): Add include.

(revert): Call revert on absolute path.

* subversion/libsvn_client/revert.c

(revert): Open an anchor in an existing wc context, to reuse database handles.

Relicense Subversion under the Apache License, Version 2.0.

* NOTICE: New.

* LICENSE: New.

* COPYING,

subversion/LICENSE: Remove.

* subversion/libsvn_subr/opt.c

(svn_opt__print_version_info): Note that the product as a whole is

copyrighted by the SVN Corp, and that it contains contributions from

many people, as referenced in NOTICE.

* subversion/bindings/swig/python/LICENSE_FOR_PYTHON_BINDINGS:

Relicense the SVN parts under Apache 2.0.

* everywhere:

Change copyright notices in file headers to reflect the Apache 2.0 license.

  1. … 882 more files in changeset.
A little diversion: Wrap some directly returned errors in libsvn_client.

* subversion/libsvn_client/deprecated.c,

subversion/libsvn_client/switch.c,

subversion/libsvn_client/delete.c,

subversion/libsvn_client/externals.c,

subversion/libsvn_client/cmdline.c,

subversion/libsvn_client/util.c,

subversion/libsvn_client/repos_diff.c,

subversion/libsvn_client/export.c,

subversion/libsvn_client/status.c,

subversion/libsvn_client/info.c,

subversion/libsvn_client/patch.c,

subversion/libsvn_client/merge.c,

subversion/libsvn_client/prop_commands.c,

subversion/libsvn_client/ra.c,

subversion/libsvn_client/checkout.c,

subversion/libsvn_client/revert.c,

subversion/libsvn_client/copy.c,

subversion/libsvn_client/mergeinfo.c,

subversion/libsvn_client/list.c,

subversion/libsvn_client/log.c,

subversion/libsvn_client/update.c,

subversion/libsvn_client/cleanup.c,

subversion/libsvn_client/add.c:

Apply generous use of svn_error_return().

  1. … 22 more files in changeset.