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

Re: [PATCH] Implement svnadmin verify --force

From: Julian Foad <julianfoad_at_btopenworld.com>
Date: Wed, 31 Oct 2012 17:36:09 +0000 (GMT)

Prabhu Gnana Sundar <prabhugs_at_collab.net> wrote:

> Index: subversion/svnadmin/main.c
[...]
> @@ -729,6 +734,7 @@
>  {
>    svn_stream_t *feedback_stream = baton;
>    apr_size_t len;
> +  const char *revstr;

You can put the variables in a local-scope block within the switch case...
 
>    switch (notify->action)
>    {
> @@ -738,6 +744,17 @@
>                                          notify->warning_str));
>        return;

> +    case svn_repos_notify_failure:

... by writing

         {
           const char *revstr;

           ...
         }

here.

> +      if (notify->revision != SVN_INVALID_REVNUM)
> +        revstr = apr_psprintf(scratch_pool,
> +                              _("Error verifying revision %ld: "),
> +                              notify->revision);
> +      else
> +        revstr = "";
> +      svn_handle_error2(notify->err, stderr, FALSE /* non-fatal */,
> +                        apr_psprintf(scratch_pool, "svnadmin: %s", revstr));
> +      return;

In what cases will the revision number be invalid?  This prints a half-empty message in those cases; what did you intend?

- Julian
Received on 2012-10-31 18:39:43 CET

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.