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

Re: [PATCH]commit from multiple wc

From: Stefan Sperling <stsp_at_elego.de>
Date: Wed, 15 Jul 2009 12:11:33 +0100

On Wed, Jul 15, 2009 at 09:36:24AM +0800, HuiHuang wrote:
> Hey Stefan,
>
> I write a new patch as you want. I have tested it on my machine and you can also test it to
> see whether it can pass the test. Thank you:)

The patch does not apply cleanly to current trunk.
Please always run 'svn update' before generating patches.
You generated the patch against r38371 which is out of date.

Unfortunately the conflicts are not trivial enough for me
to quickly resolve them. Can you send the patch again with
fixes so that it applies cleanly against current trunk?

Also, can you send the patch to make the svn command line
client use svn_client_commit5()?

Some more quick comments below.

> Index: subversion/include/svn_client.h
> ===================================================================
> --- subversion/include/svn_client.h (revision 38371)
> +++ subversion/include/svn_client.h (working copy)
> @@ -1705,6 +1705,25 @@
> */
>
> /**
> +* This function is the same as svn_client_commit4 except that it does

We usually only use "This function is the same as X" when X is a
function which is younger than the one being described.

So, like with the function, please modify the original docstring,
and write a new docstring for svn_client_commit4().
For example "Like svn_client_commit5(), but with
@a allow_multiple_working_copies always set to FALSE."

> +* multiple commits when @a multiple_commit is set TRUE, one for each

We could call this parameter "allow_multiple_working_copies" instead
of "multiple_commit", and document it as:
"When @a allow_multiple_working_copies is TRUE, commits from multiple
working copies are allowed".

This parameter can then stay unmodified when we switch to making a
_single_ commit from multiple working copies possible.

> +* target working copy. Essentially:
> +* svn commit wc1; svn commit wc2; ...; svn commit wcN;
> +* Also it returns an array @a commit_info_p.
> +*/
> +svn_error_t *
> +svn_client_commit5(apr_array_header_t **commit_info_p,
> + const apr_array_header_t *targets,
> + svn_depth_t depth,
> + svn_boolean_t multiple_commit,
> + svn_boolean_t keep_locks,
> + svn_boolean_t keep_changelists,
> + const apr_array_header_t *changelists,
> + const apr_hash_t *revprop_table,
> + svn_client_ctx_t *ctx,
> + apr_pool_t *pool);
> +
> +/**
> * Commit files or directories into repository, authenticating with
> * the authentication baton cached in @a ctx, and using
> * @a ctx->log_msg_func3/@a ctx->log_msg_baton3 to obtain the log message.
> Index: subversion/libsvn_client/commit.c
> ===================================================================
> --- subversion/libsvn_client/commit.c (revision 38371)
> +++ subversion/libsvn_client/commit.c (working copy)
> @@ -72,7 +72,46 @@
>
> } import_ctx_t;
>
> +typedef struct commit_packet_t
> +{
> + /* Working copy root of a wc */
> + const char *base_dir;

By the way, is this path absolute? For WC-NG, it will need to be absolute.

I'll review and test the rest when it compiles against current trunk.

Thank you,
Stefan
Received on 2009-07-15 13:12:03 CEST

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