~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

  • Committer: Aaron Bentley
  • Date: 2007-01-27 20:17:00 UTC
  • mto: (2255.6.1 dirstate)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: aaron.bentley@utoronto.ca-20070127201700-zpa95eucj24u8pyp
Enable nested commits

Show diffs side-by-side

added added

removed removed

Lines of Context:
608
608
        repository.add_inventory = raise_
609
609
        self.assertRaises(errors.NoSuchFile, tree.commit, message_callback=cb)
610
610
        self.assertFalse(cb.called)
 
611
 
 
612
    def test_nested_commit(self):
 
613
        """Commit in multiply-nested trees"""
 
614
        tree = self.make_branch_and_tree('.', format='experimental-knit3')
 
615
        subtree = self.make_branch_and_tree('subtree',
 
616
                                            format='experimental-knit3')
 
617
        subsubtree = self.make_branch_and_tree('subtree/subtree',
 
618
                                               format='experimental-knit3')
 
619
        subtree.add_reference(subsubtree)
 
620
        tree.add_reference(subtree)
 
621
        tree.commit('added reference', allow_pointless=False)
 
622
        self.assertIs(subsubtree.last_revision(), None,
 
623
                      'subsubtree was committed')
 
624
        self.assertIsNot(subtree.last_revision(), None,
 
625
                         'subtree was not committed')
 
626