~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_commit.py

  • Committer: Martin Pool
  • Date: 2006-03-10 06:29:53 UTC
  • mfrom: (1608 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1611.
  • Revision ID: mbp@sourcefrog.net-20060310062953-bc1c7ade75c89a7a
[merge] bzr.dev; pycurl not updated for readv yet

Show diffs side-by-side

added added

removed removed

Lines of Context:
308
308
        wt = self.make_branch_and_tree('.')
309
309
        branch = wt.branch
310
310
        wt.commit("base", allow_pointless=True, rev_id='A')
311
 
        self.failIf(branch.repository.revision_store.has_id('A', 'sig'))
 
311
        self.failIf(branch.repository.has_signature_for_revision_id('A'))
312
312
        try:
313
313
            from bzrlib.testament import Testament
314
314
            # monkey patch gpg signing mechanism
319
319
                                                      working_tree=wt)
320
320
            self.assertEqual(Testament.from_revision(branch.repository,
321
321
                             'B').as_short_text(),
322
 
                             branch.repository.revision_store.get('B', 
323
 
                                                               'sig').read())
 
322
                             branch.repository.get_signature_text('B'))
324
323
        finally:
325
324
            bzrlib.gpg.GPGStrategy = oldstrategy
326
325
 
331
330
        wt = self.make_branch_and_tree('.')
332
331
        branch = wt.branch
333
332
        wt.commit("base", allow_pointless=True, rev_id='A')
334
 
        self.failIf(branch.repository.revision_store.has_id('A', 'sig'))
 
333
        self.failIf(branch.repository.has_signature_for_revision_id('A'))
335
334
        try:
336
335
            from bzrlib.testament import Testament
337
336
            # monkey patch gpg signing mechanism
345
344
                              working_tree=wt)
346
345
            branch = Branch.open(self.get_url('.'))
347
346
            self.assertEqual(branch.revision_history(), ['A'])
348
 
            self.failIf(branch.repository.revision_store.has_id('B'))
 
347
            self.failIf(branch.repository.has_revision('B'))
349
348
        finally:
350
349
            bzrlib.gpg.GPGStrategy = oldstrategy
351
350
 
366
365
            self.assertEqual(['called', 'called'], calls)
367
366
        finally:
368
367
            del bzrlib.ahook
 
368
 
 
369
    def test_commit_object_doesnt_set_nick(self):
 
370
        # using the Commit object directly does not set the branch nick.
 
371
        wt = self.make_branch_and_tree('.')
 
372
        c = Commit()
 
373
        c.commit(working_tree=wt, message='empty tree', allow_pointless=True)
 
374
        self.assertEquals(wt.branch.revno(), 1)
 
375
        self.assertEqual({},
 
376
                         wt.branch.repository.get_revision(
 
377
                            wt.branch.last_revision()).properties)
 
378
 
 
379