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

Re: svn commit: r11599 - in trunk/subversion: clients/cmdline include

From: Philip Martin <philip_at_codematters.co.uk>
Date: 2004-10-24 14:45:58 CEST

jpieper@tigris.org writes:

> Author: jpieper
> Date: Sat Oct 23 12:32:03 2004
> New Revision: 11599
>
> Modified:
> trunk/subversion/clients/cmdline/log-cmd.c
> trunk/subversion/include/svn_client.h
> Log:
> Issue #1550: 'svn log' is broken for multiple WC paths.

> --- trunk/subversion/clients/cmdline/log-cmd.c (original)
> +++ trunk/subversion/clients/cmdline/log-cmd.c Sat Oct 23 12:32:03 2004
> @@ -455,6 +455,8 @@
> svn_client_ctx_t *ctx = ((svn_cl__cmd_baton_t *) baton)->ctx;
> apr_array_header_t *targets;
> struct log_receiver_baton lb;
> + const char *target;
> + int i;
>
> SVN_ERR (svn_opt_args_to_target_array (&targets, os,
> opt_state->targets,
> @@ -481,7 +483,7 @@
> }
> else if (opt_state->start_revision.kind == svn_opt_revision_unspecified)
> {
> - const char *target = APR_ARRAY_IDX (targets, 0, const char *);
> + target = APR_ARRAY_IDX (targets, 0, const char *);
>
> /* If the first target is a URL, then we default to HEAD:1.
> Otherwise, the default is BASE:1 since WC@HEAD may not exist. */
> @@ -495,6 +497,27 @@
> opt_state->end_revision.kind = svn_opt_revision_number;
> opt_state->end_revision.value.number = 1; /* oldest commit */
> }
> + }
> +
> + /* Verify that we pass at most one working copy path. */
> + target = APR_ARRAY_IDX (targets, 0, const char *);

There's an identical line inside the else if(), perhaps it should be
moved before the if().

> +
> + if (! svn_path_is_url (target) )
> + {
> + if (targets->nelts > 1)
> + return svn_error_create (SVN_ERR_UNSUPPORTED_FEATURE, NULL,
> + _("When specifying working copy paths, only "
> + "one target may be given"));
> + } else {

"} else {" is usually written on three lines in the Subversion code.

> + /* Check to make sure there are no other URLs. */
> + for (i = 1; i < targets->nelts; i++) {

"for () {" is usually written on two lines.

> + target = APR_ARRAY_IDX (targets, 1, const char *);

Huh? In that APR_ARRAY_IDX should 1 be i?

> +
> + if (svn_path_is_url (target))
> + return svn_error_create (SVN_ERR_UNSUPPORTED_FEATURE, NULL,
> + _("Only relative paths can be specified "
> + "after a URL"));
> + }

-- 
Philip Martin
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Oct 24 14:46:11 2004

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

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.