/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: Aaron Bentley
  • Date: 2006-09-28 13:48:10 UTC
  • mfrom: (2049 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2268.
  • Revision ID: abentley@panoramicfeedback.com-20060928134810-2c8ae086a4a70f43
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import os
19
19
 
20
20
import bzrlib
21
 
from bzrlib import osutils, tests
 
21
from bzrlib import errors, osutils, tests
22
22
from bzrlib.tests import TestCaseWithTransport
23
23
from bzrlib.branch import Branch
24
24
from bzrlib.bzrdir import BzrDir, BzrDirMetaFormat1
437
437
        # do a merge into the bound branch from other, and then change the
438
438
        # content file locally to force a new revision (rather than using the
439
439
        # revision from other). This forces extra processing in commit.
440
 
        self.merge(other_tree.branch, bound_tree)
 
440
        bound_tree.merge_from_branch(other_tree.branch)
441
441
        self.build_tree_contents([('bound/content_file', 'change in bound\n')])
442
442
 
443
443
        # before #34959 was fixed, this failed with 'revision not present in
491
491
            other_tree.commit('modify all sample files and dirs.')
492
492
        finally:
493
493
            other_tree.unlock()
494
 
        self.merge(other_tree.branch, this_tree)
 
494
        this_tree.merge_from_branch(other_tree.branch)
495
495
        reporter = CapturingReporter()
496
496
        this_tree.commit('do the commit', reporter=reporter)
497
497
        self.assertEqual([
589
589
        os.mkdir('name')
590
590
        tree.commit('file to directory')
591
591
        self.assertEqual('directory', tree.basis_tree().kind('a-file-id'))
 
592
 
 
593
    def test_commit_unversioned_specified(self):
 
594
        """Commit should raise if specified files isn't in basis or worktree"""
 
595
        tree = self.make_branch_and_tree('.')
 
596
        self.assertRaises(errors.PathsNotVersionedError, tree.commit, 
 
597
                          'message', specific_files=['bogus'])