[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r1464763 [1/2] - in /subversion/trunk/subversion: include/svn_ra_svn.h libsvn_ra_svn/client.c libsvn_ra_svn/editorp.c libsvn_ra_svn/marshal.c svnserve/serve.c

From: Stefan Fuhrmann <stefan.fuhrmann_at_wandisco.com>
Date: Fri, 5 Apr 2013 12:09:24 +0200

On Fri, Apr 5, 2013 at 12:38 AM, Bert Huijben <bert_at_qqmail.nl> wrote:

> Can we keep these in a private header?
>

Hi Bert,

Thanks for the review!

Technically, nothing prevents us from moving them to a private header.
However, the now deprecated svn_ra_svn_write_cmd is public and so
are a lot of low-level ra_svn functions.

I guess the mistake of releasing low-level ra_svn functions as public
has already been made and it will be breach of compatibility to make
them private again. Moving only the new cmd functions to the private
realm will not improve things or add any protection.

-- Stefan^2.

>
> *From:* stefan2_at_apache.org
> *Sent:* Thursday, April 4, 2013 11:03 PM
> *To:* commits_at_subversion.apache.org
>
> Author: stefan2
> Date: Thu Apr 4 21:03:54 2013
> New Revision: 1464763
>
> URL: http://svn.apache.org/r1464763
> Log:
> A late minute API change: instead of introducing the "templated"
> svn_ra_svn_write_templated_cmd, introduce an explicit API function
> with fully typed parameter lists for each svn:// command.
>
> Please note that only the way to express the API changed while the
> API itself is still the same. It's basically much safer to use
> and extend now.
>
> * subversion/include/svn_ra_svn.h
> (svn_ra_svn_cmd_t,
> svn_ra_svn_write_templated_cmd): drop that API from 1.8
> (svn_ra_svn_write_cmd): update deprecation statement
> (svn_ra_svn_write_cmd_target_rev,
> svn_ra_svn_write_cmd_open_root,
> svn_ra_svn_write_cmd_delete_entry,
> svn_ra_svn_write_cmd_add_dir,
> svn_ra_svn_write_cmd_open_dir,
> svn_ra_svn_write_cmd_change_dir_prop,
> svn_ra_svn_write_cmd_close_dir,
> svn_ra_svn_write_cmd_absent_dir,
> svn_ra_svn_write_cmd_add_file,
> svn_ra_svn_write_cmd_open_file,
> svn_ra_svn_write_cmd_change_file_prop,
> svn_ra_svn_write_cmd_close_file,
> svn_ra_svn_write_cmd_absent_file,
> svn_ra_svn_write_cmd_apply_textdelta,
> svn_ra_svn_write_cmd_textdelta_chunk,
> svn_ra_svn_write_cmd_textdelta_end,
> svn_ra_svn_write_cmd_close_edit,
> svn_ra_svn_write_cmd_abort_edit,
> svn_ra_svn_write_cmd_set_path,
> svn_ra_svn_write_cmd_delete_path,
> svn_ra_svn_write_cmd_link_path,
> svn_ra_svn_write_cmd_finish_report,
> svn_ra_svn_write_cmd_abort_report,
> svn_ra_svn_write_cmd_reparent,
> svn_ra_svn_write_cmd_get_latest_rev,
> svn_ra_svn_write_cmd_get_dated_rev,
> svn_ra_svn_write_cmd_change_rev_prop2,
> svn_ra_svn_write_cmd_change_rev_prop,
> svn_ra_svn_write_cmd_rev_proplist,
> svn_ra_svn_write_cmd_rev_prop,
> svn_ra_svn_write_cmd_get_file,
> svn_ra_svn_write_cmd_update,
> svn_ra_svn_write_cmd_switch,
> svn_ra_svn_write_cmd_status,
> svn_ra_svn_write_cmd_diff,
> svn_ra_svn_write_cmd_check_path,
> svn_ra_svn_write_cmd_stat,
> svn_ra_svn_write_cmd_get_file_revs,
> svn_ra_svn_write_cmd_lock,
> svn_ra_svn_write_cmd_unlock,
> svn_ra_svn_write_cmd_get_lock,
> svn_ra_svn_write_cmd_get_locks,
> svn_ra_svn_write_cmd_replay,
> svn_ra_svn_write_cmd_replay_range,
> svn_ra_svn_write_cmd_get_deleted_rev,
> svn_ra_svn_write_cmd_get_iprops,
> svn_ra_svn_write_cmd_finish_replay): provide one function for each
> svn:// protocol command
>
> * subversion/libsvn_ra_svn/marshal.c
> (vwrite_tuple_start_list,
> vwrite_tuple_end_list): drop
> (write_tuple_cstring,
> write_tuple_cstring_opt,
> write_tuple_string,
> write_tuple_string_opt,
> write_tuple_start_list,
> write_tuple_end_list,
> write_tuple_word,
> write_tuple_word_opt,
> write_tuple_revision,
> write_tuple_revision_opt,
> write_tuple_number,
> write_tuple_boolean,
> write_tuple_depth): duplicates of the vwrite_* functions but with typed
> parameters instead of a va_list
> (write_cmd_add_node,
> write_cmd_open_node,
> write_cmd_change_node_prop,
> write_cmd_absent_node): renamed from vwrite* but with proper parameter
> lists
> (vwrite_cmd_open_root,
> vwrite_cmd_delete_entry,
> vwrite_cmd_add_dir,
> vwrite_cmd_open_dir,
> vwrite_cmd_change_dir_prop,
> vwrite_cmd_absent_dir,
> vwrite_cmd_add_file,
> vwrite_cmd_open_file,
> vwrite_cmd_change_file_prop,
> vwrite_cmd_close_file,
> vwrite_cmd_absent_file,
> vwrite_cmd_textdelta_chunk,
> vwrite_cmd_apply_textdelta,
> vwrite_cmd_no_op,
> vwrite_cmd_set_path,
> vwrite_cmd_link_path,
> vwrite_cmd_change_rev_prop2,
> vwrite_cmd_change_rev_prop,
> vwrite_cmd_rev_prop,
> vwrite_cmd_get_file,
> vwrite_cmd_update,
> vwrite_cmd_switch,
> vwrite_cmd_status,
> vwrite_cmd_diff,
> vwrite_cmd_check_path,
> vwrite_cmd_stat,
> vwrite_cmd_get_file_revs,
> vwrite_cmd_lock,
> vwrite_cmd_unlock,
> vwrite_cmd_get_locks,
> vwrite_cmd_replay,
> vwrite_cmd_replay_range,
> vwrite_cmd_get_deleted_rev,
> vwrite_cmd_get_iprops): adapt and move to new command implementations
> (vwrite_tuple): update
> (vwrite_tuple_func,
> cmd_template_t,
> cmd_templates,
> svn_ra_svn_write_templated_cmd): drop them
> (svn_ra_svn_write_cmd_target_rev,
> svn_ra_svn_write_cmd_open_root,
> svn_ra_svn_write_cmd_delete_entry,
> svn_ra_svn_write_cmd_add_dir,
> svn_ra_svn_write_cmd_open_dir,
> svn_ra_svn_write_cmd_change_dir_prop,
> svn_ra_svn_write_cmd_close_dir,
> svn_ra_svn_write_cmd_absent_dir,
> svn_ra_svn_write_cmd_add_file,
> svn_ra_svn_write_cmd_open_file,
> svn_ra_svn_write_cmd_change_file_prop,
> svn_ra_svn_write_cmd_close_file,
> svn_ra_svn_write_cmd_absent_file,
> svn_ra_svn_write_cmd_apply_textdelta,
> svn_ra_svn_write_cmd_textdelta_chunk,
> svn_ra_svn_write_cmd_textdelta_end,
> svn_ra_svn_write_cmd_close_edit,
> svn_ra_svn_write_cmd_abort_edit,
> svn_ra_svn_write_cmd_set_path,
> svn_ra_svn_write_cmd_delete_path,
> svn_ra_svn_write_cmd_link_path,
> svn_ra_svn_write_cmd_finish_report,
> svn_ra_svn_write_cmd_abort_report,
> svn_ra_svn_write_cmd_reparent,
> svn_ra_svn_write_cmd_get_latest_rev,
> svn_ra_svn_write_cmd_get_dated_rev,
> svn_ra_svn_write_cmd_change_rev_prop2,
> svn_ra_svn_write_cmd_change_rev_prop,
> svn_ra_svn_write_cmd_rev_proplist,
> svn_ra_svn_write_cmd_rev_prop,
> svn_ra_svn_write_cmd_get_file,
> svn_ra_svn_write_cmd_update,
> svn_ra_svn_write_cmd_switch,
> svn_ra_svn_write_cmd_status,
> svn_ra_svn_write_cmd_diff,
> svn_ra_svn_write_cmd_check_path,
> svn_ra_svn_write_cmd_stat,
> svn_ra_svn_write_cmd_get_file_revs,
> svn_ra_svn_write_cmd_lock,
> svn_ra_svn_write_cmd_unlock,
> svn_ra_svn_write_cmd_get_lock,
> svn_ra_svn_write_cmd_get_locks,
> svn_ra_svn_write_cmd_replay,
> svn_ra_svn_write_cmd_replay_range,
> svn_ra_svn_write_cmd_get_deleted_rev,
> svn_ra_svn_write_cmd_get_iprops,
> svn_ra_svn_write_cmd_finish_replay): implement using write_* functions
>
> * subversion/libsvn_ra_svn/client.c
> (ra_svn_set_path,
> ra_svn_delete_path,
> ra_svn_link_path,
> ra_svn_abort_report,
> ra_svn_reparent,
> ra_svn_rev_proplist,
> ra_svn_rev_prop,
> ra_svn_get_file,
> ra_svn_update,
> ra_svn_switch,
> ra_svn_status,
> ra_svn_diff,
> ra_svn_check_path,
> ra_svn_stat,
> ra_svn_lock_compat,
> ra_svn_get_lock,
> ra_svn_get_locks,
> ra_svn_replay,
> ra_svn_replay_range,
> ra_svn_get_deleted_rev,
> ra_svn_get_inherited_props): update to use the new explicit API
>
> * subversion/libsvn_ra_svn/editorp.c
> (check_for_error_internal,
> ra_svn_target_rev,
> ra_svn_open_root,
> ra_svn_delete_entry,
> ra_svn_add_dir,
> ra_svn_open_dir,
> ra_svn_close_dir,
> ra_svn_absent_dir,
> ra_svn_add_file,
> ra_svn_open_file,
> ra_svn_close_file,
> ra_svn_absent_file,
> ra_svn_close_edit,
> ra_svn_abort_edit): update to use the new explicit API
>
> * subversion/svnserve/serve.c
> (replay_one_revision): update to use the new explicit API
>
> Modified:
> subversion/trunk/subversion/include/svn_ra_svn.h
> subversion/trunk/subversion/libsvn_ra_svn/client.c
> subversion/trunk/subversion/libsvn_ra_svn/editorp.c
> subversion/trunk/subversion/libsvn_ra_svn/marshal.c
> subversion/trunk/subversion/svnserve/serve.c
>
> Modified: subversion/trunk/subversion/include/svn_ra_svn.h
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/include/svn_ra_svn.h?rev=1464763&r1=1464762&r2=1464763&view=diff
>
> ==============================================================================
> --- subversion/trunk/subversion/include/svn_ra_svn.h (original)
> +++ subversion/trunk/subversion/include/svn_ra_svn.h Thu Apr 4 21:03:54
> 2013
> @@ -164,66 +164,6 @@ typedef struct svn_ra_svn_item_t
>
> typedef svn_error_t *(*svn_ra_svn_edit_callback)(void *baton);
>
> -/**
> - * List of all commands supported by the SVN:// protocol.
> - *
> - * @since New in 1.8
> - */
> -typedef enum svn_ra_svn_cmd_t
> -{
> - svn_ra_svn_cmd_target_rev,
> - svn_ra_svn_cmd_open_root,
> - svn_ra_svn_cmd_delete_entry,
> - svn_ra_svn_cmd_add_dir,
> - svn_ra_svn_cmd_open_dir,
> - svn_ra_svn_cmd_change_dir_prop,
> - svn_ra_svn_cmd_close_dir,
> - svn_ra_svn_cmd_absent_dir,
> - svn_ra_svn_cmd_add_file,
> - svn_ra_svn_cmd_open_file,
> - svn_ra_svn_cmd_change_file_prop,
> - svn_ra_svn_cmd_close_file,
> - svn_ra_svn_cmd_absent_file,
> - svn_ra_svn_cmd_textdelta_chunk,
> - svn_ra_svn_cmd_textdelta_end,
> - svn_ra_svn_cmd_apply_textdelta,
> - svn_ra_svn_cmd_close_edit,
> - svn_ra_svn_cmd_abort_edit,
> -
> - svn_ra_svn_cmd_set_path,
> - svn_ra_svn_cmd_delete_path,
> - svn_ra_svn_cmd_link_path,
> - svn_ra_svn_cmd_finish_report,
> - svn_ra_svn_cmd_abort_report,
> -
> - svn_ra_svn_cmd_reparent,
> - svn_ra_svn_cmd_get_latest_rev,
> - svn_ra_svn_cmd_get_dated_rev,
> - svn_ra_svn_cmd_change_rev_prop2,
> - svn_ra_svn_cmd_change_rev_prop,
> - svn_ra_svn_cmd_rev_proplist,
> - svn_ra_svn_cmd_rev_prop,
> - svn_ra_svn_cmd_get_file,
> - svn_ra_svn_cmd_update,
> - svn_ra_svn_cmd_switch,
> - svn_ra_svn_cmd_status,
> - svn_ra_svn_cmd_diff,
> - svn_ra_svn_cmd_check_path,
> - svn_ra_svn_cmd_stat,
> - svn_ra_svn_cmd_get_file_revs,
> - svn_ra_svn_cmd_lock,
> - svn_ra_svn_cmd_unlock,
> - svn_ra_svn_cmd_get_lock,
> - svn_ra_svn_cmd_get_locks,
> - svn_ra_svn_cmd_replay,
> - svn_ra_svn_cmd_replay_range,
> - svn_ra_svn_cmd_get_deleted_rev,
> - svn_ra_svn_cmd_get_iprops,
> - svn_ra_svn_cmd_finish_replay,
> -
> - svn_ra_svn_cmd__last
> -} svn_ra_svn_cmd_t;
> -
> /** Initialize a connection structure for the given socket or
> * input/output files.
> *
> @@ -548,7 +488,7 @@ svn_ra_svn_handle_commands(svn_ra_svn_co
> * as svn_ra_svn_write_tuple().
> *
> * @deprecated Provided for backward compatibility with the 1.7 API.
> - * Use svn_ra_svn_write_templated_cmd instead.
> + * Use the svn_ra_svn_write_cmd_* functions instead.
> */
> SVN_DEPRECATED
> svn_error_t *
> @@ -557,17 +497,6 @@ svn_ra_svn_write_cmd(svn_ra_svn_conn_t *
> const char *cmdname,
> const char *fmt, ...);
>
> -/** Write a command of type @a cmd over the network connection @a conn.
> - * The parameters to be provided are command-specific. @a pool will be
> - * used for allocations.
> - *
> - * @since New in 1.8.
> - */
> -svn_error_t *
> -svn_ra_svn_write_templated_cmd(svn_ra_svn_conn_t *conn,
> - apr_pool_t *pool,
> - svn_ra_svn_cmd_t cmd, ...);
> -
> /** Write a successful command response over the network, using the
> * same format string notation as svn_ra_svn_write_tuple(). Do not use
> * partial tuples with this function; if you need to use partial
> @@ -642,6 +571,547 @@ svn_ra_svn_cram_server(svn_ra_svn_conn_t
> const svn_version_t *
> svn_ra_svn_version(void);
>
> +/**
> + * @defgroup svn_commands sending ra_svn commands
> + * @{
> + */
> +
> +/** Sets the target revision of connection @a conn to @a rev. Use @a pool
> + * for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_target_rev(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + svn_revnum_t rev);
> +
> +/** Send a "open-root" command over connection @a conn. Open the
> + * repository root at revision @a rev and associate it with @a token.
> + * Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_open_root(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + svn_revnum_t rev,
> + const char *token);
> +
> +/** Send a "delete-entry" command over connection @a conn. Delete the
> + * @a path at optional revision @a rev below @a parent_token.
> + * Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_delete_entry(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + svn_revnum_t rev,
> + const char *parent_token);
> +
> +/** Send a "add-dir" command over connection @a conn. Add a new directory
> + * node named @a path under the directory identified by @a parent_token.
> + * Associate the new directory with the given @a token. * @a copy_path
> + * and @a copy_rev are optional and describe the copy source.
> + * Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_add_dir(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + const char *parent_token,
> + const char *token,
> + const char *copy_path,
> + svn_revnum_t copy_rev);
> +
> +/** Send a "open-dir" command over connection @a conn. Associate to
> + * @a token the directory node named @a path under the directory
> + * identified by @a parent_token in revision @a rev.
> + * Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_open_dir(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + const char *parent_token,
> + const char *token,
> + svn_revnum_t rev);
> +
> +/** Send a "change-dir-prop" command over connection @a conn. Set the
> + * property @a name to the optional @a value on the directory identified
> + * to @a token. Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_change_dir_prop(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *token,
> + const char *name,
> + const svn_string_t *value);
> +
> +/** Send a "close-dir" command over connection @a conn. Identify the node
> + * to close with @a token. The latter will then no longer be associated
> + * with that node. Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_close_dir(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *token);
> +
> +/** Send a "absent-dir" command over connection @a conn. Directory node
> + * named @a path under the directory identified by @a parent_token is
> + * absent. Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_absent_dir(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + const char *parent_token);
> +
> +/** Send a "add-file" command over connection @a conn. Add a new file
> + * node named @a path under the directory identified by @a parent_token.
> + * Associate the new file with the given @a token. * @a copy_path and
> + * @a copy_rev are optional and describe the copy source.
> + * Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_add_file(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + const char *parent_token,
> + const char *token,
> + const char *copy_path,
> + svn_revnum_t copy_rev);
> +
> +/** Send a "open-file" command over connection @a conn. Associate to
> + * @a token the file node named @a path under the directory identified by
> + * @a parent_token in revision @a rev.
> + * Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_open_file(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + const char *parent_token,
> + const char *token,
> + svn_revnum_t rev);
> +
> +/** Send a "change-file-prop" command over connection @a conn. Set the
> + * property @a name to the optional @a value on the file identified to
> + * @a token. Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_change_file_prop(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *token,
> + const char *name,
> + const svn_string_t *value);
> +
> +/** Send a "close-dir" command over connection @a conn. Identify the node
> + * to close with @a token and provide an optional @a check_sum. The token
> + * will then no longer be associated with that node.
> + * Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_close_file(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *token,
> + const char *text_checksum);
> +
> +/** Send a "absent-file" command over connection @a conn. File node
> + * named @a path in the directory identified by @a parent_token is
> + * absent. Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_absent_file(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + const char *parent_token);
> +
> +/** Send a "apply-textdelta" command over connection @a conn. Starts a
> + * series of text deltas to be applied to the file identified by @a token.
> + * Optionally, specify the file's current checksum in @a base_checksum.
> + * Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_apply_textdelta(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *token,
> + const char *base_checksum);
> +
> +/** Send a "textdelta-chunk" command over connection @a conn. Apply
> + * textdelta @a chunk to the file identified by @a token.
> + * Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_textdelta_chunk(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *token,
> + const svn_string_t *chunk);
> +
> +/** Send a "textdelta-end" command over connection @a conn. Ends the
> + * series of text deltas to be applied to the file identified by @a token.
> + * Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_textdelta_end(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *token);
> +
> +/** Send a "close-edit" command over connection @a conn. Ends the editor
> + * drive (successfully). Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_close_edit(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool);
> +
> +/** Send a "abort-edit" command over connection @a conn. Prematurely ends
> + * the editor drive, e.g. due to some problem on the other side.
> + * Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_abort_edit(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool);
> +
> +/** Send a "set-path" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see set_path() in #svn_ra_reporter3_t for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_set_path(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + svn_revnum_t rev,
> + svn_boolean_t start_empty,
> + const char *lock_token,
> + svn_depth_t depth);
> +
> +/** Send a "delete-path" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see delete_path() in #svn_ra_reporter3_t for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_delete_path(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path);
> +
> +/** Send a "link-path" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see link_path() in #svn_ra_reporter3_t for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_link_path(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + const char *url,
> + svn_revnum_t rev,
> + svn_boolean_t start_empty,
> + const char *lock_token,
> + svn_depth_t depth);
> +
> +/** Send a "finish-report" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see finish_report() in #svn_ra_reporter3_t for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_finish_report(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool);
> +
> +/** Send a "abort-report" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see abort_report() in #svn_ra_reporter3_t for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_abort_report(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool);
> +
> +/** Send a "reparent" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_reparent for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_reparent(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *url);
> +
> +/** Send a "get-latest-rev" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_get_latest_revnum for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_get_latest_rev(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool);
> +
> +/** Send a "get-dated-rev" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_get_dated_revision for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_get_dated_rev(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + apr_time_t tm);
> +
> +/** Send a "change-rev-prop2" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_change_rev_prop2 for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_change_rev_prop2(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + svn_revnum_t rev,
> + const char *name,
> + const svn_string_t *value,
> + svn_boolean_t dont_care,
> + const svn_string_t *old_value);
> +
> +/** Send a "change-rev-prop" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_change_rev_prop for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_change_rev_prop(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + svn_revnum_t rev,
> + const char *name,
> + const svn_string_t *value);
> +
> +/** Send a "rev-proplist" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_rev_proplist for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_rev_proplist(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + svn_revnum_t rev);
> +
> +/** Send a "rev-prop" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_rev_prop for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_rev_prop(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + svn_revnum_t rev,
> + const char *name);
> +
> +/** Send a "get-file" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_get_file for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_get_file(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + svn_revnum_t rev,
> + svn_boolean_t props,
> + svn_boolean_t stream);
> +
> +/** Send a "update" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_do_update2 for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_update(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + svn_revnum_t rev,
> + const char *target,
> + svn_boolean_t recurse,
> + svn_depth_t depth,
> + svn_boolean_t send_copyfrom_args);
> +
> +/** Send a "switch" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_do_switch2 for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_switch(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + svn_revnum_t rev,
> + const char *target,
> + svn_boolean_t recurse,
> + const char *switch_url,
> + svn_depth_t depth,
> + svn_boolean_t send_copyfrom_args,
> + svn_boolean_t ignore_ancestry);
> +
> +/** Send a "status" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_do_status2 for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_status(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *target,
> + svn_boolean_t recurse,
> + svn_revnum_t rev,
> + svn_depth_t depth);
> +
> +/** Send a "diff" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_do_diff3 for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_diff(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + svn_revnum_t rev,
> + const char *target,
> + svn_boolean_t recurse,
> + svn_boolean_t ignore_ancestry,
> + const char *versus_url,
> + svn_boolean_t text_deltas,
> + svn_depth_t depth);
> +
> +/** Send a "check-path" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_check_path for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_check_path(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + svn_revnum_t rev);
> +
> +/** Send a "stat" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_stat for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_stat(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + svn_revnum_t rev);
> +
> +/** Send a "get-file-revs" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_get_file_revs2 for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_get_file_revs(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + svn_revnum_t start,
> + svn_revnum_t end,
> + svn_boolean_t
> include_merged_revisions);
> +
> +/** Send a "lock" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_lock for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_lock(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + const char *comment,
> + svn_boolean_t steal_lock,
> + svn_revnum_t revnum);
> +
> +/** Send a "unlock" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_unlock for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_unlock(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + const char *token,
> + svn_boolean_t break_lock);
> +
> +/** Send a "get-lock" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_get_lock for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_get_lock(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path);
> +
> +/** Send a "get-locks" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_get_locks2 for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_get_locks(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + svn_depth_t depth);
> +
> +/** Send a "replay" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_replay for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_replay(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + svn_revnum_t rev,
> + svn_revnum_t low_water_mark,
> + svn_boolean_t send_deltas);
> +
> +/** Send a "replay-range" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_replay_range for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_replay_range(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + svn_revnum_t start_revision,
> + svn_revnum_t end_revision,
> + svn_revnum_t low_water_mark,
> + svn_boolean_t send_deltas);
> +
> +/** Send a "get-deleted-rev" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_get_deleted_rev for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_get_deleted_rev(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + svn_revnum_t peg_revision,
> + svn_revnum_t end_revision);
> +
> +/** Send a "get-iprops" command over connection @a conn.
> + * Use @a pool for allocations.
> + *
> + * @see #svn_ra_get_inherited_props for a description.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_get_iprops(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool,
> + const char *path,
> + svn_revnum_t revision);
> +
> +/** Send a "finish-replay" command over connection @a conn.
> + * Use @a pool for allocations.
> + */
> +svn_error_t *
> +svn_ra_svn_write_cmd_finish_replay(svn_ra_svn_conn_t *conn,
> + apr_pool_t *pool);
> +
> +/**
> + * @}
> + */
> #ifdef __cplusplus
> }
> #endif /* __cplusplus */
>
> Modified: subversion/trunk/subversion/libsvn_ra_svn/client.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/client.c?rev=1464763&r1=1464762&r2=1464763&view=diff
>
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_ra_svn/client.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_svn/client.c Thu Apr 4 21:03:54
> 2013
> @@ -259,10 +259,8 @@ static svn_error_t *ra_svn_set_path(void
> {
> ra_svn_reporter_baton_t *b = baton;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_set_path,
> - path, rev, start_empty,
> lock_token,
> - svn_depth_to_word(depth)));
> + SVN_ERR(svn_ra_svn_write_cmd_set_path(b->conn, pool, path, rev,
> + start_empty, lock_token, depth));
> return SVN_NO_ERROR;
> }
>
> @@ -271,8 +269,7 @@ static svn_error_t *ra_svn_delete_path(v
> {
> ra_svn_reporter_baton_t *b = baton;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_delete_path,
> path));
> + SVN_ERR(svn_ra_svn_write_cmd_delete_path(b->conn, pool, path));
> return SVN_NO_ERROR;
> }
>
> @@ -286,11 +283,8 @@ static svn_error_t *ra_svn_link_path(voi
> {
> ra_svn_reporter_baton_t *b = baton;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_link_path,
> - path, url, rev, start_empty,
> - lock_token,
> - svn_depth_to_word(depth)));
> + SVN_ERR(svn_ra_svn_write_cmd_link_path(b->conn, pool, path, url, rev,
> + start_empty, lock_token, depth));
> return SVN_NO_ERROR;
> }
>
> @@ -299,8 +293,7 @@ static svn_error_t *ra_svn_finish_report
> {
> ra_svn_reporter_baton_t *b = baton;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, b->pool,
> - svn_ra_svn_cmd_finish_report));
> + SVN_ERR(svn_ra_svn_write_cmd_finish_report(b->conn, b->pool));
> SVN_ERR(handle_auth_request(b->sess_baton, b->pool));
> SVN_ERR(svn_ra_svn_drive_editor2(b->conn, b->pool, b->editor,
> b->edit_baton,
> NULL, FALSE));
> @@ -313,8 +306,7 @@ static svn_error_t *ra_svn_abort_report(
> {
> ra_svn_reporter_baton_t *b = baton;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, b->pool,
> - svn_ra_svn_cmd_abort_report));
> + SVN_ERR(svn_ra_svn_write_cmd_abort_report(b->conn, b->pool));
> return SVN_NO_ERROR;
> }
>
> @@ -781,8 +773,7 @@ static svn_error_t *ra_svn_reparent(svn_
> svn_ra_svn__session_baton_t *new_sess;
> apr_uri_t uri;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> - svn_ra_svn_cmd_reparent, url));
> + SVN_ERR(svn_ra_svn_write_cmd_reparent(conn, pool, url));
> err = handle_auth_request(sess, pool);
> if (! err)
> {
> @@ -831,8 +822,7 @@ static svn_error_t *ra_svn_get_latest_re
> svn_ra_svn__session_baton_t *sess_baton = session->priv;
> svn_ra_svn_conn_t *conn = sess_baton->conn;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> - svn_ra_svn_cmd_get_latest_rev));
> + SVN_ERR(svn_ra_svn_write_cmd_get_latest_rev(conn, pool));
> SVN_ERR(handle_auth_request(sess_baton, pool));
> SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, "r", rev));
> return SVN_NO_ERROR;
> @@ -845,9 +835,7 @@ static svn_error_t *ra_svn_get_dated_rev
> svn_ra_svn__session_baton_t *sess_baton = session->priv;
> svn_ra_svn_conn_t *conn = sess_baton->conn;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> - svn_ra_svn_cmd_get_dated_rev,
> - svn_time_to_cstring(tm, pool)));
> + SVN_ERR(svn_ra_svn_write_cmd_get_dated_rev(conn, pool, tm));
> SVN_ERR(handle_auth_request(sess_baton, pool));
> SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, "r", rev));
> return SVN_NO_ERROR;
> @@ -890,14 +878,12 @@ static svn_error_t *ra_svn_change_rev_pr
> }
>
> if (has_atomic_revprops)
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> -
> svn_ra_svn_cmd_change_rev_prop2,
> - rev, name, value, dont_care,
> - old_value));
> + SVN_ERR(svn_ra_svn_write_cmd_change_rev_prop2(conn, pool, rev, name,
> + value, dont_care,
> + old_value));
> else
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> - svn_ra_svn_cmd_change_rev_prop,
> - rev, name, value));
> + SVN_ERR(svn_ra_svn_write_cmd_change_rev_prop(conn, pool, rev, name,
> + value));
>
> SVN_ERR(handle_auth_request(sess_baton, pool));
> SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, ""));
> @@ -934,8 +920,7 @@ static svn_error_t *ra_svn_rev_proplist(
> svn_ra_svn_conn_t *conn = sess_baton->conn;
> apr_array_header_t *proplist;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> - svn_ra_svn_cmd_rev_proplist,
> rev));
> + SVN_ERR(svn_ra_svn_write_cmd_rev_proplist(conn, pool, rev));
> SVN_ERR(handle_auth_request(sess_baton, pool));
> SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, "l", &proplist));
> SVN_ERR(svn_ra_svn_parse_proplist(proplist, pool, props));
> @@ -949,8 +934,7 @@ static svn_error_t *ra_svn_rev_prop(svn_
> svn_ra_svn__session_baton_t *sess_baton = session->priv;
> svn_ra_svn_conn_t *conn = sess_baton->conn;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> - svn_ra_svn_cmd_rev_prop, rev,
> name));
> + SVN_ERR(svn_ra_svn_write_cmd_rev_prop(conn, pool, rev, name));
> SVN_ERR(handle_auth_request(sess_baton, pool));
> SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, "(?s)", value));
> return SVN_NO_ERROR;
> @@ -1143,9 +1127,8 @@ static svn_error_t *ra_svn_get_file(svn_
> svn_checksum_ctx_t *checksum_ctx;
> apr_pool_t *iterpool;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> - svn_ra_svn_cmd_get_file, path,
> rev,
> - (props != NULL), (stream !=
> NULL)));
> + SVN_ERR(svn_ra_svn_write_cmd_get_file(conn, pool, path, rev,
> + (props != NULL), (stream !=
> NULL)));
> SVN_ERR(handle_auth_request(sess_baton, pool));
> SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, "(?c)rl",
> &expected_digest,
> @@ -1374,10 +1357,8 @@ static svn_error_t *ra_svn_update(svn_ra
> svn_boolean_t recurse = DEPTH_TO_RECURSE(depth);
>
> /* Tell the server we want to start an update. */
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> svn_ra_svn_cmd_update,
> - rev, target, recurse,
> - svn_depth_to_word(depth),
> - send_copyfrom_args));
> + SVN_ERR(svn_ra_svn_write_cmd_update(conn, pool, rev, target, recurse,
> + depth, send_copyfrom_args));
> SVN_ERR(handle_auth_request(sess_baton, pool));
>
> /* Fetch a reporter for the caller to drive. The reporter will drive
> @@ -1406,10 +1387,9 @@ ra_svn_switch(svn_ra_session_t *session,
> svn_boolean_t recurse = DEPTH_TO_RECURSE(depth);
>
> /* Tell the server we want to start a switch. */
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> svn_ra_svn_cmd_switch,
> - rev, target, recurse, switch_url,
> - svn_depth_to_word(depth),
> - send_copyfrom_args,
> ignore_ancestry));
> + SVN_ERR(svn_ra_svn_write_cmd_switch(conn, pool, rev, target, recurse,
> + switch_url, depth,
> + send_copyfrom_args,
> ignore_ancestry));
> SVN_ERR(handle_auth_request(sess_baton, pool));
>
> /* Fetch a reporter for the caller to drive. The reporter will drive
> @@ -1432,9 +1412,8 @@ static svn_error_t *ra_svn_status(svn_ra
> svn_boolean_t recurse = DEPTH_TO_RECURSE(depth);
>
> /* Tell the server we want to start a status operation. */
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> svn_ra_svn_cmd_status,
> - target, recurse, rev,
> - svn_depth_to_word(depth)));
> + SVN_ERR(svn_ra_svn_write_cmd_status(conn, pool, target, recurse, rev,
> + depth));
> SVN_ERR(handle_auth_request(sess_baton, pool));
>
> /* Fetch a reporter for the caller to drive. The reporter will drive
> @@ -1460,10 +1439,9 @@ static svn_error_t *ra_svn_diff(svn_ra_s
> svn_boolean_t recurse = DEPTH_TO_RECURSE(depth);
>
> /* Tell the server we want to start a diff. */
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool, svn_ra_svn_cmd_diff,
> - rev, target, recurse,
> ignore_ancestry,
> - versus_url, text_deltas,
> - svn_depth_to_word(depth)));
> + SVN_ERR(svn_ra_svn_write_cmd_diff(conn, pool, rev, target, recurse,
> + ignore_ancestry, versus_url,
> + text_deltas, depth));
> SVN_ERR(handle_auth_request(sess_baton, pool));
>
> /* Fetch a reporter for the caller to drive. The reporter will drive
> @@ -1695,9 +1673,7 @@ static svn_error_t *ra_svn_check_path(sv
> svn_ra_svn_conn_t *conn = sess_baton->conn;
> const char *kind_word;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> - svn_ra_svn_cmd_check_path,
> - path, rev));
> + SVN_ERR(svn_ra_svn_write_cmd_check_path(conn, pool, path, rev));
> SVN_ERR(handle_auth_request(sess_baton, pool));
> SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, "w", &kind_word));
> *kind = svn_node_kind_from_word(kind_word);
> @@ -1726,9 +1702,7 @@ static svn_error_t *ra_svn_stat(svn_ra_s
> apr_array_header_t *list = NULL;
> svn_dirent_t *the_dirent;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool, svn_ra_svn_cmd_stat,
> - path, rev));
> -
> + SVN_ERR(svn_ra_svn_write_cmd_stat(conn, pool, path, rev));
> SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess_baton, pool),
> N_("'stat' not implemented")));
> SVN_ERR(svn_ra_svn_read_cmd_response(conn, pool, "(?l)", &list));
> @@ -1905,10 +1879,9 @@ static svn_error_t *ra_svn_get_file_revs
> rev_pool = svn_pool_create(pool);
> chunk_pool = svn_pool_create(pool);
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(sess_baton->conn, pool,
> - svn_ra_svn_cmd_get_file_revs,
> - path, start, end,
> - include_merged_revisions));
> + SVN_ERR(svn_ra_svn_write_cmd_get_file_revs(sess_baton->conn, pool,
> + path, start, end,
> + include_merged_revisions));
>
> /* Servers before 1.1 don't support this command. Check for this here.
> */
> SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess_baton, pool),
> @@ -2037,10 +2010,8 @@ static svn_error_t *ra_svn_lock_compat(s
> path = key;
> revnum = val;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, iterpool,
> - svn_ra_svn_cmd_lock,
> - path, comment,
> - steal_lock, *revnum));
> + SVN_ERR(svn_ra_svn_write_cmd_lock(conn, iterpool, path, comment,
> + steal_lock, *revnum));
>
> /* Servers before 1.2 doesn't support locking. Check this here. */
> SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess, pool),
> @@ -2103,9 +2074,8 @@ static svn_error_t *ra_svn_unlock_compat
> else
> token = NULL;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, iterpool,
> - svn_ra_svn_cmd_unlock,
> - path, token, break_lock));
> + SVN_ERR(svn_ra_svn_write_cmd_unlock(conn, iterpool, path, token,
> + break_lock));
>
> /* Servers before 1.2 don't support locking. Check this here. */
> SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess, iterpool),
> @@ -2392,8 +2362,7 @@ static svn_error_t *ra_svn_get_lock(svn_
> svn_ra_svn_conn_t* conn = sess->conn;
> apr_array_header_t *list;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> - svn_ra_svn_cmd_get_lock, path));
> + SVN_ERR(svn_ra_svn_write_cmd_get_lock(conn, pool, path));
>
> /* Servers before 1.2 doesn't support locking. Check this here. */
> SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess, pool),
> @@ -2445,9 +2414,7 @@ static svn_error_t *ra_svn_get_locks(svn
> SVN_ERR(path_relative_to_root(session, &abs_path, full_url, pool));
> abs_path = svn_fspath__canonicalize(abs_path, pool);
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> - svn_ra_svn_cmd_get_locks, path,
> - svn_depth_to_word(depth)));
> + SVN_ERR(svn_ra_svn_write_cmd_get_locks(conn, pool, path, depth));
>
> /* Servers before 1.2 doesn't support locking. Check this here. */
> SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess, pool),
> @@ -2504,9 +2471,8 @@ static svn_error_t *ra_svn_replay(svn_ra
> {
> svn_ra_svn__session_baton_t *sess = session->priv;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(sess->conn, pool,
> - svn_ra_svn_cmd_replay, revision,
> - low_water_mark, send_deltas));
> + SVN_ERR(svn_ra_svn_write_cmd_replay(sess->conn, pool, revision,
> + low_water_mark, send_deltas));
>
> SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess, pool),
> N_("Server doesn't support the replay "
> @@ -2535,10 +2501,9 @@ ra_svn_replay_range(svn_ra_session_t *se
> svn_revnum_t rev;
> svn_boolean_t drive_aborted = FALSE;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(sess->conn, pool,
> - svn_ra_svn_cmd_replay_range,
> - start_revision, end_revision,
> - low_water_mark, send_deltas));
> + SVN_ERR(svn_ra_svn_write_cmd_replay_range(sess->conn, pool,
> + start_revision, end_revision,
> + low_water_mark, send_deltas));
>
> SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess, pool),
> N_("Server doesn't support the "
> @@ -2644,9 +2609,8 @@ ra_svn_get_deleted_rev(svn_ra_session_t
> svn_ra_svn_conn_t *conn = sess_baton->conn;
>
> /* Transmit the parameters. */
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, pool,
> - svn_ra_svn_cmd_get_deleted_rev,
> - path, peg_revision,
> end_revision));
> + SVN_ERR(svn_ra_svn_write_cmd_get_deleted_rev(conn, pool, path,
> + peg_revision,
> end_revision));
>
> /* Servers before 1.6 don't support this command. Check for this here.
> */
> SVN_ERR(handle_unsupported_cmd(handle_auth_request(sess_baton, pool),
> @@ -2679,9 +2643,8 @@ ra_svn_get_inherited_props(svn_ra_sessio
> svn_ra_svn_conn_t *conn = sess_baton->conn;
> apr_array_header_t *iproplist;
>
> - SVN_ERR(svn_ra_svn_write_templated_cmd(conn, scratch_pool,
> - svn_ra_svn_cmd_get_iprops,
> - path, revision));
> + SVN_ERR(svn_ra_svn_write_cmd_get_iprops(conn, scratch_pool,
> + path, revision));
> SVN_ERR(handle_auth_request(sess_baton, scratch_pool));
> SVN_ERR(svn_ra_svn_read_cmd_response(conn, scratch_pool, "l",
> &iproplist));
> SVN_ERR(parse_iproplist(iprops, iproplist, session, result_pool,
>
> Modified: subversion/trunk/subversion/libsvn_ra_svn/editorp.c
> URL:
> http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_ra_svn/editorp.c?rev=1464763&r1=1464762&r2=1464763&view=diff
>
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_ra_svn/editorp.c (original)
> +++ subversion/trunk/subversion/libsvn_ra_svn/editorp.c Thu Apr 4
> 21:03:54 2013
> @@ -138,8 +138,7 @@ check_for_error_internal(ra_svn_edit_bat
> if (svn_ra_svn__input_waiting(eb->conn, pool))
> {
> eb->got_status = TRUE;
> - SVN_ERR(svn_ra_svn_write_templated_cmd(eb->conn, pool,
> - svn_ra_svn_cmd_abort_edit));
> + SVN_ERR(svn_ra_svn_write_cmd_abort_edit(eb->conn, pool));
> SVN_ERR(svn_ra_svn_read_cmd_response(eb->conn, pool, ""));
> /* We shouldn't get here if the consumer is doing its job. */
> return svn_error_create(SVN_ERR_RA_SVN_MALFORMED_DATA, NULL,
> @@ -162,8 +161,7 @@ static svn_error_t *ra_svn_target_rev(vo
> ra_svn_edit_baton_t *eb = edit_baton;
>
> SVN_ERR(check_for_error(eb, pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(eb->conn, pool,
> - svn_ra_svn_cmd_target_rev, rev));
> + SVN_ERR(svn_ra_svn_write_cmd_target_rev(eb->conn, pool, rev));
> return SVN_NO_ERROR;
> }
>
> @@ -174,9 +172,7 @@ static svn_error_t *ra_svn_open_root(voi
> const char *token = make_token('d', eb, pool);
>
> SVN_ERR(check_for_error(eb, pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(eb->conn, pool,
> - svn_ra_svn_cmd_open_root, rev,
> - token));
> + SVN_ERR(svn_ra_svn_write_cmd_open_root(eb->conn, pool, rev, token));
> *root_baton = ra_svn_make_baton(eb->conn, pool, eb, token);
> return SVN_NO_ERROR;
> }
> @@ -187,9 +183,8 @@ static svn_error_t *ra_svn_delete_entry(
> ra_svn_baton_t *b = parent_baton;
>
> SVN_ERR(check_for_error(b->eb, pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_delete_entry,
> - path, rev, b->token));
> + SVN_ERR(svn_ra_svn_write_cmd_delete_entry(b->conn, pool,
> + path, rev, b->token));
> return SVN_NO_ERROR;
> }
>
> @@ -204,10 +199,8 @@ static svn_error_t *ra_svn_add_dir(const
> SVN_ERR_ASSERT((copy_path && SVN_IS_VALID_REVNUM(copy_rev))
> || (!copy_path && !SVN_IS_VALID_REVNUM(copy_rev)));
> SVN_ERR(check_for_error(b->eb, pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_add_dir, path,
> - b->token, token, copy_path,
> - copy_rev));
> + SVN_ERR(svn_ra_svn_write_cmd_add_dir(b->conn, pool, path, b->token,
> + token, copy_path, copy_rev));
> *child_baton = ra_svn_make_baton(b->conn, pool, b->eb, token);
> return SVN_NO_ERROR;
> }
> @@ -220,9 +213,8 @@ static svn_error_t *ra_svn_open_dir(cons
> const char *token = make_token('d', b->eb, pool);
>
> SVN_ERR(check_for_error(b->eb, pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_open_dir,
> - path, b->token, token, rev));
> + SVN_ERR(svn_ra_svn_write_cmd_open_dir(b->conn, pool, path, b->token,
> + token, rev));
> *child_baton = ra_svn_make_baton(b->conn, pool, b->eb, token);
> return SVN_NO_ERROR;
> }
> @@ -234,9 +226,8 @@ static svn_error_t *ra_svn_change_dir_pr
> ra_svn_baton_t *b = dir_baton;
>
> SVN_ERR(check_for_error(b->eb, pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_change_dir_prop,
> - b->token, name, value));
> + SVN_ERR(svn_ra_svn_write_cmd_change_dir_prop(b->conn, pool, b->token,
> + name, value));
> return SVN_NO_ERROR;
> }
>
> @@ -245,9 +236,7 @@ static svn_error_t *ra_svn_close_dir(voi
> ra_svn_baton_t *b = dir_baton;
>
> SVN_ERR(check_for_error(b->eb, pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_close_dir,
> - b->token));
> + SVN_ERR(svn_ra_svn_write_cmd_close_dir(b->conn, pool, b->token));
> return SVN_NO_ERROR;
> }
>
> @@ -262,9 +251,7 @@ static svn_error_t *ra_svn_absent_dir(co
> return SVN_NO_ERROR;
>
> SVN_ERR(check_for_error(b->eb, pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_absent_dir, path,
> - b->token));
> + SVN_ERR(svn_ra_svn_write_cmd_absent_dir(b->conn, pool, path, b->token));
> return SVN_NO_ERROR;
> }
>
> @@ -281,10 +268,8 @@ static svn_error_t *ra_svn_add_file(cons
> SVN_ERR_ASSERT((copy_path && SVN_IS_VALID_REVNUM(copy_rev))
> || (!copy_path && !SVN_IS_VALID_REVNUM(copy_rev)));
> SVN_ERR(check_for_error(b->eb, pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_add_file, path,
> - b->token, token, copy_path,
> - copy_rev));
> + SVN_ERR(svn_ra_svn_write_cmd_add_file(b->conn, pool, path, b->token,
> + token, copy_path, copy_rev));
> *file_baton = ra_svn_make_baton(b->conn, pool, b->eb, token);
> return SVN_NO_ERROR;
> }
> @@ -299,9 +284,8 @@ static svn_error_t *ra_svn_open_file(con
> const char *token = make_token('c', b->eb, pool);
>
> SVN_ERR(check_for_error(b->eb, b->pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_open_file,
> - path, b->token, token, rev));
> + SVN_ERR(svn_ra_svn_write_cmd_open_file(b->conn, pool, path, b->token,
> + token, rev));
> *file_baton = ra_svn_make_baton(b->conn, pool, b->eb, token);
> return SVN_NO_ERROR;
> }
> @@ -315,9 +299,8 @@ static svn_error_t *ra_svn_svndiff_handl
> SVN_ERR(check_for_error(b->eb, b->pool));
> str.data = data;
> str.len = *len;
> - return svn_ra_svn_write_templated_cmd(b->conn, b->pool,
> - svn_ra_svn_cmd_textdelta_chunk,
> - b->token, &str);
> + return svn_ra_svn_write_cmd_textdelta_chunk(b->conn, b->pool,
> + b->token, &str);
> }
>
> static svn_error_t *ra_svn_svndiff_close_handler(void *baton)
> @@ -325,9 +308,7 @@ static svn_error_t *ra_svn_svndiff_close
> ra_svn_baton_t *b = baton;
>
> SVN_ERR(check_for_error(b->eb, b->pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, b->pool,
> - svn_ra_svn_cmd_textdelta_end,
> - b->token));
> + SVN_ERR(svn_ra_svn_write_cmd_textdelta_end(b->conn, b->pool, b->token));
> return SVN_NO_ERROR;
> }
>
> @@ -342,9 +323,8 @@ static svn_error_t *ra_svn_apply_textdel
>
> /* Tell the other side we're starting a text delta. */
> SVN_ERR(check_for_error(b->eb, pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_apply_textdelta,
> - b->token, base_checksum));
> + SVN_ERR(svn_ra_svn_write_cmd_apply_textdelta(b->conn, pool, b->token,
> + base_checksum));
>
> /* Transform the window stream to an svndiff stream. Reuse the
> * file baton for the stream handler, since it has all the
> @@ -373,9 +353,8 @@ static svn_error_t *ra_svn_change_file_p
> ra_svn_baton_t *b = file_baton;
>
> SVN_ERR(check_for_error(b->eb, pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_change_file_prop,
> - b->token, name, value));
> + SVN_ERR(svn_ra_svn_write_cmd_change_file_prop(b->conn, pool,
> + b->token, name, value));
> return SVN_NO_ERROR;
> }
>
> @@ -386,9 +365,8 @@ static svn_error_t *ra_svn_close_file(vo
> ra_svn_baton_t *b = file_baton;
>
> SVN_ERR(check_for_error(b->eb, pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_close_file,
> - b->token, text_checksum));
> + SVN_ERR(svn_ra_svn_write_cmd_close_file(b->conn, pool,
> + b->token, text_checksum));
> return SVN_NO_ERROR;
> }
>
> @@ -403,9 +381,7 @@ static svn_error_t *ra_svn_absent_file(c
> return SVN_NO_ERROR;
>
> SVN_ERR(check_for_error(b->eb, pool));
> - SVN_ERR(svn_ra_svn_write_templated_cmd(b->conn, pool,
> - svn_ra_svn_cmd_absent_file, path,
> - b->token));
> + SVN_ERR(svn_ra_svn_write_cmd_absent_file(b->conn, pool, path,
> b->token));
> return SVN_NO_ERROR;
> }
>
> @@ -416,13 +392,11 @@ static svn_error_t *ra_svn_close_edit(vo
>
> SVN_ERR_ASSERT(!eb->got_status);
> eb->got_status = TRUE;
> - SVN_ERR(svn_ra_svn_write_templated_cmd(eb->conn, pool,
> - svn_ra_svn_cmd_close_edit));
> + SVN_ERR(svn_ra_svn_write_cmd_close_edit(eb->conn, pool));
> err = svn_ra_svn_read_cmd_response(eb->conn, pool, "");
> if (err)
> {
> - svn_error_clear(svn_ra_svn_write_templated_cmd(eb->conn, pool,
> -
> svn_ra_svn_cmd_abort_edit));
> + svn_error_clear(svn_ra_svn_write_cmd_abort_edit(eb->conn, pool));
> return err;
> }
> if (eb->callback)
> @@ -436,8 +410,7 @@ static svn_error_t *ra_svn_abort_edit(vo
>
> if (eb->got_status)
> return SVN_NO_ERROR;
> - SVN_ERR(svn_ra_svn_write_templated_cmd(eb->conn, pool,
> - svn_ra_svn_cmd_abort_edit));
> + SVN_ERR(svn_ra_svn_write_cmd_abort_edit(eb->conn, pool));
> SVN_ERR(svn_ra_svn_read_cmd_response(eb->conn, pool, ""));
> return SVN_NO_ERROR;
> }
>
>
>

-- 
*Join one of our free daily demo sessions on* *Scaling Subversion for the
Enterprise <http://www.wandisco.com/training/webinars>*
*
*
Received on 2013-04-05 12:10:02 CEST

This is an archived mail posted to the Subversion Dev mailing list.