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...@elego.de> on 2012/04/25 13:03:41 UTC

Re: svn commit: r1329563 - /subversion/trunk/subversion/libsvn_fs/editor.c

gstein@apache.org wrote on Tue, Apr 24, 2012 at 06:07:18 -0000:
> @@ -94,9 +210,11 @@ add_absent_cb(void *baton,
>                svn_revnum_t replaces_rev,
>                apr_pool_t *scratch_pool)
>  {
> -  struct edit_baton *eb = baton;
> -
> -  UNUSED(eb); SVN__NOT_IMPLEMENTED();
> +  /* This is a programming error. Code should not attempt to create these
> +     kinds of nodes within the FS.  */
> +  return svn_error_create(
> +           SVN_ERR_UNSUPPORTED_FEATURE, NULL,
> +           N_("The filesystem does not support 'absent' nodes"));
>  }

Should be _() not N_()

Also: change the error text and code?  The use of "unsupported" sounds
like a format upgrade would fix it.  How about one of those "is not
allowed, and could indicate a bug in your client" errors?

SVN_ERR_EDITOR_INVALID_OPERATION maybe.

RE: svn commit: r1329563 - /subversion/trunk/subversion/libsvn_fs/editor.c

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Daniel Shahaf [mailto:danielsh@elego.de]
> Sent: woensdag 25 april 2012 13:04
> To: dev@subversion.apache.org
> Cc: commits@subversion.apache.org; Greg Stein
> Subject: Re: svn commit: r1329563 -
> /subversion/trunk/subversion/libsvn_fs/editor.c
> 
> gstein@apache.org wrote on Tue, Apr 24, 2012 at 06:07:18 -0000:
> > @@ -94,9 +210,11 @@ add_absent_cb(void *baton,
> >                svn_revnum_t replaces_rev,
> >                apr_pool_t *scratch_pool)
> >  {
> > -  struct edit_baton *eb = baton;
> > -
> > -  UNUSED(eb); SVN__NOT_IMPLEMENTED();
> > +  /* This is a programming error. Code should not attempt to create
these
> > +     kinds of nodes within the FS.  */
> > +  return svn_error_create(
> > +           SVN_ERR_UNSUPPORTED_FEATURE, NULL,
> > +           N_("The filesystem does not support 'absent' nodes"));
> >  }
> 
> Should be _() not N_()
> 
> Also: change the error text and code?  The use of "unsupported" sounds
> like a format upgrade would fix it.  How about one of those "is not
> allowed, and could indicate a bug in your client" errors?
> 
> SVN_ERR_EDITOR_INVALID_OPERATION maybe.

Yeas, something in SVN_ERR_FS or SVN_ERR_EDITOR would be much easier to
diagnose for api users than this error code that is usually used in
libsvn_client (and libsvn_ra)

	Bert


RE: svn commit: r1329563 - /subversion/trunk/subversion/libsvn_fs/editor.c

Posted by Bert Huijben <be...@qqmail.nl>.

> -----Original Message-----
> From: Daniel Shahaf [mailto:danielsh@elego.de]
> Sent: woensdag 25 april 2012 13:04
> To: dev@subversion.apache.org
> Cc: commits@subversion.apache.org; Greg Stein
> Subject: Re: svn commit: r1329563 -
> /subversion/trunk/subversion/libsvn_fs/editor.c
> 
> gstein@apache.org wrote on Tue, Apr 24, 2012 at 06:07:18 -0000:
> > @@ -94,9 +210,11 @@ add_absent_cb(void *baton,
> >                svn_revnum_t replaces_rev,
> >                apr_pool_t *scratch_pool)
> >  {
> > -  struct edit_baton *eb = baton;
> > -
> > -  UNUSED(eb); SVN__NOT_IMPLEMENTED();
> > +  /* This is a programming error. Code should not attempt to create
these
> > +     kinds of nodes within the FS.  */
> > +  return svn_error_create(
> > +           SVN_ERR_UNSUPPORTED_FEATURE, NULL,
> > +           N_("The filesystem does not support 'absent' nodes"));
> >  }
> 
> Should be _() not N_()
> 
> Also: change the error text and code?  The use of "unsupported" sounds
> like a format upgrade would fix it.  How about one of those "is not
> allowed, and could indicate a bug in your client" errors?
> 
> SVN_ERR_EDITOR_INVALID_OPERATION maybe.

Yeas, something in SVN_ERR_FS or SVN_ERR_EDITOR would be much easier to
diagnose for api users than this error code that is usually used in
libsvn_client (and libsvn_ra)

	Bert