~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Ian Clatworthy
  • Date: 2008-03-27 07:51:10 UTC
  • mto: (3311.1.1 ianc-integration)
  • mto: This revision was merged to the branch mainline in revision 3312.
  • Revision ID: ian.clatworthy@canonical.com-20080327075110-afgd7x03ybju06ez
Reduce evangelism in the User Guide

Show diffs side-by-side

added added

removed removed

Lines of Context:
44
44
        # --format=weave should be accepted to allow interoperation with
45
45
        # old releases when desired.
46
46
        out, err = self.run_bzr('init --format=weave')
47
 
        self.assertEqual("""Standalone tree (format: weave)
48
 
Location:
49
 
  branch root: .
50
 
""", out)
 
47
        self.assertEqual('', out)
51
48
        self.assertEqual('', err)
52
49
 
53
50
    def test_init_at_repository_root(self):
60
57
        repo = newdir.create_repository(shared=True)
61
58
        repo.set_make_working_trees(False)
62
59
        out, err = self.run_bzr('init repo')
63
 
        self.assertEqual(
64
 
"""Repository tree (format: pack-0.92)
65
 
Location:
66
 
  shared repository: repo
67
 
  repository branch: repo
68
 
""", out)
 
60
        self.assertEqual('', out)
69
61
        self.assertEqual('', err)
70
62
        newdir.open_branch()
71
63
        newdir.open_workingtree()
72
64
        
73
65
    def test_init_branch(self):
74
66
        out, err = self.run_bzr('init')
75
 
        self.assertEqual(
76
 
"""Standalone tree (format: pack-0.92)
77
 
Location:
78
 
  branch root: .
79
 
""", out)
 
67
        self.assertEqual('', out)
80
68
        self.assertEqual('', err)
81
69
 
82
70
        # Can it handle subdirectories of branches too ?
83
71
        out, err = self.run_bzr('init subdir1')
84
 
        self.assertEqual(
85
 
"""Standalone tree (format: pack-0.92)
86
 
Location:
87
 
  branch root: subdir1
88
 
""", out)
 
72
        self.assertEqual('', out)
89
73
        self.assertEqual('', err)
90
74
        WorkingTree.open('subdir1')
91
75
        
96
80
        
97
81
        os.mkdir('subdir2')
98
82
        out, err = self.run_bzr('init subdir2')
99
 
        self.assertEqual("""Standalone tree (format: pack-0.92)
100
 
Location:
101
 
  branch root: subdir2
102
 
""", out)
 
83
        self.assertEqual('', out)
103
84
        self.assertEqual('', err)
104
85
        # init an existing branch.
105
86
        out, err = self.run_bzr('init subdir2', retcode=3)
106
87
        self.assertEqual('', out)
107
88
        self.failUnless(err.startswith('bzr: ERROR: Already a branch:'))
108
89
 
109
 
    def test_init_branch_quiet(self):
110
 
        out, err = self.run_bzr('init -q')
111
 
        self.assertEqual('', out)
112
 
        self.assertEqual('', err)
113
 
 
114
90
    def test_init_existing_branch(self):
115
91
        self.run_bzr('init')
116
92
        out, err = self.run_bzr('init', retcode=3)
142
118
        except UnicodeError:
143
119
            raise TestSkipped("Unable to create Unicode filename")
144
120
        # try to init unicode dir
145
 
        self.run_bzr(['init', '-q', u'mu-\xb5'])
 
121
        self.run_bzr(['init', u'mu-\xb5'])
146
122
 
147
123
    def create_simple_tree(self):
148
124
        tree = self.make_branch_and_tree('tree')
166
142
    def test_init(self):
167
143
        # init on a remote url should succeed.
168
144
        out, err = self.run_bzr(['init', self.get_url()])
169
 
        self.assertStartsWith(out, """Standalone branch (format: pack-0.92)
170
 
Location:
171
 
  branch root: """)
 
145
        self.assertEqual('', out)
172
146
        self.assertEqual('', err)
173
147
    
174
148
    def test_init_existing_branch(self):