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 2011/07/12 18:39:28 UTC

svn commit: r1145666 - in /subversion/trunk/subversion: libsvn_client/status.c tests/cmdline/stat_tests.py

Author: rhuijben
Date: Tue Jul 12 16:39:28 2011
New Revision: 1145666

URL: http://svn.apache.org/viewvc?rev=1145666&view=rev
Log:
Remove two obsolete checks from the status walker. These checks are obsolete
after switching to abspaths and a single-db that can be multiple directories
up.

* subversion/libsvn_client/status.c
  (svn_client_status5): Remove the check that a directory in a working copy
    really exists (no longer true for deleted directories) and also remove
    a special check for the .. path that had to be handled differently with
    access batons.

* subversion/tests/cmdline/stat_tests.py
  (status_on_unversioned_dotdot): Make sure the parent of the target is not a
    versioned directory, because when it is the normal behavior of just showing
    status is valid.

Modified:
    subversion/trunk/subversion/libsvn_client/status.c
    subversion/trunk/subversion/tests/cmdline/stat_tests.py

Modified: subversion/trunk/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_client/status.c?rev=1145666&r1=1145665&r2=1145666&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_client/status.c (original)
+++ subversion/trunk/subversion/libsvn_client/status.c Tue Jul 12 16:39:28 2011
@@ -282,13 +282,12 @@ svn_client_status5(svn_revnum_t *result_
 
   SVN_ERR(svn_dirent_get_absolute(&target_abspath, path, pool));
   {
-    svn_node_kind_t kind, disk_kind;
+    svn_node_kind_t kind;
 
-    SVN_ERR(svn_io_check_path(target_abspath, &disk_kind, pool));
     SVN_ERR(svn_wc_read_kind(&kind, ctx->wc_ctx, target_abspath, FALSE, pool));
 
-    /* Dir must be an existing directory or the status editor fails */
-    if (kind == svn_node_dir && disk_kind == svn_node_dir)
+    /* Dir must be a working copy directory or the status editor fails */
+    if (kind == svn_node_dir)
       {
         dir_abspath = target_abspath;
         target_basename = "";
@@ -313,15 +312,6 @@ svn_client_status5(svn_revnum_t *result_
                                          _("'%s' is not a working copy"),
                                          svn_dirent_local_style(path, pool));
               }
-
-            /* Check for issue #1617 and stat_tests.py 14
-               "status on '..' where '..' is not versioned". */
-            if (strcmp(path, "..") == 0)
-              {
-                return svn_error_createf(SVN_ERR_WC_NOT_WORKING_COPY, NULL,
-                                         _("'%s' is not a working copy"),
-                                         svn_dirent_local_style(path, pool));
-              }
           }
       }
   }

Modified: subversion/trunk/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/stat_tests.py?rev=1145666&r1=1145665&r2=1145666&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/stat_tests.py Tue Jul 12 16:39:28 2011
@@ -797,13 +797,14 @@ def status_on_unversioned_dotdot(sbox):
   sbox.build(read_only = True)
   wc_dir = sbox.wc_dir
 
-  new_dir = os.path.join(wc_dir, 'new_dir')
-  new_subdir = os.path.join(new_dir, 'new_subdir')
+  new_dir = sbox.ospath('new')
+  new_sub = sbox.ospath('new/sub')
+  new_subsub = sbox.ospath('new/sub/sub')
   os.mkdir(new_dir)
-  os.mkdir(new_subdir)
-
-  os.chdir(new_subdir)
+  os.mkdir(new_sub)
+  os.mkdir(new_subsub)
 
+  os.chdir(new_subsub)
   exit_code, out, err = svntest.main.run_svn(1, 'st', '..')
   for line in err:
     if line.find('svn: warning: W155007: \'..\' is not a working copy') != -1: