~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Pool
  • Date: 2007-03-07 03:09:14 UTC
  • mto: (2321.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: mbp@sourcefrog.net-20070307030914-fb2gw9ae6lxcbbcd
Review cleanups: mostly updating or removing todo comments.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from bzrlib.osutils import file_kind
24
24
from bzrlib.tests.intertree_implementations import TestCaseWithTwoTrees
25
25
 
26
 
# TODO: test diff unversioned dir that exists
27
26
# TODO: test the include_root option.
28
27
# TODO: test that renaming a directory x->y does not emit a rename for the
29
28
#       child x/a->y/a.
30
29
# TODO: test that renaming a directory x-> does not emit a rename for the child
31
30
#        x/a -> y/a when a supplied_files argument gives either 'x/' or 'y/a'
32
31
#        -> that is, when the renamed parent is not processed by the function.
33
 
# TODO: include dangling in the diff output.
34
32
# TODO: test items are only emitted once when a specific_files list names a dir
35
33
#       whose parent is now a child.
36
 
# TODO: test require_versioned
37
 
# TODO: explicitly test specific_files listing a non-dir, and listing a symlink
38
 
#       (it should not follow the link)
39
34
# TODO: test specific_files when the target tree has a file and the source a
40
35
#       dir with children, same id and same path. 
41
36
# TODO: test comparisons between trees with different root ids. mbp 20070301
42
37
#
43
38
# TODO: More comparisons between trees with subtrees in different states.
 
39
#
 
40
# TODO: Many tests start out by setting the tree roots ids the same, maybe
 
41
#       that should just be the default for these tests, by changing
 
42
#       make_branch_and_tree.  mbp 20070307
44
43
 
45
44
class TestCompare(TestCaseWithTwoTrees):
46
45
 
928
927
        #   links_supported = False
929
928
        return self.mutable_trees_to_test_trees(tree1, tree2)
930
929
 
931
 
    def make_trees_with_subtrees(self):
932
 
        # trees containing tree references
933
 
        # TODO: might have to skip if the format can't do tree references
934
 
        tree1 = self.make_branch_and_tree('tree1')
935
 
        tree2 = self.make_to_branch_and_tree('tree2')
936
 
        self.build_tree(['tree1/fromdir/', 'tree1/common/',
937
 
            'tree2/todir/', 'tree2/common/'])
938
 
        # TODO: actually add the references
939
 
        return self.mutable_trees_to_test_trees(tree1, tree2)
940
 
 
941
930
    def test_versioned_symlinks(self):
942
931
        tree1, tree2 = self.make_trees_with_symlinks()
943
932
        root_id = tree1.path2id('')
1005
994
                          if f_id.endswith('_f-id'))
1006
995
        self.assertEqual(expected, self.do_iter_changes(tree1, tree2))
1007
996
 
1008
 
    def test_trees_with_subtrees(self):
1009
 
        tree1, tree2 = self.make_trees_with_subtrees()
1010
 
        self.do_iter_changes(tree1, tree2)
1011
 
 
1012
997
    def test_trees_with_deleted_dir(self):
1013
998
        tree1 = self.make_branch_and_tree('tree1')
1014
999
        tree2 = self.make_to_branch_and_tree('tree2')