You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by ph...@apache.org on 2010/08/03 14:18:56 UTC

svn commit: r981839 - in /subversion/trunk/subversion/tests/cmdline: stat_tests.py svntest/wc.py

Author: philip
Date: Tue Aug  3 12:18:56 2010
New Revision: 981839

URL: http://svn.apache.org/viewvc?rev=981839&view=rev
Log:
In single-db the added/normal state of the node is available for missing
directories, while in per-directory it is simply missing.

* subversion/tests/cmdline/svntest/wc.py
  (missing_dir_in_anchor): Adjust expected status in single-db.

* subversion/tests/cmdline/stat_tests.py
  (tweak_for_entries_compare): Use entry_status.
  (StateItem): Add .entry_status.

Modified:
    subversion/trunk/subversion/tests/cmdline/stat_tests.py
    subversion/trunk/subversion/tests/cmdline/svntest/wc.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=981839&r1=981838&r2=981839&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/stat_tests.py (original)
+++ subversion/trunk/subversion/tests/cmdline/stat_tests.py Tue Aug  3 12:18:56 2010
@@ -831,8 +831,11 @@ def missing_dir_in_anchor(sbox):
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
   # At one point this caused a "foo not locked" error
+  is_singledb = svntest.main.wc_is_singledb(foo_path)
   svntest.main.safe_rmtree(foo_path)
   expected_status.tweak('foo', status='! ', wc_rev='?')
+  if is_singledb:
+    expected_status.tweak('foo', entry_status='A ', entry_rev='0')
   svntest.actions.run_and_verify_status(wc_dir, expected_status)
 
 

Modified: subversion/trunk/subversion/tests/cmdline/svntest/wc.py
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/tests/cmdline/svntest/wc.py?rev=981839&r1=981838&r2=981839&view=diff
==============================================================================
--- subversion/trunk/subversion/tests/cmdline/svntest/wc.py (original)
+++ subversion/trunk/subversion/tests/cmdline/svntest/wc.py Tue Aug  3 12:18:56 2010
@@ -323,6 +323,10 @@ class State:
           if item.entry_rev is not None:
             item.wc_rev = item.entry_rev
             item.entry_rev = None
+          # status might vary as well, e.g. when a directory is missing
+          if item.entry_status is not None:
+            item.status = item.entry_status
+            item.entry_status = None
       if item.writelocked:
         # we don't contact the repository, so our only information is what
         # is in the working copy. 'K' means we have one and it matches the
@@ -612,7 +616,8 @@ class StateItem:
   """
 
   def __init__(self, contents=None, props=None,
-               status=None, verb=None, wc_rev=None, entry_rev=None,
+               status=None, verb=None, wc_rev=None,
+               entry_rev=None, entry_status=None,
                locked=None, copied=None, switched=None, writelocked=None,
                treeconflict=None):
     # provide an empty prop dict if it wasn't provided
@@ -635,9 +640,10 @@ class StateItem:
     self.verb = verb
     # The base revision number of the node in the WC, as a string.
     self.wc_rev = wc_rev
-    # This one will be set when we expect the wc_rev to differ from the one
-    # found ni the entries code.
+    # These will be set when we expect the wc_rev/status to differ from those
+    # found in the entries code.
     self.entry_rev = entry_rev
+    self.entry_status = entry_status
     # For the following attributes, the value is the status character of that
     # field from 'svn status', except using value None instead of status ' '.
     self.locked = locked



Re: svn commit: r981839 - in /subversion/trunk/subversion/tests/cmdline: stat_tests.py svntest/wc.py

Posted by Greg Stein <gs...@gmail.com>.
On Tue, Aug 3, 2010 at 08:18,  <ph...@apache.org> wrote:
> Author: philip
> Date: Tue Aug  3 12:18:56 2010
> New Revision: 981839
>
> URL: http://svn.apache.org/viewvc?rev=981839&view=rev
> Log:
> In single-db the added/normal state of the node is available for missing
> directories, while in per-directory it is simply missing.
>
> * subversion/tests/cmdline/svntest/wc.py
>  (missing_dir_in_anchor): Adjust expected status in single-db.
>
> * subversion/tests/cmdline/stat_tests.py
>  (tweak_for_entries_compare): Use entry_status.
>  (StateItem): Add .entry_status.

This kind of change is better. We can demonstrate precisely where our
new code varies from the old code, and produces a different output.

Cheers,
-g