Checkout Tools
  • last updated 2 hours ago
Constraints
Constraints: committers
 
Constraints: files
Constraints: dates
* libsvn_ra_dav/commit.c (apply_revprops): Remove unused 'log_str' variable.

Fix issue #1976: Set arbitrary revision properties (revprops) during

commit.

Patch by: Gerco Ballintijn <gerco@ballintijn.com>

(heavily tweaked by me)

Review by: malcolm

glasser

This patch adds a "--with-revprop" option to the various URL-based

modification operations (e.g., commit, mkdir, delete, etc.). This option

can be used multiple times to set multiple revision properties. The

argument of the --with-revprop option is of the form "name=value".

* subversion/include/svn_client.h

(svn_client_ctx_t): Added the revprop_table field.

* subversion/include/svn_props.h (svn_prop_has_svn_props): New function.

* subversion/include/svn_ra.h

(svn_ra_get_commit_editor3): New prototype.

(svn_ra_get_commit_editor2): Deprecate.

* subversion/include/svn_ra_svn.h

(SVN_RA_SVN_CAP_COMMIT_REVPROPS): New macro.

(svn_ra_svn_write_proplist,

svn_ra_svn_parse_proplist): Existing functions, moved and made public.

* subversion/include/svn_repos.h

(svn_repos_fs_begin_txn_for_commit2): New prototype.

(svn_repos_fs_begin_txn_for_commit): Deprecate.

(svn_repos_get_commit_editor5): New prototype.

(svn_repos_get_commit_editor4): Deprecate.

* subversion/libsvn_repos/repos.h

(svn_repos__change_txn_props): New function.

* subversion/libsvn_repos/commit.c

(edit_baton): Replace log_msg with revprop_table.

(open_root): Set all revprops on the transaction.

(revprop_table_dup): New function.

(svn_repos_get_commit_editor5): New. Pass on a copy of revprop_table in

edit_baton.

(svn_repos_get_commit_editor4): Add backward-compatability wrapper.

* subversion/libsvn_repos/fs-wrap.c

(svn_repos__change_txn_props): New function.

(svn_repos_fs_begin_txn_for_commit2): Set the revision properties in

the new transaction.

(svn_repos_fs_begin_txn_for_commit): Add backward-compatability wrapper.

* subversion/libsvn_ra/ra_loader.h

(svn_ra__vtable_t): Replaced log_msg parameter with revprop_table in

the get_commit_editor field.

* subversion/libsvn_ra/wrapper_template.h

(compat_get_commit_editor): Pass log message in a hash table.

* subversion/libsvn_ra/ra_loader.c

(svn_ra_get_commit_editor3): Take revprop_table parameter.

(svn_ra_get_commit_editor2): Add backward-compatability wrapper.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__get_commit_editor): Adjust prototype and pass revprops

table on.

* subversion/libsvn_ra_svn/protocol

(2.1.): Add commit-revprops server capability.

(3.1.1.): Adde revprops parameter.

* subversion/libsvn_ra_svn/client.c

(parse_proplist): Moved to marshal.c and made public.

(ra_svn_commit): Send the revprop_table to the server, erroring out if

caller tries to set arbitrary props, but server doesn't support it.

(ra_svn_rev_proplist, ra_svn_get_file, ra_svn_get_dir,

ra_svn_get_file_revs): Use public version of parse_proplist.

* subversion/libsvn_ra_svn/marshal.c

(svn_ra_svn_write_proplist): Extract from svnserve/serve.c and

made public.

(svn_ra_svn_parse_proplist): Extract from client.c and made public.

* subversion/libsvn_ra_dav/ra_dav.h

(svn_ra_dav__get_commit_editor): Adjust prototype.

* subversion/libsvn_ra_dav/commit.c

(apply_log_message): Rename ...

(apply_revprops): ... to this, and add revprop_table marshalling.

(svn_ra_dav__get_commit_editor): Call apply_revprops.

* subversion/libsvn_client/client.h (svn_client__get_revprop_table),

* subversion/libsvn_client/commit_util.c (svn_client__get_revprop_table):

New function.

* subversion/libsvn_client/add.c (mkdir_urls),

* subversion/libsvn_client/commit.c (get_ra_editor),

* subversion/libsvn_client/copy.c (repos_to_repos_copy, wc_to_repos_copy),

* subversion/libsvn_client/delete.c (delete_urls),

