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 2010/07/30 21:10:15 UTC

svn commit: r980929 [2/2] - in /subversion/branches/issue-2779-dev: ./ subversion/libsvn_client/ subversion/libsvn_diff/ subversion/libsvn_fs_fs/ subversion/libsvn_ra_serf/ subversion/libsvn_wc/ subversion/svnrdump/ subversion/tests/cmdline/ subversion...

Modified: subversion/branches/issue-2779-dev/subversion/tests/cmdline/stat_tests.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/tests/cmdline/stat_tests.py?rev=980929&r1=980928&r2=980929&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/branches/issue-2779-dev/subversion/tests/cmdline/stat_tests.py Fri Jul 30 19:10:14 2010
@@ -175,39 +175,67 @@ def status_type_change(sbox):
   os.rename('A', 'iota')
   os.rename('was_iota', 'A')
 
-  exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
-                                                              'status')
-  if len(output) != 2:
-    raise svntest.Failure
-  for line in output:
-    if not re.match("~ +(iota|A)", line):
-      raise svntest.Failure
+  expected_output = [
+        '~       A\n',
+        '~       iota\n',
+    ]
+
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'status')
 
   # Now change the file that is obstructing the versioned dir into an
   # unversioned dir.
   os.remove('A')
   os.mkdir('A')
 
-  exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
-                                                              'status')
-  if len(output) != 2:
-    raise svntest.Failure
-  for line in output:
-    if not re.match("~ +(iota|A)", line):
-      raise svntest.Failure
+  if svntest.main.wc_is_singledb('.'):
+    # A is a directory again, so it is no longer missing, but it's
+    # descendants are
+    expected_output = [
+        '!       A/mu\n',
+        '!       A/B\n',
+        '!       A/B/lambda\n',
+        '!       A/B/E\n',
+        '!       A/B/E/alpha\n',
+        '!       A/B/E/beta\n',
+        '!       A/B/F\n',
+        '!       A/C\n',
+        '!       A/D\n',
+        '!       A/D/gamma\n',
+        '!       A/D/G\n',
+        '!       A/D/G/rho\n',
+        '!       A/D/G/pi\n',
+        '!       A/D/G/tau\n',
+        '!       A/D/H\n',
+        '!       A/D/H/chi\n',
+        '!       A/D/H/omega\n',
+        '!       A/D/H/psi\n',
+        '~       iota\n',
+    ]
+    # Fix separator for Windows
+    expected_output = [s.replace('/', os.path.sep) for s in expected_output]
+  else:
+    # A misses its administrative area, so it is missing
+    expected_output = [
+        '~       A\n',
+        '~       iota\n',
+    ]
+
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'status')
 
   # Now change the versioned dir that is obstructing the file into an
   # unversioned dir.
   svntest.main.safe_rmtree('iota')
   os.mkdir('iota')
 
-  exit_code, output, err = svntest.actions.run_and_verify_svn(None, None, [],
-                                                              'status')
-  if len(output) != 2:
-    raise svntest.Failure
-  for line in output:
-    if not re.match("~ +(iota|A)", line):
-      raise svntest.Failure
+  if not svntest.main.wc_is_singledb('.'):
+    # A misses its administrative area, so it is still missing and
+    # iota is still obstructed
+    expected_output = [
+        '~       A\n',
+        '~       iota\n',
+    ]
+
+  svntest.actions.run_and_verify_svn(None, expected_output, [], 'status')
 
 #----------------------------------------------------------------------
 
@@ -907,10 +935,29 @@ def status_missing_dir(sbox):
   # ok, blow away the A/D/G directory
   svntest.main.safe_rmtree(a_d_g)
 
-  expected = svntest.verify.UnorderedOutput(["!       " + a_d_g + "\n"])
+  if svntest.main.wc_is_singledb(wc_dir):
+    expected = [
+                 '!       A/D/G\n',
+                 '!       A/D/G/rho\n',
+                 '!       A/D/G/pi\n',
+                 '!       A/D/G/tau\n',
+               ]
+    expected = [ s.replace('A/D/G', a_d_g).replace('/', os.path.sep)
+                 for s in expected ]
+  else:
+    expected = ["!       " + a_d_g + "\n"]
+
   svntest.actions.run_and_verify_svn(None, expected, [], "status", wc_dir)
 
