/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/intertree_implementations/__init__.py

merge rob@3771

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
from bzrlib.workingtree import (
43
43
    WorkingTreeFormat3,
44
44
    )
 
45
from bzrlib.workingtree_4 import WorkingTreeFormat4
45
46
 
46
47
 
47
48
def return_provided_trees(test_case, source, target):
53
54
 
54
55
    def make_to_branch_and_tree(self, relpath):
55
56
        """Make a to_workingtree_format branch and tree."""
56
 
        made_control = self.make_bzrdir(relpath, 
 
57
        made_control = self.make_bzrdir(relpath,
57
58
            format=self.workingtree_format_to._matchingbzrdir)
58
59
        made_control.create_repository()
59
60
        made_control.create_branch()
99
100
    test_case.addCleanup(preview.finalize)
100
101
    return source, preview.get_preview_tree()
101
102
 
 
103
 
 
104
def mutable_trees_to_revision_trees(test_case, source, target):
 
105
    """Convert both trees to repository based revision trees."""
 
106
    return (revision_tree_from_workingtree(test_case, source),
 
107
        revision_tree_from_workingtree(test_case, target))
 
108
 
 
109
 
102
110
def load_tests(basic_tests, module, loader):
103
111
    result = loader.suiteClass()
104
112
    # load the tests of the infrastructure for these tests
144
152
         default_tree_format,
145
153
         default_tree_format,
146
154
         mutable_trees_to_preview_trees))
 
155
    # CHKInventory does not have an InterTree optimiser class (yet).
 
156
    chk_tree_format = WorkingTreeFormat4()
 
157
    chk_tree_format._get_matchingbzrdir = \
 
158
        lambda:bzrlib.bzrdir.format_registry.make_bzrdir('development3')
 
159
    test_intertree_permutations.append(
 
160
        (InterTree.__name__ + "(CHKInventory)",
 
161
         InterTree,
 
162
         chk_tree_format,
 
163
         chk_tree_format,
 
164
         mutable_trees_to_revision_trees))
147
165
    adapter = InterTreeTestProviderAdapter(
148
166
        default_transport,
149
167
        # None here will cause a readonly decorator to be created