* subversion/libsvn_client/prop_commands.c (propset_on_url):

Pass revprop_table as parameter when creating commit editor.

* subversion/libsvn_subr/properties.c

(svn_prop_has_svn_props): New function.

* subversion/svn/cl.h

(svn_cl__longopt_t): Add svn_cl__with_revprop_opt enum value.

(svn_cl__opt_state_t): Add revprop_table field.

* subversion/svn/main.c

(svn_cl__options): Add --with-revprop option.

(SVN_CL__LOG_MSG_OPTIONS): Add --with-revprop to other commit

related options.

(parse_revprop): New function.

(main): Handle --with-revprop option.

* subversion/svn/commit-cmd.c (svn_cl__commit),

* subversion/svn/import-cmd.c (svn_cl__import):

Pass on the revprop_table field.

* subversion/svn/copy-cmd.c (svn_cl__copy),

* subversion/svn/delete-cmd.c (svn_cl__delete),

* subversion/svn/mkdir-cmd.c (svn_cl__mkdir),

* subversion/svn/move-cmd.c (svn_cl__move),

* subversion/svn/propedit-cmd.c (svn_cl__propedit):

Check whether the revprop_table field is set only when actually

commiting, and pass on the revprop_table field.

* subversion/svnserve/serve.c

(serve): Send commit-revprops capability in the greeting.

(write_proplist): Move to libsvn_ra_svn/marshal.c and make public.

(rev_proplist, get_file, get_dir, file_rev_handler): Use public version

of write_proplist.

(commit): Call unmarshalling code when needed, and pass on the

revprop_table.

* subversion/tests/cmdline/commit_tests.py

(mkdir_with_revprop, delete_with_revprop, commit_with_revprop,

import_with_revprop, copy_R2R_with_revprop, copy_WC2R_with_revprop,

move_R2R_with_revprop, propedit_with_revprop,

set_multiple_props_with_revprop, use_empty_value_in_revprop_pair,

set_invalid_revprops): New test functions.

(test_list): Run 'm all.

* subversion/tests/cmdline/svneditor.py

(append_foo): New function.

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

(UnorderedOutput): New class.

(run_and_verify_svn): Deal with unordered output.

(display_lines): Print unordered output.

(compare_unordered_and_display_lines): Added call to

main.compare_unordered_output to do actual unordered comparison.

* subversion/libsvn_ra_serf/ra_serf.h

(svn_ra_serf__get_commit_editor): Adjust prototype.

* subversion/libsvn_ra_serf/commit.c

(commit_context_t): Replace log_msg field with revprop_table.

(open_root): Pass all revprops to the server.

(svn_ra_serf__get_commit_editor): Take revprop_table instead of log message.

  1. … 39 more files in changeset.
* subversion/libsvn_ra_dav/commit.c

(commit_delete_entry): Code formatting fix.

Fix a bug whereby an error encountered while setting up a DAV commit

leaves empty transactions lying around.

This can be demonstrated using e.g. 'svn mkdir http://.../doesnotexist/foo'.

Found by: epg

* subversion/libsvn_ra_dav/commit.c

(svn_ra_dav__get_commit_editor): Abort the commit if we get an error

during setup, removing the activity and aborting the transaction.

Replace calls to apr_array_push() with invocations of the APR_ARRAY_PUSH macro.

Followup to r22958.

* subversion/libsvn_fs_base/reps-strings.c

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

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

* subversion/libsvn_fs_base/revs-txns.c

* subversion/libsvn_fs_base/util/fs_skels.c

* subversion/libsvn_subr/error.c

* subversion/libsvn_subr/svn_string.c

* subversion/libsvn_subr/auth.c

* subversion/libsvn_subr/opt.c

* subversion/libsvn_subr/target.c

* subversion/libsvn_subr/path.c

* subversion/libsvn_ra_local/ra_plugin.c

* subversion/libsvn_client/prop_commands.c

* subversion/libsvn_client/locking_commands.c

* subversion/libsvn_client/blame.c

* subversion/libsvn_client/changelist.c

* subversion/libsvn_client/log.c

* subversion/libsvn_client/commit.c

* subversion/mod_dav_svn/reports/log.c

* subversion/mod_dav_svn/reports/update.c

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

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

* subversion/libsvn_repos/log.c

* subversion/libsvn_repos/rev_hunt.c

