~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

Merge integration.

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):
339
339
            config = MustSignConfig(branch)
340
340
            self.assertRaises(SigningFailed,
341
341
                              commit.Commit(config=config).commit,
342
 
                              branch, "base",
 
342
                              message="base",
343
343
                              allow_pointless=True,
344
 
                              rev_id='B')
 
344
                              rev_id='B',
 
345
                              working_tree=wt)
345
346
            branch = Branch.open(self.get_url('.'))
346
347
            self.assertEqual(branch.revision_history(), ['A'])
347
348
            self.failIf(branch.repository.revision_store.has_id('B'))