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 2011/01/05 16:55:01 UTC

svn commit: r1055494 - in /subversion/trunk/subversion: svn/info-cmd.c tests/cmdline/basic_tests.py

Author: julianfoad
Date: Wed Jan  5 15:55:00 2011
New Revision: 1055494

URL: http://svn.apache.org/viewvc?rev=1055494&view=rev
Log:
When "svn info" skips a target, display the specific error message returned
by the API instead of a generic and sometimes inaccurate "(Not a valid URL)"
or "(Not a versioned resource)" message.

* subversion/svn/info-cmd.c
  (svn_cl__info): Display the error message returned by svn_client_info3()
    instead of a custom one.

* subversion/tests/cmdline/basic_tests.py
  (info_nonexisting_file): Adjust the expected error message.

Patch by: Noorul Islam K M <noorul{_AT_}collab.net>
(split and tweaked by me)

Modified:
    subversion/trunk/subversion/svn/info-cmd.c
    subversion/trunk/subversion/tests/cmdline/basic_tests.py

Modified: subversion/trunk/subversion/svn/info-cmd.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/info-cmd.c?rev=1055494&r1=1055493&r2=1055494&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/info-cmd.c (original)
+++ subversion/trunk/subversion/svn/info-cmd.c Wed Jan  5 15:55:00 2011
@@ -566,23 +566,11 @@ svn_cl__info(apr_getopt_t *os,
         {
           /* If one of the targets is a non-existent URL or wc-entry,
              don't bail out.  Just warn and move on to the next target. */
-          if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND)
+          if (err->apr_err == SVN_ERR_WC_PATH_NOT_FOUND ||
+              err->apr_err == SVN_ERR_RA_ILLEGAL_URL)
             {
-              SVN_ERR(svn_cmdline_fprintf
-                      (stderr, subpool,
-                       _("%s:  (Not a versioned resource)\n\n"),
-                       svn_path_is_url(truepath)
-                         ? truepath
-                         : svn_dirent_local_style(truepath, pool)));
-            }
-          else if (err->apr_err == SVN_ERR_RA_ILLEGAL_URL)
-            {
-              SVN_ERR(svn_cmdline_fprintf
-                      (stderr, subpool,
-                       _("%s:  (Not a valid URL)\n\n"),
-                       svn_path_is_url(truepath)
-                         ? truepath
-                         : svn_dirent_local_style(truepath, pool)));
+              svn_handle_warning2(stderr, err, "svn: ");
+              svn_error_clear(svn_cmdline_fprintf(stderr, subpool, "\n"));
             }
           else
             {

Modified: subversion/trunk/subversion/tests/cmdline/basic_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/basic_tests.py?rev=1055494&r1=1055493&r2=1055494&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/basic_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/basic_tests.py Wed Jan  5 15:55:00 2011
@@ -2260,7 +2260,8 @@ def info_nonexisting_file(sbox):
 
   # Check for the correct error message
   for line in errput:
-    if re.match(".*\(Not a valid URL\).*", line):
+    if re.match(".*" + idonotexist_url + ".*non-existent in revision 1.*",
+                line):
       return
 
   # Else never matched the expected error output, so the test failed.