* subversion/svn/checkout-cmd.c

* subversion/svn/status-cmd.c

* subversion/libsvn_ra_dav/commit.c

* subversion/libsvn_ra_dav/fetch.c

* subversion/svnserve/serve.c

Use the APR_ARRAY_PUSH macro where appropriate.

  1. … 28 more files in changeset.
Merge r22555:22710 from ra_dav-refactoring branch, closing.
  1. … 11 more files in changeset.
Remove what has become overengineering.

Note: *Some* callers want to know about the Location header,

but since the request now lives past the

svn_ra_dav__request_dispatch() call, they can simply query the value

themselves.

* subversion/libsvn_ra_dav/ra_dav.h

* subversion/libsvn_ra_dav/util.c

(svn_ra_dav__request_interrogator): Obsoleted.

(svn_ra_dav__request_dispatch): Remove request interrogator and its baton.

(svn_ra_dav__request_get_location): New. Function to query the location

header without the manual free() hassle.

* subversion/libsvn_ra_dav/fetch.c

Adjust callers.

* subversion/libsvn_ra_dav/commit.c

Adjust callers.

(do_checkout,

checkout_resource): Eliminate manual tracking and free()-ing of the

Location header value.

  1. … 3 more files in changeset.
* subversion/libsvn_ra_dav/commit.c: Remove stale comment.
Fix r22400 breakage. For some reason, locally it *did* compile.

* subversion/libsvn_ra_dav/ra_dav.h

* subversion/libsvn_ra_dav/util.c

(svn_ra_dav__set_neon_body_provider): Change signature to use the

ra_dav request structure.

(ra_dav_body_provider): Safety check for validity of dereferencing

'callbacks'.

* subversion/libsvn_ra_dav/util.c

* subversion/libsvn_ra_dav/commit.c

Adapt callers.

  1. … 2 more files in changeset.
Fix use-after-destruction breakage: stop autodestructing the request in

svn_ra_dav__request_dispatch().

Note: With this commit we start relying on normal pool cleanup processes

on error, with explicit destruction on success in some callers.

* subversion/libsvn_ra_dav/ra_dav.h

* subversion/libsvn_ra_dav/util.c

(svn_ra_dav__request_dispatch): Stop destructing the request.

* subversion/libsvn_ra_dav/util.c

* subversion/libsvn_ra_dav/fetch.c

* subversion/libsvn_ra_dav/commit.c

Adjust callers to destroy the request themselves.

  1. … 3 more files in changeset.
Change signature for svn_ra_dav__request_dispatch() to use the new

svn_ra_dav__request_t structure.

* subversion/libsvn_ra_dav/ra_dav.h

(svn_ra_dav__request_t): Add 'url' and 'method' members.

* subversion/libsvn_ra_dav/util.c

Change svn_ra_dav__request_dispatch() callers.

(svn_ra_dav__request_dispatch): Remove parameters already in

svn_ra_dav__request_t.

(svn_ra_dav__request_create): Fill new members in svn_ra_dav__request_t.

* subversion/libsvn_ra_dav/commit.c

Change svn_ra_dav__request_dispatch() callers,

creating svn_ra_dav__request_t structures to pass to it.

(custom_get_request): While at it, add the response body reader using

svn_ra_dav__add_response_body_reader(), attaching its cleanup to the

- now available - svn_ra_dav__request_t cleanup.

  1. … 3 more files in changeset.
Fix a couple of memory bugs.

* subversion/libsvn_ra_dav/commit.c

(checkout_resource): Set locn to NULL after it has been free'd so that

the memory does not get reused.

* subversion/libsvn_ra_dav/fetch.c

(svn_ra_dav__get_locks): Destroy subpool earlier so that it does not get

abandoned by the subsequent SVN_NO_ERROR returns.

  1. … 1 more file in changeset.
A follow-up to r21442-r21444, using a module name prefix for

module-scoped APIs, as is the Subversion idiom.

* subversion/libsvn_ra_dav/ra_dav.h

(svn_ra_dav__interrogate_for_location): Renamed from

interrogate_for_location.

* subversion/libsvn_ra_dav/commit.c

(do_checkout): Updated for API rename.

* subversion/libsvn_ra_dav/util.c

(parsed_request): Update for API rename.

(svn_ra_dav__interrogate_for_location): Renamed from

interrogate_for_location.

Suggested by: rooneg

  1. … 2 more files in changeset.
