~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_commit.py

  • Committer: Jelmer Vernooij
  • Date: 2012-04-16 11:08:11 UTC
  • mfrom: (6521 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6522.
  • Revision ID: jelmer@samba.org-20120416110811-0y996ihqy9o2bb1t
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    ignores,
31
31
    msgeditor,
32
32
    )
33
 
from bzrlib.bzrdir import BzrDir
 
33
from bzrlib.controldir import ControlDir
34
34
from bzrlib.tests import (
35
35
    test_foreign,
36
36
    features,
117
117
    def prepare_simple_history(self):
118
118
        """Prepare and return a working tree with one commit of one file"""
119
119
        # Commit with modified file should say so
120
 
        wt = BzrDir.create_standalone_workingtree('.')
 
120
        wt = ControlDir.create_standalone_workingtree('.')
121
121
        self.build_tree(['hello.txt', 'extra.txt'])
122
122
        wt.add(['hello.txt'])
123
123
        wt.commit(message='added')
225
225
    def test_verbose_commit_with_unknown(self):
226
226
        """Unknown files should not be listed by default in verbose output"""
227
227
        # Is that really the best policy?
228
 
        wt = BzrDir.create_standalone_workingtree('.')
 
228
        wt = ControlDir.create_standalone_workingtree('.')
229
229
        self.build_tree(['hello.txt', 'extra.txt'])
230
230
        wt.add(['hello.txt'])
231
231
        out,err = self.run_bzr('commit -m added')
628
628
            "Commit refused."],
629
629
            'commit -m add-b --fixes=123',
630
630
            working_dir='tree')
631
 
        tree.branch.get_config().set_user_option("bugtracker", "lp")
 
631
        tree.branch.get_config_stack().set("bugtracker", "lp")
632
632
        self.run_bzr('commit -m hello --fixes=234 tree/hello.txt')
633
633
        last_rev = tree.branch.repository.get_revision(tree.last_revision())
634
634
        self.assertEqual('https://launchpad.net/bugs/234 fixed',
757
757
        # "UnlockableTransport error trying to commit in checkout of readonly
758
758
        # branch"
759
759
        self.make_branch('master')
760
 
        master = BzrDir.open_from_transport(
 
760
        master = ControlDir.open_from_transport(
761
761
            self.get_readonly_transport('master')).open_branch()
762
762
        master.create_checkout('checkout')
763
763
        out, err = self.run_bzr(['commit', '--unchanged', '-mfoo', 'checkout'],
887
887
        # being too low. If rpc_count increases, more network roundtrips have
888
888
        # become necessary for this use case. Please do not adjust this number
889
889
        # upwards without agreement from bzr's network support maintainers.
890
 
        self.assertLength(214, self.hpss_calls)
 
890
        self.assertLength(211, self.hpss_calls)
891
891
        self.assertLength(2, self.hpss_connections)
892
892
        self.expectFailure("commit still uses VFS calls",
893
893
            self.assertThat, self.hpss_calls, ContainsNoVfsCalls)