~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_subsume.py

  • Committer: Robert Collins
  • Date: 2007-03-06 08:41:40 UTC
  • mto: (2321.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: robertc@robertcollins.net-20070306084140-10rlo4bozpfvuebh
Get _iter_changes on dirstate passing the subtree tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        base_tree, sub_tree = self.make_trees()
62
62
        assert base_tree.get_root_id() != sub_tree.get_root_id()
63
63
        sub_root_id = sub_tree.get_root_id()
 
64
        # this test checks the subdir is removed, so it needs to know the
 
65
        # control directory; that changes rarely so just hardcode (and check)
 
66
        # it is correct.
 
67
        self.failUnlessExists('tree/subtree/.bzr')
64
68
        base_tree.subsume(sub_tree)
65
69
        self.assertEqual(['tree-1', 'subtree-1'], base_tree.get_parent_ids())
66
70
        self.assertEqual(sub_root_id, base_tree.path2id('subtree'))
67
71
        self.assertEqual('file2-id', base_tree.path2id('subtree/file2'))
68
 
        sub_bzrdir = bzrdir.BzrDir.open('tree/subtree')
69
72
        # subsuming the tree removes the control directory, so you can't open
70
 
        # the workingtree or branch
71
 
        import pdb;pdb.set_trace()
72
 
        self.assertRaises(errors.NoWorkingTree, sub_bzrdir.open_workingtree)
73
 
        self.assertRaises(errors.NotBranchError, sub_bzrdir.open_branch)
 
73
        # it.
74
74
        self.failIfExists('tree/subtree/.bzr')
75
75
        file2 = open('tree/subtree/file2', 'rb')
76
76
        try: