You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Daniel Shahaf <da...@apache.org> on 2013/06/28 15:11:18 UTC

Re: svn commit: r1497757 - in /subversion/branches/verify-keep-going/subversion: include/svn_repos.h libsvn_repos/dump.c svnadmin/svnadmin.c

On Fri, Jun 28, 2013 at 12:56:27PM -0000, prabhugs@apache.org wrote:
> @@ -1532,6 +1610,18 @@ svn_repos_verify_fs3(svn_repos_t *repos,
> +        {
> +          struct error_list *err_list = APR_ARRAY_IDX(error_summary, i, struct error_list *);
> +          notify_verification_error_summary(err_list->rev, err_list->err, notify_func, notify_baton,

Wrap to 80 columns.

> Modified: subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c
> URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c?rev=1497757&r1=1497756&r2=1497757&view=diff
> ==============================================================================
> --- subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c (original)
> +++ subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c Fri Jun 28 12:56:26 2013
> @@ -847,6 +847,18 @@ repos_notify_handler(void *baton,
>                            "svnadmin: ");
>        return;
>  
> +    case svn_repos_notify_failure_summary:
> +      if (notify->revision != SVN_INVALID_REVNUM)
> +        cmdline_stream_printf(feedback_stream, scratch_pool,
> +                              _("r%ld: %s\n"),
> +                              notify->revision, notify->err->message);

err->message may be NULL, perhaps svn_err_best_message()?

> +      return;
> +
> +    case svn_repos_notify_summary:
> +      cmdline_stream_printf(feedback_stream, scratch_pool,
> +                            _("\n-----Summary of corrupt revisions-----\n"));
> +      return;

I think you shouldn't print that header when there are no corrupt revisions.

Re: svn commit: r1497757 - in /subversion/branches/verify-keep-going/subversion: include/svn_repos.h libsvn_repos/dump.c svnadmin/svnadmin.c

Posted by Stefan Sperling <st...@elego.de>.
On Fri, Jun 28, 2013 at 02:40:25PM +0000, Daniel Shahaf wrote:
> Should it print the top-most error or the bottom-most one?
> 
> Here are some traces:
> 
>     svnadmin: SVN_ERR_FS_CORRUPT: Corrupt node-revision '2-1.0.r1/114'
>     svnadmin: SVN_ERR_FS_CORRUPT: Found malformed header 'count  0' in revision file
> 
>     svnadmin: SVN_ERR_FS_CORRUPT: Corrupt representation '2 0 14 1 (null) adc83b19e793491b1c6ea0fd8b46cd9f32e592fc (null)'
>     svnadmin: SVN_ERR_FS_CORRUPT: Malformed svndiff data in representation
> 
>     svnadmin: SVN_ERR_FS_CORRUPT: Filesystem is corrupt
>     svnadmin: SVN_ERR_CHECKSUM_MISMATCH: Checksum mismatch while reading representation:
>        expected:  2d2977d1c96f487abe4a1e202dd03b4f
>          actual:  2d2977d1c96f487abe4a1e202dd03b4e
> 
>     svnadmin: SVN_ERR_ATOMIC_INIT_FAILURE: Couldn't open rep-cache database
>     svnadmin: SVN_ERR_ATOMIC_INIT_FAILURE: Couldn't perform atomic initialization
>     svnadmin: SVN_ERR_SQLITE_ERROR: sqlite: file is encrypted or is not a database (S26), executing statement 'PRAGMA synchronous=OFF;PRAGMA recursive_triggers=ON;'

Hmmm. Perhaps it should print the entire error chain every time.

Re: svn commit: r1497757 - in /subversion/branches/verify-keep-going/subversion: include/svn_repos.h libsvn_repos/dump.c svnadmin/svnadmin.c

Posted by Daniel Shahaf <da...@apache.org>.
On Fri, Jun 28, 2013 at 03:46:11PM +0200, Stefan Sperling wrote:
> On Fri, Jun 28, 2013 at 01:11:18PM +0000, Daniel Shahaf wrote:
> > On Fri, Jun 28, 2013 at 12:56:27PM -0000, prabhugs@apache.org wrote:
> > > @@ -1532,6 +1610,18 @@ svn_repos_verify_fs3(svn_repos_t *repos,
> > > +        {
> > > +          struct error_list *err_list = APR_ARRAY_IDX(error_summary, i, struct error_list *);
> > > +          notify_verification_error_summary(err_list->rev, err_list->err, notify_func, notify_baton,
> > 
> > Wrap to 80 columns.
> > 
> > > Modified: subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c
> > > URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c?rev=1497757&r1=1497756&r2=1497757&view=diff
> > > ==============================================================================
> > > --- subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c (original)
> > > +++ subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c Fri Jun 28 12:56:26 2013
> > > @@ -847,6 +847,18 @@ repos_notify_handler(void *baton,
> > >                            "svnadmin: ");
> > >        return;
> > >  
> > > +    case svn_repos_notify_failure_summary:
> > > +      if (notify->revision != SVN_INVALID_REVNUM)
> > > +        cmdline_stream_printf(feedback_stream, scratch_pool,
> > > +                              _("r%ld: %s\n"),
> > > +                              notify->revision, notify->err->message);
> > 
> > err->message may be NULL, perhaps svn_err_best_message()?
> 
> Should be using svn_error_root_cause() as well, otherwise output
> in maintainer-mode builds looks like this:
> 

Should it print the top-most error or the bottom-most one?

Here are some traces:

    svnadmin: SVN_ERR_FS_CORRUPT: Corrupt node-revision '2-1.0.r1/114'
    svnadmin: SVN_ERR_FS_CORRUPT: Found malformed header 'count  0' in revision file

    svnadmin: SVN_ERR_FS_CORRUPT: Corrupt representation '2 0 14 1 (null) adc83b19e793491b1c6ea0fd8b46cd9f32e592fc (null)'
    svnadmin: SVN_ERR_FS_CORRUPT: Malformed svndiff data in representation

    svnadmin: SVN_ERR_FS_CORRUPT: Filesystem is corrupt
    svnadmin: SVN_ERR_CHECKSUM_MISMATCH: Checksum mismatch while reading representation:
       expected:  2d2977d1c96f487abe4a1e202dd03b4f
         actual:  2d2977d1c96f487abe4a1e202dd03b4e

    svnadmin: SVN_ERR_ATOMIC_INIT_FAILURE: Couldn't open rep-cache database
    svnadmin: SVN_ERR_ATOMIC_INIT_FAILURE: Couldn't perform atomic initialization
    svnadmin: SVN_ERR_SQLITE_ERROR: sqlite: file is encrypted or is not a database (S26), executing statement 'PRAGMA synchronous=OFF;PRAGMA recursive_triggers=ON;'

> -----Summary of corrupt revisions-----
> r5: traced call
> r6: traced call
> r7: traced call
> r8: traced call

Re: svn commit: r1497757 - in /subversion/branches/verify-keep-going/subversion: include/svn_repos.h libsvn_repos/dump.c svnadmin/svnadmin.c

Posted by Stefan Sperling <st...@elego.de>.
On Fri, Jun 28, 2013 at 01:11:18PM +0000, Daniel Shahaf wrote:
> On Fri, Jun 28, 2013 at 12:56:27PM -0000, prabhugs@apache.org wrote:
> > @@ -1532,6 +1610,18 @@ svn_repos_verify_fs3(svn_repos_t *repos,
> > +        {
> > +          struct error_list *err_list = APR_ARRAY_IDX(error_summary, i, struct error_list *);
> > +          notify_verification_error_summary(err_list->rev, err_list->err, notify_func, notify_baton,
> 
> Wrap to 80 columns.
> 
> > Modified: subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c
> > URL: http://svn.apache.org/viewvc/subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c?rev=1497757&r1=1497756&r2=1497757&view=diff
> > ==============================================================================
> > --- subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c (original)
> > +++ subversion/branches/verify-keep-going/subversion/svnadmin/svnadmin.c Fri Jun 28 12:56:26 2013
> > @@ -847,6 +847,18 @@ repos_notify_handler(void *baton,
> >                            "svnadmin: ");
> >        return;
> >  
> > +    case svn_repos_notify_failure_summary:
> > +      if (notify->revision != SVN_INVALID_REVNUM)
> > +        cmdline_stream_printf(feedback_stream, scratch_pool,
> > +                              _("r%ld: %s\n"),
> > +                              notify->revision, notify->err->message);
> 
> err->message may be NULL, perhaps svn_err_best_message()?

Should be using svn_error_root_cause() as well, otherwise output
in maintainer-mode builds looks like this:

-----Summary of corrupt revisions-----
r5: traced call
r6: traced call
r7: traced call
r8: traced call