You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by cm...@apache.org on 2012/06/12 11:40:44 UTC

svn commit: r1349215 - /subversion/trunk/subversion/tests/cmdline/stat_tests.py

Author: cmpilato
Date: Tue Jun 12 09:40:44 2012
New Revision: 1349215

URL: http://svn.apache.org/viewvc?rev=1349215&view=rev
Log:
Add a regression test for r1348822.

* subversion/tests/cmdline/stat_tests.py
  (status_depth_update_local_modifications): Add a test for "svn
    status -u" call with different --depth values on a working copy
    with local modifications.

Patch by: Dmitry Pavlenko <pavlenko{_AT_}tmatesoft.com>

Modified:
    subversion/trunk/subversion/tests/cmdline/stat_tests.py

Modified: subversion/trunk/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/stat_tests.py?rev=1349215&r1=1349214&r2=1349215&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/stat_tests.py Tue Jun 12 09:40:44 2012
@@ -1567,6 +1567,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):
@@ -1995,6 +2071,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,