~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

(broken) merge aaron's workingtree format changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
679
679
        repository.add_inventory = raise_
680
680
        self.assertRaises(errors.NoSuchFile, tree.commit, message_callback=cb)
681
681
        self.assertFalse(cb.called)
 
682
 
 
683
    def test_nested_commit(self):
 
684
        """Commit in multiply-nested trees"""
 
685
        tree = self.make_branch_and_tree('.', format='experimental-knit3')
 
686
        subtree = self.make_branch_and_tree('subtree',
 
687
                                            format='experimental-knit3')
 
688
        subsubtree = self.make_branch_and_tree('subtree/subtree',
 
689
                                               format='experimental-knit3')
 
690
        subtree.add_reference(subsubtree)
 
691
        tree.add_reference(subtree)
 
692
        tree.commit('added reference', allow_pointless=False)
 
693
        self.assertIs(subsubtree.last_revision(), None,
 
694
                      'subsubtree was committed')
 
695
        self.assertIsNot(subtree.last_revision(), None,
 
696
                         'subtree was not committed')
 
697