~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_branch/test_branch.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-04-20 21:01:40 UTC
  • mfrom: (5718.7.15 dprh)
  • Revision ID: pqm@pqm.ubuntu.com-20110420210140-1akzbrzuwftl390r
(Jelmer) Deprecate Branch.set_revision_history(). (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
    remote,
30
30
    repository,
31
31
    revision,
 
32
    symbol_versioning,
32
33
    tests,
33
34
    )
34
35
from bzrlib.tests import (
74
75
 
75
76
        br = self.get_branch()
76
77
        br.fetch(wt.branch)
77
 
        br.set_revision_history(['rev1', 'rev2', 'rev3'])
 
78
        br.generate_revision_history('rev3')
78
79
        rh = br.revision_history()
79
80
        self.assertEqual(['rev1', 'rev2', 'rev3'], rh)
80
81
        for revision_id in rh:
459
460
        tree = self.make_branch_and_tree('a')
460
461
        tree.commit('a commit', rev_id='rev1')
461
462
        br = tree.branch
462
 
        br.set_revision_history(["rev1"])
 
463
        self.applyDeprecated(symbol_versioning.deprecated_in((2, 4, 0)),
 
464
            br.set_revision_history, ["rev1"])
463
465
        self.assertEquals(br.revision_history(), ["rev1"])
464
 
        br.set_revision_history([])
 
466
        self.applyDeprecated(symbol_versioning.deprecated_in((2, 4, 0)),
 
467
            br.set_revision_history, [])
465
468
        self.assertEquals(br.revision_history(), [])
466
469
 
467
470
    def test_heads_to_fetch(self):