Rev 2419: Change the default format for some tests from AB1 back to WorkingTreeFormat3 in http://sourcefrog.net/bzr/dirstate-plus-subtree

Martin Pool mbp at sourcefrog.net
Thu Mar 1 05:28:20 GMT 2007


At http://sourcefrog.net/bzr/dirstate-plus-subtree

------------------------------------------------------------
revno: 2419
revision-id: mbp at sourcefrog.net-20070301052819-5cbjhypodsf6ebgy
parent: mbp at sourcefrog.net-20070301040742-5vo1bk19e7bnzquc
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: dirstate-plus-subtree
timestamp: Thu 2007-03-01 16:28:19 +1100
message:
  Change the default format for some tests from AB1 back to WorkingTreeFormat3
modified:
  bzrlib/bzrdir.py               bzrdir.py-20060131065624-156dfea39c4387cb
  bzrlib/tests/intertree_implementations/__init__.py __init__.py-20060724101752-09ysswo1a92uqyoz-3
  bzrlib/tests/test_selftest.py  test_selftest.py-20051202044319-c110a115d8c0456a
  bzrlib/tests/tree_implementations/__init__.py __init__.py-20060717075546-420s7b0bj9hzeowi-2
=== modified file 'bzrlib/bzrdir.py'
--- a/bzrlib/bzrdir.py	2007-02-26 14:24:46 +0000
+++ b/bzrlib/bzrdir.py	2007-03-01 05:28:19 +0000
@@ -2234,11 +2234,13 @@
     branch_format='bzrlib.branch.BzrBranchFormat5',
     tree_format='bzrlib.workingtree.WorkingTreeFormat3'
     )
+
 format_registry.register_metadir('experimental-knit3',
     'bzrlib.repofmt.knitrepo.RepositoryFormatKnit3',
     'Experimental successor to knit2.  Use at your own risk.', 
     branch_format='bzrlib.branch.BzrBranchFormat5',
     tree_format='bzrlib.workingtree.WorkingTreeFormatAB1')
+
 format_registry.register_metadir('experimental-branch6',
     'bzrlib.repofmt.knitrepo.RepositoryFormatKnit1',
     'Experimental successor to knit.  Use at your own risk.',

=== modified file 'bzrlib/tests/intertree_implementations/__init__.py'
--- a/bzrlib/tests/intertree_implementations/__init__.py	2007-02-24 16:11:32 +0000
+++ b/bzrlib/tests/intertree_implementations/__init__.py	2007-03-01 05:28:19 +0000
@@ -36,9 +36,11 @@
     TestCaseWithTree,
     )
 from bzrlib.tree import InterTree
-from bzrlib.workingtree import (WorkingTreeFormatAB1,
-                                WorkingTreeTestProviderAdapter,
-                                )
+from bzrlib.workingtree import (
+    WorkingTreeFormat3,
+    WorkingTreeFormatAB1,
+    WorkingTreeTestProviderAdapter,
+    )
 
 
 def return_provided_trees(source, target):
@@ -89,7 +91,7 @@
     # load the tests of the infrastructure for these tests
     result.addTests(loader.loadTestsFromModuleNames(['bzrlib.tests.intertree_implementations']))
 
-    default_tree_format = WorkingTreeFormatAB1()
+    default_tree_format = WorkingTreeFormat3()
     test_intertree_implementations = [
         'bzrlib.tests.intertree_implementations.test_compare',
         ]

=== modified file 'bzrlib/tests/test_selftest.py'
--- a/bzrlib/tests/test_selftest.py	2007-02-24 16:11:32 +0000
+++ b/bzrlib/tests/test_selftest.py	2007-03-01 05:28:19 +0000
@@ -354,7 +354,7 @@
             return_parameter,
             revision_tree_from_workingtree
             )
-        from bzrlib.workingtree import WorkingTreeFormat, WorkingTreeFormatAB1
+        from bzrlib.workingtree import WorkingTreeFormat, WorkingTreeFormat3
         input_test = TestTreeProviderAdapter(
             "test_adapted_tests")
         server1 = "a"
@@ -364,7 +364,9 @@
         suite = adapter.adapt(input_test)
         tests = list(iter(suite))
         self.assertEqual(4, len(tests))
-        default_format = WorkingTreeFormatAB1
+        # this must match the default format setp up in
+        # TreeTestProviderAdapter.adapt
+        default_format = WorkingTreeFormat3
         self.assertEqual(tests[0].workingtree_format, formats[0][0])
         self.assertEqual(tests[0].bzrdir_format, formats[0][1])
         self.assertEqual(tests[0].transport_server, server1)

=== modified file 'bzrlib/tests/tree_implementations/__init__.py'
--- a/bzrlib/tests/tree_implementations/__init__.py	2007-03-01 04:07:42 +0000
+++ b/bzrlib/tests/tree_implementations/__init__.py	2007-03-01 05:28:19 +0000
@@ -40,11 +40,13 @@
                           )
 from bzrlib.tests.bzrdir_implementations.test_bzrdir import TestCaseWithBzrDir
 from bzrlib.revisiontree import RevisionTree
-from bzrlib.workingtree import (WorkingTreeFormat,
-                                WorkingTreeFormatAB1,
-                                WorkingTreeTestProviderAdapter,
-                                _legacy_formats,
-                                )
+from bzrlib.workingtree import (
+    WorkingTreeFormat,
+    WorkingTreeFormat3,
+    WorkingTreeFormatAB1,
+    WorkingTreeTestProviderAdapter,
+    _legacy_formats,
+    )
 from bzrlib.workingtree_4 import (
     DirStateRevisionTree,
     WorkingTreeFormat4,
@@ -274,7 +276,9 @@
         for adapted_test in result:
             # for working tree adapted tests, preserve the tree
             adapted_test.workingtree_to_test_tree = return_parameter
-        default_format = WorkingTreeFormatAB1()
+        # this is the default in that it's used to test the generic InterTree
+        # code.
+        default_format = WorkingTreeFormat3()
         revision_tree_test = self._clone_test(
             test,
             default_format._matchingbzrdir, 
@@ -282,6 +286,7 @@
             RevisionTree.__name__)
         revision_tree_test.workingtree_to_test_tree = revision_tree_from_workingtree
         result.addTest(revision_tree_test)
+        # also explicity test WorkingTree4 against everything
         dirstate_format = WorkingTreeFormat4()
         dirstate_revision_tree_test = self._clone_test(
             test,




More information about the bazaar-commits mailing list