You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ju...@apache.org on 2010/12/17 17:19:55 UTC

svn commit: r1050442 - in /subversion/trunk/subversion: libsvn_wc/upgrade.c svn/main.c tests/cmdline/upgrade_tests.py

Author: julianfoad
Date: Fri Dec 17 16:19:55 2010
New Revision: 1050442

URL: http://svn.apache.org/viewvc?rev=1050442&view=rev
Log:
Move the "please run 'svn upgrade'" text out of libsvn_wc and into the
command-line client, as it may not be appropriate for non-command-line
users.

(The error message for early WCNG formats still refers to command-line
commands and remains in the library, and now it will have an irrelevant
"please see 'svn upgrade'" message displayed as well; but none of that
matters because nobody but developers will ever see that message.)

* subversion/libsvn_wc/upgrade.c
  (svn_wc__upgrade_sdb): Remove "please run 'svn upgrade'" from the error
    message when an upgrade is required.

* subversion/svn/main.c
  (main): If any subcommand fails with an 'upgrade required' error code,
    wrap the error message with one referring to the 'svn upgrade' command.

* subversion/tests/cmdline/upgrade_tests.py
  (wc_is_too_old_regex): Adjust the expected error message.

Modified:
    subversion/trunk/subversion/libsvn_wc/upgrade.c
    subversion/trunk/subversion/svn/main.c
    subversion/trunk/subversion/tests/cmdline/upgrade_tests.py

Modified: subversion/trunk/subversion/libsvn_wc/upgrade.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/upgrade.c?rev=1050442&r1=1050441&r2=1050442&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/upgrade.c (original)
+++ subversion/trunk/subversion/libsvn_wc/upgrade.c Fri Dec 17 16:19:55 2010
@@ -1321,8 +1321,7 @@ svn_wc__upgrade_sdb(int *result_format,
 
   if (start_format < SVN_WC__WC_NG_VERSION /* 12 */)
     return svn_error_createf(SVN_ERR_WC_UPGRADE_REQUIRED, NULL,
-                             _("Working copy format of '%s' is too old (%d); "
-                               "please run 'svn upgrade'"),
+                             _("Working copy format of '%s' is too old (%d)"),
                              svn_dirent_local_style(wcroot_abspath,
                                                     scratch_pool),
                              start_format);

Modified: subversion/trunk/subversion/svn/main.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/main.c?rev=1050442&r1=1050441&r2=1050442&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/main.c (original)
+++ subversion/trunk/subversion/svn/main.c Fri Dec 17 16:19:55 2010
@@ -2379,6 +2379,11 @@ main(int argc, const char *argv[])
           err = svn_error_quick_wrap(err,
                                      _("Try 'svn help' for more info"));
         }
+      if (err->apr_err == SVN_ERR_WC_UPGRADE_REQUIRED)
+        {
+          err = svn_error_quick_wrap(err,
+                                     _("Please see the 'svn upgrade' command"));
+        }
       svn_handle_error2(err, stderr, FALSE, "svn: ");
 
       /* Tell the user about 'svn cleanup' if any error on the stack

Modified: subversion/trunk/subversion/tests/cmdline/upgrade_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/upgrade_tests.py?rev=1050442&r1=1050441&r2=1050442&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/upgrade_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/upgrade_tests.py Fri Dec 17 16:19:55 2010
@@ -43,8 +43,7 @@ Item = svntest.wc.StateItem
 XFail = svntest.testcase.XFail
 SkipUnless = svntest.testcase.SkipUnless
 
-wc_is_too_old_regex = (".*Working copy format of '.*' is too old \(\d+\); " +
-                    "please run 'svn upgrade'")
+wc_is_too_old_regex = (".*Working copy format of '.*' is too old \(\d+\).*")
 
 
 def get_current_format():