~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

(vila) Fix bug #701212,
 don't set the tag dict of the master branch you are updating from. (John A
 Meinel)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2011 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
47
47
        self.assertIsDirectory('.bzr/checkout', t)
48
48
        self.assertIsDirectory('.bzr/checkout/lock', t)
49
49
 
 
50
    def test_init_weave(self):
 
51
        # --format=weave should be accepted to allow interoperation with
 
52
        # old releases when desired.
 
53
        out, err = self.run_bzr('init --format=weave')
 
54
        self.assertEqual("""Created a standalone tree (format: weave)\n""",
 
55
            out)
 
56
        self.assertEqual('', err)
 
57
 
50
58
    def test_init_format_2a(self):
51
59
        """Smoke test for constructing a format 2a repoistory."""
52
60
        out, err = self.run_bzr('init --format=2a')
100
108
        # init an existing branch.
101
109
        out, err = self.run_bzr('init subdir2', retcode=3)
102
110
        self.assertEqual('', out)
103
 
        self.assertTrue(err.startswith('bzr: ERROR: Already a branch:'))
 
111
        self.failUnless(err.startswith('bzr: ERROR: Already a branch:'))
104
112
 
105
113
    def test_init_branch_quiet(self):
106
114
        out, err = self.run_bzr('init -q')
154
162
        self.run_bzr_error(['Parent directory of ../new/tree does not exist'],
155
163
                            'init ../new/tree', working_dir='tree')
156
164
        self.run_bzr('init ../new/tree --create-prefix', working_dir='tree')
157
 
        self.assertPathExists('new/tree/.bzr')
 
165
        self.failUnlessExists('new/tree/.bzr')
158
166
 
159
167
    def test_init_default_format_option(self):
160
168
        """bzr init should read default format from option default_format"""