/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 breezy/tests/blackbox/test_shared_repository.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-16 19:47:19 UTC
  • mfrom: (7178 work)
  • mto: This revision was merged to the branch mainline in revision 7179.
  • Revision ID: jelmer@jelmer.uk-20181116194719-m5ut2wfuze5x9s1p
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
30
30
    def test_make_repository(self):
31
31
        out, err = self.run_bzr("init-repository a")
32
32
        self.assertEqual(out,
33
 
"""Shared repository with trees (format: 2a)
 
33
                         """Shared repository with trees (format: 2a)
34
34
Location:
35
35
  shared repository: a
36
36
""")
82
82
    def test_branch_tree(self):
83
83
        self.run_bzr("init-repo --trees a")
84
84
        self.run_bzr("init --format=default b")
85
 
        with open('b/hello', 'wt') as f: f.write('bar')
 
85
        with open('b/hello', 'wt') as f:
 
86
            f.write('bar')
86
87
        self.run_bzr("add b/hello")
87
88
        self.run_bzr("commit -m bar b/hello")
88
89
 
131
132
        self.assertEqual(out, "")
132
133
        self.assertEqual(err, "")
133
134
        dir = ControlDir.open('a')
134
 
        dir.open_repository() # there is a repository there
 
135
        dir.open_repository()  # there is a repository there
135
136
        e = self.assertRaises(errors.NotBranchError, dir.open_branch)
136
137
        self.assertContainsRe(str(e), "location is a repository")
137
138
 
146
147
 
147
148
    def test_init_repo_with_post_repo_init_hook(self):
148
149
        calls = []
149
 
        ControlDir.hooks.install_named_hook('post_repo_init', calls.append, None)
 
150
        ControlDir.hooks.install_named_hook(
 
151
            'post_repo_init', calls.append, None)
150
152
        self.assertLength(0, calls)
151
153
        self.run_bzr("init-repository a")
152
154
        self.assertLength(1, calls)