~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_bound_branches.py

  • Committer: Patch Queue Manager
  • Date: 2011-09-26 15:42:24 UTC
  • mfrom: (6165.2.3 avoid-revision-history)
  • Revision ID: pqm@pqm.ubuntu.com-20110926154224-by4s1qzbroh115wn
(jelmer) Remove several calls to Branch.revision_history(). (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
 
50
50
    def check_revno(self, val, loc='.'):
51
51
        self.assertEqual(
52
 
            val, len(BzrDir.open(loc).open_branch().revision_history()))
 
52
            val, BzrDir.open(loc).open_branch().last_revision_info()[0])
53
53
 
54
54
    def test_simple_binding(self):
55
55
        tree = self.make_branch_and_tree('base')
229
229
        child_tree.commit(message='merged')
230
230
        self.check_revno(3)
231
231
 
232
 
        # After binding, the revision history should be unaltered
233
 
        # take a copy before
234
 
        base_history = base_branch.revision_history()
235
 
        child_history = child_branch.revision_history()
 
232
        self.assertEquals(
 
233
            child_tree.branch.last_revision(),
 
234
            base_tree.branch.last_revision())
236
235
 
237
236
    def test_bind_parent_ahead(self):
238
237
        base_tree = self.create_branches()[0]
333
332
        self.build_tree_contents([('other/c', 'file c\n')])
334
333
        other_tree.add('c')
335
334
        other_tree.commit(message='adding c')
336
 
        new_rev_id = other_branch.revision_history()[-1]
 
335
        new_rev_id = other_branch.last_revision()
337
336
 
338
337
        child_tree.merge_from_branch(other_branch)
339
338