/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/test_transform.py

Add a test for the accelerator tree code path.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1941
1941
        self.addCleanup(target.unlock)
1942
1942
        self.assertEqual([], list(target.iter_changes(revision_tree)))
1943
1943
 
 
1944
    def test_build_tree_accelerator_tree_observes_sha1(self):
 
1945
        source = self.create_ab_tree()
 
1946
        sha1 = osutils.sha_string('A')
 
1947
        target = self.make_branch_and_tree('target')
 
1948
        target.lock_write()
 
1949
        self.addCleanup(target.unlock)
 
1950
        state = target.current_dirstate()
 
1951
        state._cutoff_time = time.time() + 60
 
1952
        build_tree(source.basis_tree(), target, source)
 
1953
        entry = state._get_entry(0, path_utf8='file1')
 
1954
        self.assertEqual(sha1, entry[1][0][1])
 
1955
 
1944
1956
    def test_build_tree_accelerator_tree_missing_file(self):
1945
1957
        source = self.create_ab_tree()
1946
1958
        os.unlink('source/file1')