You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by rh...@apache.org on 2013/06/06 19:47:49 UTC

svn commit: r1490380 - in /subversion/trunk/subversion: libsvn_wc/status.c tests/cmdline/commit_tests.py tests/cmdline/stat_tests.py tests/cmdline/tree_conflict_tests.py

Author: rhuijben
Date: Thu Jun  6 17:47:49 2013
New Revision: 1490380

URL: http://svn.apache.org/r1490380
Log:
For now revert r1489928, to unbreak the trunk build of JavaHL.

Either the JavaHL expectations should be fixed or a better fix should be
implemented to make the status users handle invalid status targets.

The JavaHL problem shows that it is not really possible to apply this
change in a fully backward compatible way. Most callers currently ignore
this problem but would be better of with an easy to detect specific error.

* subversion/libsvn_wc/status.c
  (svn_wc__internal_walk_status): Return success for non-existing,
    non-versioned targets in a working copy. Reverting.

* subversion/tests/cmdline/commit_tests.py
* subversion/tests/cmdline/stat_tests.py
* subversion/tests/cmdline/tree_conflict_tests.py
  Revert

Modified:
    subversion/trunk/subversion/libsvn_wc/status.c
    subversion/trunk/subversion/tests/cmdline/commit_tests.py
    subversion/trunk/subversion/tests/cmdline/stat_tests.py
    subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py

Modified: subversion/trunk/subversion/libsvn_wc/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_wc/status.c?rev=1490380&r1=1490379&r2=1490380&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_wc/status.c (original)
+++ subversion/trunk/subversion/libsvn_wc/status.c Thu Jun  6 17:47:49 2013
@@ -2757,17 +2757,6 @@ svn_wc__internal_walk_status(svn_wc__db_
                              cancel_func, cancel_baton,
                              scratch_pool));
     }
-  else if (! info && dirent->kind == svn_node_none)
-    {
-      /* Calling wc status on a node that doesn't exist in the working copy,
-         nor on disk. There is no possible status to describe a not conflicted
-         not-node. */
-
-      return svn_error_createf(SVN_ERR_WC_PATH_NOT_FOUND, NULL,
-                               _("The node '%s' was not found."),
-                               svn_dirent_local_style(local_abspath,
-                                                      scratch_pool));
-    }
   else
     {
       /* It may be a file or an unversioned item. And this is an explicit

Modified: subversion/trunk/subversion/tests/cmdline/commit_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/commit_tests.py?rev=1490380&r1=1490379&r2=1490380&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/commit_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/commit_tests.py Thu Jun  6 17:47:49 2013
@@ -2945,24 +2945,21 @@ def last_changed_of_copied_subdir(sbox):
              }
   svntest.actions.run_and_verify_info([expected], E_copied)
 
-
+@XFail()
 def commit_unversioned(sbox):
   "verify behavior on unversioned targets"
-
+  
   sbox.build(read_only=True)
   wc_dir = sbox.wc_dir
-
+  
   expected_err = 'E200009: .*existing.*\' is not under version control'
 
   # Unversioned, but existing file
   svntest.main.file_write(sbox.ospath('existing'), "xxxx")  
   svntest.actions.run_and_verify_commit(wc_dir, None, None, expected_err,
                                          sbox.ospath('existing'))
-
-
-
+  
   # Unversioned, not existing
-  expected_err = 'E155010: .*existing.*\' was not found'
   svntest.actions.run_and_verify_commit(wc_dir, None, None, expected_err,
                                          sbox.ospath('not-existing'))
                                          

Modified: subversion/trunk/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/stat_tests.py?rev=1490380&r1=1490379&r2=1490380&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/stat_tests.py Thu Jun  6 17:47:49 2013
@@ -378,8 +378,8 @@ def status_for_nonexistent_file(sbox):
 
   os.chdir(wc_dir)
 
-  exit_code, output, err = svntest.actions.run_and_verify_svn2(
-    None, None, '.*W155010:.*', 0, 'status', 'nonexistent-file')
+  exit_code, output, err = svntest.actions.run_and_verify_svn(
+    None, None, [], 'status', 'nonexistent-file')
 
   # there should *not* be a status line printed for the nonexistent file
   for line in output:
@@ -1970,13 +1970,12 @@ def status_not_present(sbox):
                        sbox.ospath('A/mu'), sbox.ospath('A/B'))
   sbox.simple_commit()
 
-  expected_err = '.*W155010.*'
-  svntest.actions.run_and_verify_svn2(None, [], expected_err, 0 ,'status',
-                                      sbox.ospath('iota'),
-                                      sbox.ospath('A/B'),
-                                      sbox.ospath('A/C'),
-                                      sbox.ospath('A/mu'),
-                                      sbox.ospath('no-file'))
+  svntest.actions.run_and_verify_svn(None, [], [],'status',
+                                     sbox.ospath('iota'),
+                                     sbox.ospath('A/B'),
+                                     sbox.ospath('A/C'),
+                                     sbox.ospath('A/mu'),
+                                     sbox.ospath('no-file'))
 
 # Skip this test is a .svn dir exists in the root directory
 @Skip(lambda: os.path.exists("/%s" % svntest.main.get_admin_name()))

Modified: subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py?rev=1490380&r1=1490379&r2=1490380&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/tree_conflict_tests.py Thu Jun  6 17:47:49 2013
@@ -30,7 +30,7 @@ import sys, re, os, traceback
 # Our testing module
 import svntest
 from svntest import main, wc, verify
-from svntest.actions import run_and_verify_svn, run_and_verify_svn2
+from svntest.actions import run_and_verify_svn
 from svntest.actions import run_and_verify_commit
 from svntest.actions import run_and_verify_resolved
 from svntest.actions import run_and_verify_update
@@ -523,10 +523,8 @@ def ensure_tree_conflict(sbox, operation
       run_and_verify_resolved([victim_path])
 
       logger.debug("--- Checking that 'status' does not report a conflict")
-
-      exitcode, stdout, stderr = main.run_svn(True, 'status', victim_path)
-      verify.verify_exit_code(None, exitcode, 0)
-
+      exitcode, stdout, stderr = run_and_verify_svn(None, None, [],
+                                                'status', victim_path)
       for line in stdout:
         if line[6] == 'C': # and line.endswith(victim_path + '\n'):
           raise svntest.Failure("unexpected status C") # on victim_path