subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1442662 - in /subversion/trunk/subversion: svn/util.c tests/cmdline/input_validation_tests.py
Date Tue, 05 Feb 2013 17:02:03 GMT
Author: stsp
Date: Tue Feb  5 17:02:03 2013
New Revision: 1442662

URL: http://svn.apache.org/viewvc?rev=1442662&view=rev
Log:
Stop 'svn diff' from printing the same error message twice when mixed
targets are supplied to 'svn diff' synopsis 1.

Instead of...
   svn: E205000: Cannot mix repository and working copy targets
   svn: E200009: Cannot mix repository and working copy targets
... the error message now says:
   svn: E205000: Error parsing arguments
   svn: E200009: Cannot mix repository and working copy targets

* subversion/svn/util.c
  (svn_cl__assert_homogeneous_target_type): Don't repeat the same error
   message as already returned by svn_client__assert_homogeneous_target_type().
   Use the default text for SVN_ERR_CL_ARG_PARSING_ERROR instead.

* subversion/tests/cmdline/input_validation_tests.py
  (invalid_delete_targets, invalid_diff_targets, invalid_lock_targets,
   invalid_unlock_targets, invalid_relocate_targets): Adjust test expectations.

Modified:
    subversion/trunk/subversion/svn/util.c
    subversion/trunk/subversion/tests/cmdline/input_validation_tests.py

Modified: subversion/trunk/subversion/svn/util.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/svn/util.c?rev=1442662&r1=1442661&r2=1442662&view=diff
==============================================================================
--- subversion/trunk/subversion/svn/util.c (original)
+++ subversion/trunk/subversion/svn/util.c Tue Feb  5 17:02:03 2013
@@ -974,9 +974,7 @@ svn_cl__assert_homogeneous_target_type(c
 
   err = svn_client__assert_homogeneous_target_type(targets);
   if (err && err->apr_err == SVN_ERR_ILLEGAL_TARGET)
-    return svn_error_createf(SVN_ERR_CL_ARG_PARSING_ERROR, err,
-                             _("Cannot mix repository and working copy "
-                               "targets"));
+    return svn_error_create(SVN_ERR_CL_ARG_PARSING_ERROR, err, NULL);
   return err;
 }
 

Modified: subversion/trunk/subversion/tests/cmdline/input_validation_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/input_validation_tests.py?rev=1442662&r1=1442661&r2=1442662&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/input_validation_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/input_validation_tests.py Tue Feb  5 17:02:03
2013
@@ -111,14 +111,14 @@ def invalid_delete_targets(sbox):
   "invalid targets for 'delete'"
   sbox.build(read_only=True)
   for (target1, target2) in [("iota", "^/"), ("file://", "iota")]:
-    run_and_verify_svn_in_wc(sbox, "svn: E205000: Cannot mix repository and working "
+    run_and_verify_svn_in_wc(sbox, "svn: E200009: Cannot mix repository and working "
                              "copy targets", 'delete', target1, target2)
 
 def invalid_diff_targets(sbox):
   "invalid targets for 'diff'"
   sbox.build(read_only=True)
   for (target1, target2, target3) in [("iota", "^/", "A/mu"), ("file://", "iota", "A/mu")]:
-    run_and_verify_svn_in_wc(sbox, "svn: E205000: Cannot mix repository and working "
+    run_and_verify_svn_in_wc(sbox, "svn: E200009: Cannot mix repository and working "
                              "copy targets", 'diff', target1, target2, target3)
 
 def invalid_export_targets(sbox):
@@ -202,14 +202,14 @@ def invalid_lock_targets(sbox):
   "wc paths and repo URL target mixture for 'lock'"
   sbox.build(read_only=True)
   for (target1, target2) in [("iota", "^/"), ("file://", "iota")]:
-    run_and_verify_svn_in_wc(sbox, "svn: E205000: Cannot mix repository and working "
+    run_and_verify_svn_in_wc(sbox, "svn: E200009: Cannot mix repository and working "
                              "copy targets", 'lock', target1, target2)
 
 def invalid_unlock_targets(sbox):
   "wc paths and repo URL target mixture for 'unlock'"
   sbox.build(read_only=True)
   for (target1, target2) in [("iota", "^/"), ("file://", "iota")]:
-    run_and_verify_svn_in_wc(sbox, "svn: E205000: Cannot mix repository and working "
+    run_and_verify_svn_in_wc(sbox, "svn: E200009: Cannot mix repository and working "
                              "copy targets", 'unlock', target1, target2)
 
 def invalid_status_targets(sbox):
@@ -243,7 +243,7 @@ def invalid_relocate_targets(sbox):
 def invalid_mkdir_targets(sbox):
   "invalid targets for 'mkdir'"
   sbox.build(read_only=True)
-  run_and_verify_svn_in_wc(sbox, "svn: E205000: Cannot mix repository and working "
+  run_and_verify_svn_in_wc(sbox, "svn: E200009: Cannot mix repository and working "
                            "copy targets", 'mkdir', "folder", "^/folder")
 
 def invalid_update_targets(sbox):



Mime
View raw message