/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_init.py

  • Committer: Jelmer Vernooij
  • Date: 2018-11-16 23:15:15 UTC
  • mfrom: (7180 work)
  • mto: This revision was merged to the branch mainline in revision 7183.
  • Revision ID: jelmer@jelmer.uk-20181116231515-zqd2yn6kj8lfydyp
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
        """Smoke test for constructing a format 2a repository."""
52
52
        out, err = self.run_bzr('init --format=2a')
53
53
        self.assertEqual("""Created a standalone tree (format: 2a)\n""",
54
 
            out)
 
54
                         out)
55
55
        self.assertEqual('', err)
56
56
 
57
57
    def test_init_format_bzr(self):
64
64
 
65
65
    def test_init_colocated(self):
66
66
        """Smoke test for constructing a colocated branch."""
67
 
        out, err = self.run_bzr('init --format=development-colo file:,branch=abranch')
 
67
        out, err = self.run_bzr(
 
68
            'init --format=development-colo file:,branch=abranch')
68
69
        self.assertEqual("""Created a standalone tree (format: development-colo)\n""",
69
 
            out)
 
70
                         out)
70
71
        self.assertEqual('', err)
71
72
        out, err = self.run_bzr('branches')
72
73
        self.assertEqual("  abranch\n", out)
106
107
        WorkingTree.open('subdir1')
107
108
 
108
109
        self.run_bzr_error(['Parent directory of subdir2/nothere does not exist'],
109
 
                            'init subdir2/nothere')
 
110
                           'init subdir2/nothere')
110
111
        out, err = self.run_bzr('init subdir2/nothere', retcode=3)
111
112
        self.assertEqual('', out)
112
113
 
170
171
        tree = self.create_simple_tree()
171
172
 
172
173
        self.run_bzr_error(['Parent directory of ../new/tree does not exist'],
173
 
                            'init ../new/tree', working_dir='tree')
 
174
                           'init ../new/tree', working_dir='tree')
174
175
        self.run_bzr('init ../new/tree --create-prefix', working_dir='tree')
175
176
        self.assertPathExists('new/tree/.bzr')
176
177
 
197
198
        # init on a remote url should succeed.
198
199
        out, err = self.run_bzr(['init', '--format=pack-0.92', self.get_url()])
199
200
        self.assertEqual(out,
200
 
            """Created a standalone branch (format: pack-0.92)\n""")
 
201
                         """Created a standalone branch (format: pack-0.92)\n""")
201
202
        self.assertEqual('', err)
202
203
 
203
204
    def test_init_existing_branch(self):
224
225
        self.run_bzr('init --format=dirstate-tags normal_branch6')
225
226
        branch = _mod_branch.Branch.open('normal_branch6')
226
227
        self.assertEqual(None, branch.get_append_revisions_only())
227
 
        self.run_bzr('init --append-revisions-only --format=dirstate-tags branch6')
 
228
        self.run_bzr(
 
229
            'init --append-revisions-only --format=dirstate-tags branch6')
228
230
        branch = _mod_branch.Branch.open('branch6')
229
231
        self.assertEqual(True, branch.get_append_revisions_only())
230
232
        self.run_bzr_error(['cannot be set to append-revisions-only'],
243
245
        out, err = self.run_bzr(['init', 'foo'])
244
246
        self.assertEqual(err, '')
245
247
        self.assertTrue(os.path.exists('foo'))
246