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

  • Committer: Robert Collins
  • Date: 2007-06-04 00:51:54 UTC
  • mfrom: (2504 +trunk)
  • mto: (2507.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 2505.
  • Revision ID: robertc@robertcollins.net-20070604005154-yvx2q8jnwiprw6du
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
681
681
        repository.add_inventory = raise_
682
682
        self.assertRaises(errors.NoSuchFile, tree.commit, message_callback=cb)
683
683
        self.assertFalse(cb.called)
 
684
 
 
685
    def test_selected_file_merge_commit(self):
 
686
        """Ensure the correct error is raised"""
 
687
        tree = self.make_branch_and_tree('foo')
 
688
        # pending merge would turn into a left parent
 
689
        tree.commit('commit 1')
 
690
        tree.add_parent_tree_id('example')
 
691
        self.build_tree(['foo/bar', 'foo/baz'])
 
692
        tree.add(['bar', 'baz'])
 
693
        err = self.assertRaises(errors.CannotCommitSelectedFileMerge,
 
694
            tree.commit, 'commit 2', specific_files=['bar', 'baz'])
 
695
        self.assertEqual(['bar', 'baz'], err.files)
 
696
        self.assertEqual('Selected-file commit of merges is not supported'
 
697
                         ' yet: files bar, baz', str(err))