-  expected = svntest.verify.UnorderedOutput(
+  if svntest.main.wc_is_singledb(wc_dir):
+    expected = svntest.verify.UnorderedOutput([
+          "!                1   " + a_d_g + "\n",
+          "!                1   " + os.path.join(a_d_g, "rho") + "\n",
+          "!                1   " + os.path.join(a_d_g, "pi") + "\n",
+          "!                1   " + os.path.join(a_d_g, "tau") + "\n",
+          "Status against revision:      1\n" ])
+  else:
+    expected = svntest.verify.UnorderedOutput(
          ["        *            " + os.path.join(a_d_g, "pi") + "\n",
           "        *            " + os.path.join(a_d_g, "rho") + "\n",
           "        *            " + os.path.join(a_d_g, "tau") + "\n",
@@ -923,9 +970,18 @@ def status_missing_dir(sbox):
                                      "status", "-u", wc_dir)
 
   # Finally run an explicit status request directly on the missing directory.
-  svntest.actions.run_and_verify_svn(None,
-                                     ["!       " + a_d_g + "\n"],
-                                     [], "status", a_d_g)
+  if svntest.main.wc_is_singledb(wc_dir):
+    expected = [
+                  "!       A/D/G\n",
+                  "!       A/D/G/rho\n",
+                  "!       A/D/G/pi\n",
+                  "!       A/D/G/tau\n",
+               ]
+    expected = [ s.replace('A/D/G', a_d_g).replace('/', os.path.sep)
+                 for s in expected ]
+  else:
+    expected = ["!       " + a_d_g + "\n"]
+  svntest.actions.run_and_verify_svn(None, expected, [], "status", a_d_g)
 
 def status_add_plus_conflict(sbox):
   "status on conflicted added file"
@@ -1488,6 +1544,8 @@ def status_dash_u_deleted_directories(sb
                                      "status", "-u", "B")
 
   # again, but now from inside B, should give the same output
+  if not os.path.exists('B'):
+    os.mkdir('B')
   os.chdir("B")
   expected = svntest.verify.UnorderedOutput(
          ["D                1   %s\n" % ".",
@@ -1545,7 +1603,35 @@ def status_dash_u_type_change(sbox):
   svntest.main.safe_rmtree('A')
   os.mkdir('A')
 
-  expected = svntest.verify.UnorderedOutput(
+  if svntest.main.wc_is_singledb('.'):
+    output =[
+               "!                1   A/mu\n",
+               "!                1   A/B\n",
+               "!                1   A/B/lambda\n",
+               "!                1   A/B/E\n",
+               "!                1   A/B/E/alpha\n",
+               "!                1   A/B/E/beta\n",
+               "!                1   A/B/F\n",
+               "!                1   A/C\n",
+               "!                1   A/D\n",
+               "!                1   A/D/gamma\n",
+               "!                1   A/D/G\n",
+               "!                1   A/D/G/rho\n",
+               "!                1   A/D/G/pi\n",
+               "!                1   A/D/G/tau\n",
+               "!                1   A/D/H\n",
+               "!                1   A/D/H/chi\n",
+               "!                1   A/D/H/omega\n",
+               "!                1   A/D/H/psi\n",
+               "~                1   iota\n",
+               "Status against revision:      1\n"
+            ]
+
+    expected = svntest.verify.UnorderedOutput(
+                        [s.replace('/', os.path.sep)
+                            for s in  output])
+  else:
+    expected = svntest.verify.UnorderedOutput(
          ["~                1   iota\n",
           "~               ?    A\n",
           "Status against revision:      1\n" ])

Modified: subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/wc.py
URL: http://svn.apache.org/viewvc/subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/wc.py?rev=980929&r1=980928&r2=980929&view=diff
==============================================================================
--- subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/branches/issue-2779-dev/subversion/tests/cmdline/svntest/wc.py Fri Jul 30 19:10:14 2010
@@ -825,7 +825,6 @@ def text_base_path(file_path):
     root_path = head
     relpath = os.path.join(tail, relpath).replace(os.sep, '/')
 
-  print('%s : %s' %(db_path, relpath))
   c = db.cursor()
   c.execute("""select checksum from working_node
                where local_relpath = '""" + relpath + """'""")