subversion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From svn-r...@apache.org
Subject svn commit: r1355701 - in /subversion/branches/1.7.x: ./ STATUS subversion/libsvn_client/status.c subversion/tests/cmdline/stat_tests.py
Date Sat, 30 Jun 2012 11:15:18 GMT
Author: svn-role
Date: Sat Jun 30 11:15:16 2012
New Revision: 1355701

URL: http://svn.apache.org/viewvc?rev=1355701&view=rev
Log:
Reintegrate the 1.7.x-r1348822 branch:

 * r1348822, r1349215
   Fix "svn status -u --depth empty FILE"
   Justification:
     Modified file not shown as modified by above command.
     Simple fix, test included.
   Branch:
     ^/subversion/branches/1.7.x-r1348822
   Votes:
     +1: stsp, gstein, rhuijben

Modified:
    subversion/branches/1.7.x/   (props changed)
    subversion/branches/1.7.x/STATUS
    subversion/branches/1.7.x/subversion/libsvn_client/status.c
    subversion/branches/1.7.x/subversion/tests/cmdline/stat_tests.py

Propchange: subversion/branches/1.7.x/
------------------------------------------------------------------------------
  Merged /subversion/trunk:r1348822,1349215
  Merged /subversion/branches/1.7.x-r1348822:r1348878-1355700

Modified: subversion/branches/1.7.x/STATUS
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/STATUS?rev=1355701&r1=1355700&r2=1355701&view=diff
==============================================================================
--- subversion/branches/1.7.x/STATUS (original)
+++ subversion/branches/1.7.x/STATUS Sat Jun 30 11:15:16 2012
@@ -125,16 +125,6 @@ Veto-blocked changes:
 Approved changes:
 =================
 
- * r1348822, r1349215
-   Fix "svn status -u --depth empty FILE"
-   Justification:
-     Modified file not shown as modified by above command.
-     Simple fix, test included.
-   Branch:
-     ^/subversion/branches/1.7.x-r1348822
-   Votes:
-     +1: stsp, gstein, rhuijben
-
  * r1353572
    Fix a bug in propset which could prevent updating cached values related
    to EOL expansion in wc.db.

Modified: subversion/branches/1.7.x/subversion/libsvn_client/status.c
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/libsvn_client/status.c?rev=1355701&r1=1355700&r2=1355701&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/libsvn_client/status.c (original)
+++ subversion/branches/1.7.x/subversion/libsvn_client/status.c Sat Jun 30 11:15:16 2012
@@ -299,7 +299,12 @@ svn_client_status5(svn_revnum_t *result_
         target_basename = svn_dirent_basename(target_abspath, NULL);
         dir = svn_dirent_dirname(path, pool);
 
-        if (kind != svn_node_file)
+        if (kind == svn_node_file)
+          {
+            if (depth == svn_depth_empty)
+              depth = svn_depth_files;
+          }
+        else
           {
             err = svn_wc_read_kind(&kind, ctx->wc_ctx, dir_abspath, FALSE,
                                    pool);

Modified: subversion/branches/1.7.x/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/1.7.x/subversion/tests/cmdline/stat_tests.py?rev=1355701&r1=1355700&r2=1355701&view=diff
==============================================================================
--- subversion/branches/1.7.x/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/1.7.x/subversion/tests/cmdline/stat_tests.py Sat Jun 30 11:15:16 2012
@@ -1557,6 +1557,82 @@ def status_depth_update(sbox):
 
 
 #----------------------------------------------------------------------
+def status_depth_update_local_modifications(sbox):
+  "run 'status --depth=X -u' with local changes"
+  
+  sbox.build()
+  wc_dir = sbox.wc_dir
+  A_path = sbox.ospath('A')
+  D_path = os.path.join(A_path, 'D')
+
+  mu_path = os.path.join(A_path, 'mu')
+  gamma_path = os.path.join(D_path, 'gamma')
+
+  svntest.main.run_svn(None, 'propset', 'svn:test', 'value', A_path)
+  svntest.main.run_svn(None, 'propset', 'svn:test', 'value', D_path)
+
+  svntest.main.file_append(mu_path, 'modified')
+  svntest.main.file_append(gamma_path, 'modified')
+
+  # depth=empty
+  expected = svntest.verify.UnorderedOutput(
+                  [" M               1   %s\n" % A_path,
+                   "Status against revision:      1\n"])
+
+  svntest.actions.run_and_verify_svn(None,
+                                     expected,
+                                     [],
+                                     "status", "-u", "--depth=empty", A_path)
+
+  expected = svntest.verify.UnorderedOutput(
+                  ["M                1   %s\n" % mu_path,
+                   "Status against revision:      1\n"])
+
+  svntest.actions.run_and_verify_svn(None,
+                                     expected,
+                                     [],
+                                     "status", "-u", "--depth=empty", mu_path)
+
+  # depth=files
+  expected = svntest.verify.UnorderedOutput(
+                  ["M                1   %s\n" % mu_path,
+                   " M               1   %s\n" % A_path,
+                   "Status against revision:      1\n"])
+
+  svntest.actions.run_and_verify_svn(None,
+                                     expected,
+                                     [],
+                                     "status", "-u", "--depth=files",
+                                     A_path)
+
+  # depth=immediates
+  expected = svntest.verify.UnorderedOutput(
+                  [" M               1   %s\n" % A_path,
+                   " M               1   %s\n" % D_path,
+                   "M                1   %s\n" % mu_path,
+                   "Status against revision:      1\n"])
+
+  svntest.actions.run_and_verify_svn(None,
+                                     expected,
+                                     [],
+                                     "status", "-u", "--depth=immediates",
+                                     A_path)
+
+  # depth=infinity (the default)
+  expected = svntest.verify.UnorderedOutput(
+                  [" M               1   %s\n" % A_path,
+                   " M               1   %s\n" % D_path,
+                   "M                1   %s\n" % mu_path,
+                   "M                1   %s\n" % gamma_path,
+                   "Status against revision:      1\n"])
+
+  svntest.actions.run_and_verify_svn(None,
+                                     expected,
+                                     [],
+                                     "status", "-u", "--depth=infinity",
+                                     A_path)
+
+#----------------------------------------------------------------------
 # Test for issue #2420
 @Issue(2420)
 def status_dash_u_deleted_directories(sbox):
@@ -1958,6 +2034,7 @@ test_list = [ None,
               status_dash_u_deleted_directories,
               status_depth_local,
               status_depth_update,
+              status_depth_update_local_modifications,
               status_dash_u_type_change,
               status_with_tree_conflicts,
               status_nested_wc_old_format,



Mime
View raw message