Fix issue #660: Notify ra_dav user of repository redirection or

relocation.

(The svn_error_codes.h portion of this change occurred in r21444.)

* subversion/include/svn_error_codes.h

(SVN_ERR_RA_DAV_RELOCATED): SVN_ERRDEF for moved/relocated repositories.

* subversion/libsvn_ra_dav/ra_dav.h

(interrogate_for_location): Add prototype.

(svn_ra_dav__request_dispatch): Update prototype to accept

interrogator regardless of Neon version.

* subversion/libsvn_ra_dav/commit.c

(interrogate_for_location): Move to util.c.

* subversion/libsvn_ra_dav/fetch.c

(interrogate_for_content_type): Make compatible with Neon < 0.25

using ne_add_response_header_handler. (A nicety made possible by

the remainder of this change.)

(custom_get_request): Always pass interrogate_for_content_type when

dispatching the request.

* subversion/libsvn_ra_dav/util.c

(interrogate_for_location): Move from commit.c and make compatible

with Neon < 0.25.

(parsed_request): For response status codes 301 and 302, provide an

error message with the new location of the repository based on the

Location response header.

(svn_ra_dav__request_dispatch): Update prototype to accept

interrogator regardless of Neon version.

Patch by: Daniel Westermann-Clark <dwc@tigris.org>

(Tweaked by me.)

Suggested by: mbk

gstein

Reviewed by: me

  1. … 3 more files in changeset.
Reformat the code to use a consistent no-space-before-param-list-paren style.

See here for the vote that decided this:

http://subversion.tigris.org/servlets/ReadMsg?list=dev&msgNo=111877

From: "Peter N. Lundblad" <peter@famlundblad.se>

To: "Peter N. Lundblad" <peter@famlundblad.se>

cc: dev@subversion.tigris.org

Subject: Results of: [VOTE] New space-before-parens style

Date: Wed, 8 Feb 2006 12:00:35 +0100 (CET)

Message-ID: <Pine.LNX.4.55.0602080918350.10805@localhost.localdomain>

I took the opportunity to make spacing among all parens in SVN_ERR

macro calls consistent. But I did not address consistency of casts,

nor whether a function name should always appear below its return type

in declarations and definitions, nor whether there should be a space

before/after the "*" when declaring pointer return types.

* www/hacking.html

(coding-style): Document that we are no-space-before-paren now.

* everywhere: Reformat.

  1. … 365 more files in changeset.
Expose a new svn_uuid_generate() function.

This solves two problems:

- Python doesn't appear to have a decent built-in UUID generation

module, which means that users of the Python bindings can't

easily use svn_fs_set_uuid().

- There are a whole lotta places through the codebase that are

doing their own apr_uuid_get() + apr_uuid_format() calls. This

allows that work to be factorized and shared.

NOTE: for some reason the Python bindings appear to require an

explicit pool argument when using this new interface. Not sure why...

* subversion/include/svn_types.h

(svn_uuid_generate): New.

* subversion/libsvn_subr/kitchensink.c

