~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Ross Lagerwall
  • Date: 2012-08-07 06:32:51 UTC
  • mto: (6437.63.5 2.5)
  • mto: This revision was merged to the branch mainline in revision 6558.
  • Revision ID: rosslagerwall@gmail.com-20120807063251-x9p03ghg2ws8oqjc
Add bzrlib/locale to .bzrignore

bzrlib/locale is generated with ./setup.py build_mo which is in turn called
by ./setup.py build

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2012, 2016 Canonical Ltd
 
1
# Copyright (C) 2006-2012 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
30
30
    ignores,
31
31
    msgeditor,
32
32
    )
33
 
from bzrlib.controldir import ControlDir
 
33
from bzrlib.bzrdir import BzrDir
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 = ControlDir.create_standalone_workingtree('.')
 
120
        wt = BzrDir.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 = ControlDir.create_standalone_workingtree('.')
 
228
        wt = BzrDir.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_stack().set("bugtracker", "lp")
 
631
        tree.branch.get_config().set_user_option("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',
749
749
        self.build_tree_contents([('test', 'changes in test')])
750
750
        # partial commit
751
751
        out, err = self.run_bzr('commit test -m "partial commit"')
752
 
        self.assertEqual('', out)
 
752
        self.assertEquals('', out)
753
753
        self.assertContainsRe(err, r'modified test\nCommitted revision 2.')
754
754
 
755
755
    def test_commit_readonly_checkout(self):
757
757
        # "UnlockableTransport error trying to commit in checkout of readonly
758
758
        # branch"
759
759
        self.make_branch('master')
760
 
        master = ControlDir.open_from_transport(
 
760
        master = BzrDir.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(211, self.hpss_calls)
 
890
        self.assertLength(214, 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)