~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_branch.py

(jelmer) Remove Branch.revision_history() and Branch.set_revision_history().
 (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
340
340
        self.assertPathDoesNotExist('a/.bzr/branch/bound')
341
341
        self.assertEqual('ftp://example.com', branch.get_bound_location())
342
342
 
343
 
    def test_set_revision_history(self):
344
 
        builder = self.make_branch_builder('.', format=self.get_format_name())
345
 
        builder.build_snapshot('foo', None,
346
 
            [('add', ('', None, 'directory', None))],
347
 
            message='foo')
348
 
        builder.build_snapshot('bar', None, [], message='bar')
349
 
        branch = builder.get_branch()
350
 
        branch.lock_write()
351
 
        self.addCleanup(branch.unlock)
352
 
        self.applyDeprecated(symbol_versioning.deprecated_in((2, 4, 0)),
353
 
            branch.set_revision_history, ['foo', 'bar'])
354
 
        self.applyDeprecated(symbol_versioning.deprecated_in((2, 4, 0)),
355
 
                branch.set_revision_history, ['foo'])
356
 
        self.assertRaises(errors.NotLefthandHistory,
357
 
            self.applyDeprecated, symbol_versioning.deprecated_in((2, 4, 0)),
358
 
            branch.set_revision_history, ['bar'])
359
 
 
360
343
    def do_checkout_test(self, lightweight=False):
361
344
        tree = self.make_branch_and_tree('source',
362
345
            format=self.get_format_name_subtree())
569
552
    def test_constructor(self):
570
553
        """Check that creating a BranchHooks instance has the right defaults."""
571
554
        hooks = _mod_branch.BranchHooks()
572
 
        self.assertTrue("set_rh" in hooks, "set_rh not in %s" % hooks)
573
555
        self.assertTrue("post_push" in hooks, "post_push not in %s" % hooks)
574
556
        self.assertTrue("post_commit" in hooks, "post_commit not in %s" % hooks)
575
557
        self.assertTrue("pre_commit" in hooks, "pre_commit not in %s" % hooks)