You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Ivan Zhakov <iv...@visualsvn.com> on 2013/05/20 14:41:38 UTC

Re: svn commit: r1404856 - in /subversion/trunk/subversion: libsvn_wc/ tests/cmdline/

On Fri, Nov 2, 2012 at 5:53 AM,  <st...@apache.org> wrote:
> Author: stsp
> Date: Fri Nov  2 01:53:23 2012
> New Revision: 1404856
>
> URL: http://svn.apache.org/viewvc?rev=1404856&view=rev
> Log:
> Disable automatic working copy upgrades. This has been discussed over and
> over, with many people in the community indicating they prefer manual upgrades.
>
[....]

> Modified: subversion/trunk/subversion/libsvn_wc/wc_db_wcroot.c
> URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/wc_db_wcroot.c?rev=1404856&r1=1404855&r2=1404856&view=diff
> ==============================================================================
> --- subversion/trunk/subversion/libsvn_wc/wc_db_wcroot.c (original)
> +++ subversion/trunk/subversion/libsvn_wc/wc_db_wcroot.c Fri Nov  2 01:53:23 2012
> @@ -27,6 +27,7 @@
>
>  #include "svn_dirent_uri.h"
>  #include "svn_path.h"
> +#include "svn_version.h"
>
>  #include "wc.h"
>  #include "adm_files.h"
> @@ -294,9 +295,24 @@ svn_wc__db_pdh_create_wcroot(svn_wc__db_
>      }
>
>    /* Auto-upgrade the SDB if possible.  */
> -  if (format < SVN_WC__VERSION && auto_upgrade)
> -    SVN_ERR(svn_wc__upgrade_sdb(&format, wcroot_abspath, sdb, format,
> -                                scratch_pool));
> +  if (format < SVN_WC__VERSION)
> +    {
> +      if (auto_upgrade)
> +        {
> +          if (format >= SVN_WC__WC_NG_VERSION)
> +            SVN_ERR(svn_wc__upgrade_sdb(&format, wcroot_abspath, sdb, format,
> +                                        scratch_pool));
> +        }
> +      else
> +        return svn_error_createf(SVN_ERR_WC_UPGRADE_REQUIRED, NULL,
> +                                 _("The working copy at '%s'\nis too old "
> +                                   "(format %d) to work with client version "
> +                                   "'%s' (expects format %d). You need to "
> +                                   "upgrade the working copy first.\n"),
> +                                   svn_dirent_local_style(wcroot_abspath,
> +                                   scratch_pool), format, SVN_VERSION,
> +                                   SVN_WC__VERSION);
> +    }
Hi Stefan,

What is the reason to add new line character to this particular error
message? We usually do not use new line in error messages, except for
logical separation of different part of messages. In this case you
addded '\n' in middle of sentence.

-- 
Ivan Zhakov
CTO | VisualSVN | http://www.visualsvn.com

Re: svn commit: r1404856 - in /subversion/trunk/subversion: libsvn_wc/ tests/cmdline/

Posted by Stefan Sperling <st...@elego.de>.
On Mon, May 20, 2013 at 04:41:38PM +0400, Ivan Zhakov wrote:
> On Fri, Nov 2, 2012 at 5:53 AM,  <st...@apache.org> wrote:
> > Author: stsp
> > Date: Fri Nov  2 01:53:23 2012
> > New Revision: 1404856
> >
> > URL: http://svn.apache.org/viewvc?rev=1404856&view=rev

> > +      else
> > +        return svn_error_createf(SVN_ERR_WC_UPGRADE_REQUIRED, NULL,
> > +                                 _("The working copy at '%s'\nis too old "
> > +                                   "(format %d) to work with client version "
> > +                                   "'%s' (expects format %d). You need to "
> > +                                   "upgrade the working copy first.\n"),
> > +                                   svn_dirent_local_style(wcroot_abspath,
> > +                                   scratch_pool), format, SVN_VERSION,
> > +                                   SVN_WC__VERSION);
> > +    }
> Hi Stefan,
> 
> What is the reason to add new line character to this particular error
> message? We usually do not use new line in error messages, except for
> logical separation of different part of messages. In this case you
> addded '\n' in middle of sentence.

Just for cosmetic reasons. The path could be very long so it might
be easier to read the error message if it wraps after the path.
But if we don't usually do that, then let's just remove the newline.

I think the newline at the end is a mistake. We usually don't
append a newline to error messages.