~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_info.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-2010 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
51
51
    def test_info_empty_controldir(self):
52
52
        self.make_bzrdir('ctrl')
53
53
        out, err = self.run_bzr('info ctrl')
54
 
        self.assertEqual(out,
 
54
        self.assertEquals(out,
55
55
            'Empty control directory (format: 2a or pack-0.92)\n'
56
56
            'Location:\n'
57
57
            '  control directory: ctrl\n')
58
 
        self.assertEqual(err, '')
 
58
        self.assertEquals(err, '')
59
59
 
60
60
    def test_info_empty_controldir_verbose(self):
61
61
        self.make_bzrdir('ctrl')
68
68
            '       control: Meta directory format 1\n\n'
69
69
            'Control directory:\n'
70
70
            '         0 branches\n')
71
 
        self.assertEqual(err, '')
 
71
        self.assertEquals(err, '')
72
72
 
73
73
    def test_info_dangling_branch_reference(self):
74
74
        br = self.make_branch('target')
75
75
        br.create_checkout('from', lightweight=True)
76
76
        shutil.rmtree('target')
77
77
        out, err = self.run_bzr('info from')
78
 
        self.assertEqual(out,
 
78
        self.assertEquals(out,
79
79
            'Dangling branch reference (format: 2a or pack-0.92)\n'
80
80
            'Location:\n'
81
81
            '   control directory: from\n'
82
82
            '  checkout of branch: target\n')
83
 
        self.assertEqual(err, '')
 
83
        self.assertEquals(err, '')
84
84
 
85
85
    def test_info_standalone(self):
86
86
        transport = self.get_transport()
231
231
        # Branch and bind to standalone, needs upgrade to metadir
232
232
        # (creates backup as unknown)
233
233
        branch1.bzrdir.sprout('bound')
234
 
        knit1_format = controldir.format_registry.make_bzrdir('knit')
 
234
        knit1_format = bzrdir.format_registry.make_bzrdir('knit')
235
235
        upgrade.upgrade('bound', knit1_format)
236
236
        branch3 = controldir.ControlDir.open('bound').open_branch()
237
237
        branch3.bind(branch1)
328
328
        tree5 = branch1.create_checkout('lightcheckout', lightweight=True)
329
329
        branch5 = tree5.branch
330
330
        out, err = self.run_bzr('info -v lightcheckout')
331
 
        if "metaweave" in controldir.format_registry:
 
331
        if "metaweave" in bzrdir.format_registry:
332
332
            format_description = "knit or metaweave"
333
333
        else:
334
334
            format_description = "knit"
546
546
 
547
547
    def test_info_standalone_no_tree(self):
548
548
        # create standalone branch without a working tree
549
 
        format = controldir.format_registry.make_bzrdir('default')
 
549
        format = bzrdir.format_registry.make_bzrdir('default')
550
550
        branch = self.make_branch('branch')
551
551
        repo = branch.repository
552
552
        out, err = self.run_bzr('info branch -v')
575
575
        self.assertEqual('', err)
576
576
 
577
577
    def test_info_shared_repository(self):
578
 
        format = controldir.format_registry.make_bzrdir('knit')
 
578
        format = bzrdir.format_registry.make_bzrdir('knit')
579
579
        transport = self.get_transport()
580
580
 
581
581
        # Create shared repository
871
871
        self.assertEqual('', err)
872
872
 
873
873
    def test_info_shared_repository_with_trees(self):
874
 
        format = controldir.format_registry.make_bzrdir('knit')
 
874
        format = bzrdir.format_registry.make_bzrdir('knit')
875
875
        transport = self.get_transport()
876
876
 
877
877
        # Create shared repository with working trees
1098
1098
        self.assertEqual('', err)
1099
1099
 
1100
1100
    def test_info_shared_repository_with_tree_in_root(self):
1101
 
        format = controldir.format_registry.make_bzrdir('knit')
 
1101
        format = bzrdir.format_registry.make_bzrdir('knit')
1102
1102
        transport = self.get_transport()
1103
1103
 
1104
1104
        # Create shared repository with working trees
1166
1166
        self.assertEqual('', err)
1167
1167
 
1168
1168
    def test_info_repository_hook(self):
1169
 
        format = controldir.format_registry.make_bzrdir('knit')
 
1169
        format = bzrdir.format_registry.make_bzrdir('knit')
1170
1170
        def repo_info(repo, stats, outf):
1171
1171
            outf.write("more info\n")
1172
1172
        info.hooks.install_named_hook('repository', repo_info, None)
1195
1195
        self.assertEqual('', err)
1196
1196
 
1197
1197
    def test_info_unshared_repository_with_colocated_branches(self):
1198
 
        format = controldir.format_registry.make_bzrdir('development-colo')
 
1198
        format = bzrdir.format_registry.make_bzrdir('development-colo')
1199
1199
        transport = self.get_transport()
1200
1200
 
1201
1201
        # Create unshared repository
1561
1561
        # being too low. If rpc_count increases, more network roundtrips have
1562
1562
        # become necessary for this use case. Please do not adjust this number
1563
1563
        # upwards without agreement from bzr's network support maintainers.
1564
 
        self.assertLength(10, self.hpss_calls)
 
1564
        self.assertLength(12, self.hpss_calls)
1565
1565
        self.assertLength(1, self.hpss_connections)
1566
1566
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)
1567
1567
 
1578
1578
        # being too low. If rpc_count increases, more network roundtrips have
1579
1579
        # become necessary for this use case. Please do not adjust this number
1580
1580
        # upwards without agreement from bzr's network support maintainers.
1581
 
        self.assertLength(14, self.hpss_calls)
 
1581
        self.assertLength(16, self.hpss_calls)
1582
1582
        self.assertLength(1, self.hpss_connections)
1583
1583
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)