New file for miscellaneous functions (as if being in the miscellany

library wasn't enough...).

* subversion/libsvn_fs_base/lock.c

(svn_fs_base__generate_lock_token): Use svn_uuid_generate().

* subversion/mod_dav_svn/version.c

(dav_svn_checkout): Use svn_uuid_generate().

* subversion/svnsync/main.c

(get_lock): Use svn_uuid_generate().

* subversion/libsvn_ra_dav/commit.c

(create_activity): Use svn_uuid_generate().

* subversion/libsvn_fs_fs/lock.c

(svn_fs_fs__generate_lock_token): Use svn_uuid_generate().

  1. … 6 more files in changeset.
Improve clarity of the copy baton's members in ra_dav's commit code.

* subversion/libsvn_ra_dav/commit.c

(copy_baton): Replace method with a boolean making_a_copy, since

we only used the method in the case of a copy, and there's no

reason to store a string if all that's needed is a boolean. Also,

update comments to indicate which variables can be NULL and when.

(create_request_hook): Update for method/making_a_copy change.

(pre_send_hook): Ditto.

Suggested by: kfogel

Allow DAV sessions to be reused without building up unlimited numbers

of Neon hook callbacks that refer to potentially bogus memory. This

fixes the svnsync tests over DAV with pool debugging turned on.

* subversion/libsvn_ra_dav/ra_dav.h

(svn_ra_dav__session_t): Add the copy baton.

* subversion/libsvn_ra_dav/commit.c

(svn_ra_dav__get_commit_editor): Only set up the hooks the first

time through, move the copy baton into the session so it can persist

there.

  1. … 1 more file in changeset.
Support compilation of the client on (NCR) SVR4 out-of-the-box.

Suggested by: Andrew Cilia <acilia@ptl.com.mt>

* subversion/libsvn_ra_dav/commit.c

(version_rsrc_t): Rename from resource_t which SVR4 defines in its

standard headers.

Partial fix for Issue #443: post-commit hook script (error) output lost

This is step 6 : Pass the post-commit error from the server to the client

over all three protocols.

Patch by: Madan U Sreenivasan <madan@collab.net>

* subversion/libsvn_subr/constructors.c

(svn_commit_info_dup): Modified to copy the post_commit_err member.

* subversion/mod_dav_svn/merge.c

(global): included svn_xml.h.

(dav_svn__merge_response): Modified to use the new post-commit

error message parameter.

* subversion/mod_dav_svn/dav_svn.h

(dav_svn__merge_response): Add new parameter - post_commit_err.

* subversion/mod_dav_svn/version.c

(dav_svn_merge): Modified to extract the post-commit error message.

* subversion/clients/cmdline/util.c

(svn_cl__print_commit_info): At last, we can print out the post-commit

error messages! yoohoo!

* subversion/tests/clients/cmdline/commit_tests.py

(post_commit_hook_test): New function to test post-commit hook's error

output.

(test_list): Added post_commit_hook_test to list of tests.

* subversion/libsvn_repos/hooks.c

(svn_repos__hooks_post_commit): Pass TRUE for the read_errstream

parameter of run_hook_cmd.

* subversion/libsvn_repos/commit.c

(close_edit): Fill the post_commit_err parameter if the child

error message has one.

* subversion/libsvn_ra_svn/client.c

(ra_svn_end_commit): Modified to read the extra post-commit error

message sent out by the server.

* subversion/libsvn_ra_svn/protocol

(commit_info): Added the optional parameter for post-commit error.

* subversion/libsvn_ra_dav/merge.c

(merge_elements): Added new member for post-commit error processing.

(merge_ctx_t): Added new member for post-commit error.

(validate_element): Added test for the ELEM_post_commit_err.

(end_element): Added post-commit error handling.

(svn_ra_dav__merge_activity): Added the post_commit_err parameter

and its handling.

* subversion/libsvn_ra_dav/ra_dav.h

(enum): Added a new member ELEM_post_commit_err.

(svn_ra_dav__merge_activity): Added new parameter for post-commit error

message.

* subversion/libsvn_ra_dav/commit.c

(commit_close_edit): Modified call to svn_ra_dav__merge_activity to

pass the post-commit error message.

* subversion/svnserve/serve.c

(commit_callback_baton_t): Add a new member to hold the post-commit

error message.

(commit_done): Modified to copy the over the post-commit error message

to the callback baton.

(commit): Write out the tuple with the post-commit error message.

  1. … 13 more files in changeset.
Clean up the use of the SVN_NEON_0_25 macro to avoid compiler warnings.

As the SVN_NEON_0_25 macro is either defined or undefined (not always defined

to 0 or 1), test it consistently with "#ifdef" (never "#if"), so that we can

enable the "undefined; assuming 0" compiler warnings and get none of them.

This is the only macro that was being defined and tested inconsistently.

* subversion/libsvn_ra_dav/ra_dav.h

* subversion/libsvn_ra_dav/commit.c

* subversion/libsvn_ra_dav/fetch.c

* subversion/libsvn_ra_dav/session.c

* subversion/libsvn_ra_dav/util.c

Always use "#if[n]def", never "#if", to test SVN_NEON_0_25.

  1. … 4 more files in changeset.
Fix issue #2247: ra_dav leaks when reusing session. In short, don't

use the session pool for temporary stuff, which means most stuff, actually.

* subversion/libsvn_ra_dav/log.c (svn_ra_dav__get_log):

* subversion/libsvn_ra_dav/file_revs.c (svn_ra_dav__get_file_revs):

Allocate from the pool provided by the caller.

* subversion/libsvn_ra_dav/ra_dav.h

(svn_ra_dav__maybe_store_auth_info,

svn_ra_dav__maybe_store_auth_info_after_result): Add pool argument.

Callers updated.

* subversion/libsvn_ra_dav/fetch.c

(report_baton_t): Add pool and in_resource members, change

current_wcprop_path to a stringbuf.

(svn_ra_dav__get_locations): Use caller-provided pool for temporary stuff.

(start_element): Use rb->pool instead of the session pool.

When allocating file pools, don't use the session pool, but instead

the parent directory pool.

Set rb->in_resource to true when setting rb->current_wcprop_path (there

is no NULL value any longer).

(cdata_handler): Allocate in rb->pool instead of session pool.

(end_element): Set rb->in_resource to FALSE at the end of a resource

element. Allocate in rb->pool instead of that poor session pool, who should

really start feeling lonely at this point.

Adjust check for if we are inside a resource element to use in_resource.

(reporter_finish_report): Stop using session pool.

(make_reporter): Remove ### comments about a subpool and cleaning

up the temporary file. Files are closed (and removed, in this case)

when their pools are destroyed.

Initialize pool and in_resource members of the report baton and

change initialization of current_wcprop_patch, since it is now

a stringbuf.

* subversion/libsvn_ra_dav/util.c

(svn_ra_dav__maybe_store_auth_info,

svn_ra_dav__maybe_store_auth_info_after_result): Add and use pool

argument for temporary allocatons.

  1. … 6 more files in changeset.
Follow-up to r16694. Get rid of those silly subpools for a single path just

because reparent wants to change them by using a svn_stringbuf_t instead.

Also, get rid of an unused member of the ra_local session baton.

* subversion/libsvn_ra_dav/ra_dav.h

(svn_ra_dav__session_t): Remove the url_pool member; change url to an

svn_stringbuf_t *. All users of this member changed to use url->data.

* subversion/libsvn_ra_dav/session.c

(svn_ra_dav__open): Create the stringbuf for the url.

(svn_ra_dav__reparent): Set the value in the stringbuf instead of using a

subpool.

(svn_ra_dav__get_repos_root): Duplicate the stringbuf.

* subversion/libsvn_ra_local/ra_local.h

(svn_ra_local__session_baton_t): Get rid of the repository_URL and path_pool

members, convert fs_path to a stringbuf, changing all users of fs_path to use

fs_path->data.

* subversion/libsvn_ra_local/ra_plugin.c

(svn_ra_local__open): Don't initialize path_pool or repository_URL anymore;

create the fs_path in the session pool.

(svn_ra_local__reparent): Just update the stringbuf instead of allocating

a new string.

* subversion/svnserve/serve.c

(server_baton_t): Remove path_pool member and change fs_path to an

svn_stringbuf_t *. Replace all uses with fs_path->data.

(reparent): Set the stringbuf instead of allocating a new FS path.

(find_repos): Initialize the stringbuf; don't create an extra subpool.

  1. … 9 more files in changeset.
* subversion/libsvn_ra_dav/commit.c (commit_close_edit): Don't use

variable that wasn't initialized; follow-up to r16697.

Suggested by: maxb

Partial fix for Issue #443: post-commit hook script (error) output lost

This is step 5 : Replace all usage of svn_commit_callback_t with

svn_commit_callback2_t.

Patch by: Madan U Sreenivasan <madan@collab.net>

(Tweaked by me.)

* subversion/libsvn_ra/wrapper_template.h

(compat_get_commit_editor): Use svn_compat_wrap_commit_callback.

* subversion/libsvn_ra/ra_loader.c: Include svn_types.h.

(svn_ra_get_commit_editor2): New function using svn_commit_callback2_t.

(svn_ra_get_commit_editor): Wrap svn_ra_get_commit_editor2.

* subversion/libsvn_ra/ra_loader.h

(svn_ra__vtable_t): Modified the get_commit_editor member to use

svn_commit_callback2_t instead of svn_commit_callback_t.

* subversion/include/svn_repos.h

(svn_repos_get_commit_editor4): New version of svn_repos_get_commit_editor3

to use svn_commit_callback2_t.

(svn_repos_get_commit_editor3): Deprecated.

* subversion/include/svn_types.h

(svn_commit_info_dup): New API.

(svn_commit_callback2_t): New callback similar to svn_commit_callback_t

but using the svn_commit_info_t structure and with an new pol argument.

(svn_commit_callback_t): Deprecated.

(svn_compat_wrap_commit_callback): New API to wrap commit_baton

and provide a svn_commit_callback_t type callback.

* subversion/include/svn_ra.h

(svn_ra_get_commit_editor2): New version of svn_ra_get_commit_editor

using svn_commit_callback2_t.

(svn_ra_get_commit_editor): Deprecated.

* subversion/libsvn_subr/constructors.c

(svn_commit_info_dup): New function.

* subversion/libsvn_subr/compat.c: New file to provide compatibility

for deprecated callback types.

* subversion/libsvn_ra_local/ra_plugin.c

(deltify_etc_baton): Use svn_commit_callback2_t.

(deltify_etc): Now uses the svn_commit_callback2_t signature

and callbacks.

(svn_ra_local__get_commit_editor): Use svn_client_commit_callback2_t.

* subversion/libsvn_client/delete.c

(delete_urls): Use svn_ra_get_commit_editor2 instead of

svn_ra_get_commit_editor.

* subversion/libsvn_client/client.h

(svn_client__commit_callback): Comply with new svn_commit_callback2_t

signature.

* subversion/libsvn_client/copy.c

(repos_to_repos_copy, wc_to_repos_copy): Use svn_ra_get_commit_editor2 instead of

svn_ra_get_commit_editor.

* subversion/libsvn_client/commit_util.c

(svn_client__commit_callback): Modified function to use

svn_commit_info_t.

* subversion/libsvn_client/add.c

(mkdir_urls): Use svn_ra_get_commit_editor2 instead of

svn_ra_get_commit_editor.

* subversion/libsvn_client/commit.c

(get_ra_editor): Use svn_ra_get_commit_editor2.

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

(commit_editor_authz): Use svn_repos_get_commit_editor4.

* subversion/libsvn_repos/commit.c

(edit_baton): Now uses svn_commit_callback2_t.

(close_edit): Use svn_commit_callback2_t based callback.

(svn_repos_get_commit_editor4): New function.

(svn_repos_get_commit_editor3): Modified to wrap around the

svn_repos_get_commit_editor4 function.

(svn_repos_get_commit_editor2): Modified to wrap around the

svn_repos_get_commit_editor3 function.

(svn_repos_get_commit_editor): Modified to wrap around the

svn_repos_get_commit_editor2 function.

* subversion/libsvn_ra_svn/client.c

(ra_svn_commit_callback_baton_t): Now uses svn_commit_callback2_t.

(ra_svn_end_commit): Add pool argument. Use svn_commit_info_t.

(ra_svn_commit): Use svn_commit_callback2_t.

* subversion/libsvn_ra_dav/ra_dav.h

(svn_ra_dav__get_commit_editor): Use svn_commit_callback2_t.

* subversion/libsvn_ra_dav/commit.c

(commit_ctx_t): Use svn_commit_callback2_t.

(commit_close_edit): use svn_commit_info_t.

(svn_ra_dav__get_commit_editor): Use svn_commit_callback2_t.

* subversion/svnserve/serve.c

(commit_callback_baton_t): Add pool member.

(commit_done): Use svn_commit_info_t.

(commit): Use svn_repos_get_commit_editor4.

Initialize ccb->pool

  1. … 20 more files in changeset.
Change a defined constant's name to be more accurate.

This follows up to r15892 and r15900.

* build/ac-macros/neon.m4

(SVN_LIB_NEON, SVN_NEON_CONFIG): "SVN_NEON_0_25", not "SVN_NEON_0_25_0".

* subversion/libsvn_ra_dav/ra_dav.h, subversion/libsvn_ra_dav/session.c,

subversion/libsvn_ra_dav/commit.c, subversion/libsvn_ra_dav/fetch.c,

subversion/libsvn_ra_dav/util.c, build/ac-macros/neon.m4: Adjust.

  1. … 5 more files in changeset.
Follow up to r15051, based on feedback from Julian Foad.

* subversion/libsvn_ra_dav/commit.c

(commit_delete_entry): Don't use SVN_ERR when calling

svn_ra_dav__request_dispatch(), to avoid a problem whereby some

compilers can't handle a preprocessor conditional in a macro call.

(simple_request): For the same reason, don't use SVN_ERR. But here

we can just return the value of the last call directly, which is

standard practice anyway.

With Joe Orton, make Subversion work with either Neon 0.24.7 or 0.25.0.

This updates configury to allow either Neon 0.24.7 or 0.25.0, then

adds compile-time conditional blocks throughout libsvn_ra_dav to DTRT

for whichever version of Neon is in effect.

This resolves issue #2297.

* configure.in:

(NEON_ALLOWED_LIST): Replaces NEON_WANTED_REGEX because there isn't

actually enough regexp support in Bourne shell to test for both

0.24.7 and 0.25.0 in one 'case' statement.

(NEON_LATEST_WORKING_VER): Bump up to 0.25.0.

* build/ac-macros/neon.m4

(SVN_LIB_NEON, SVN_NEON_CONFIG): Rewrite version testing

according to above changes to configure.in, and define

SVN_NEON_0_25_0 if find Neon 0.25.0.

* subversion/libsvn_ra_dav/ra_dav.h

(struct lock_request_baton): New field 'request' holds the request

being executed.

(svn_ra_dav__request_interrogator): New callback type.

(svn_ra_dav__request_dispatch): Add interrogator callback and baton

to parameters, in Neon 0.25.0.

* subversion/libsvn_ra_dav/commit.c

(interrogate_for_location): New interrogator callback.

(do_checkout): Get "location" header from the response in either the

Neon 0.24.7 way or the 0.25.0 way, depending on which is operative.

(simple_request, commit_delete_entry, commit_close_file): Pass null

interrogators to svn_ra_dav__request_dispatch if Neon 0.25.0.

* subversion/libsvn_ra_dav/fetch.c

(fetch_file_reader, get_file_reader): Return int if Neon 0.25.0.

Document that these implement the ne_block_reader interface.

(interrogate_for_content_type): New interrogator callback.

(custom_get_request): Get the content-type from the request response

in the 0.24.7 way or the 0.25.0 way as appropriate. Also, lose the

effectively unused 'code' variable, and explicitly ignore the

integer returned from svn_ra_dav__request_dispatch(), which we were

implicitly ignoring anyway.

(reporter_finish_report): Let rb->err take precedence over an

error from svn_ra_dav__parsed_request().

* subversion/libsvn_ra_dav/session.c: Include ne_utils.h.

(handle_creationdate_header, handle_lock_owner_header): Only define

these if Neon 0.24.7.

(post_send_hook): New function to get lock metadata; define this

function only if Neon 0.25.0.

(setup_neon_request_hook): Register post_send_hook, if Neon 0.25.0.

(ra_dav_get_schemes, svn_ra_dav__open): Use the new ne_has_support()

interface instead of ne_supports_ssl(), in Neon 0.25.0.

(svn_ra_dav__lock, svn_ra_dav__unlock, svn_ra_dav__get_lock): Add

comments about what remains to be done.

(create_request_hook): Store the request as well as the method in lrb.

(lock_receiver): Run post_send_hook() on the request manually, to

pick up the response headers properly.

* subversion/libsvn_ra_dav/file_revs.c

(svn_ra_dav__get_file_revs): Let rb->err take precedence over an

error from svn_ra_dav__parsed_request().

* subversion/libsvn_ra_dav/util.c

(spool_reader): Return int if Neon 0.25.0. Document that this

implements the ne_block_reader interface.

(parsed_request): Handle ne_decompress_destroy correctly for both

0.24.7 and 0.25.0.

(svn_ra_dav__request_dispatch): If Neon 0.25.0, take a request

interrogator and baton, and invoke them on the request.

(ra_dav_error_accepter): Only accept error responses with text/xml

content type.

* subversion/include/svn_error_codes.h

(SVN_ERR_RA_DAV_RESPONSE_HEADER_BADNESS): New error code.

* INSTALL: Document support for both versions of Neon.

  1. … 9 more files in changeset.
ra_dav bugfix: make 'svn commit' work on locked files with propchanges.

This is a really embarrassing two-line fix. Sure enough, ra_dav was

sending a PROPPATCH request with no lock-token attached.

* subversion/libsvn_ra_dav/commit.c

(commit_change_file_prop): stop trying to look up a *property name*

in a path->token hash! It's not only redundant (open_file and

add_file have already populated the file baton), it's guaranteed

to overwrite the existing token field with NULL. Oy.

* subversion/libsvn_ra_dav/commit.c (add_valid_target): Store the value,

rather than the address, in the hash as that is what okay_to_bump_path()

expects.