~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

Give branch its own basis tree and last_revision methods; deprecated branch.working_tree()

Show diffs side-by-side

added added

removed removed

Lines of Context:
178
178
        b = wt.branch
179
179
        wt.commit('initial', rev_id='test@rev-1', allow_pointless=True)
180
180
        self.assertRaises(Exception,
181
 
                          b.working_tree().commit,
 
181
                          wt.commit,
182
182
                          message='reused id',
183
183
                          rev_id='test@rev-1',
184
184
                          allow_pointless=True)
195
195
        wt.move(['hello'], 'a')
196
196
        r2 = 'test@rev-2'
197
197
        wt.commit('two', rev_id=r2, allow_pointless=False)
198
 
        self.check_inventory_shape(b.working_tree().read_working_inventory(),
 
198
        self.check_inventory_shape(wt.read_working_inventory(),
199
199
                                   ['a', 'a/hello', 'b'])
200
200
 
201
201
        wt.move(['b'], 'a')
270
270
        file('hello', 'w').write('hello world')
271
271
        wt.add('hello')
272
272
        file('goodbye', 'w').write('goodbye cruel world!')
273
 
        self.assertRaises(StrictCommitFailed, b.working_tree().commit,
 
273
        self.assertRaises(StrictCommitFailed, wt.commit,
274
274
            message='add hello but not goodbye', strict=True)
275
275
 
276
276
    def test_strict_commit_without_unknowns(self):