~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2011-10-05 12:16:17 UTC
  • mto: This revision was merged to the branch mainline in revision 6216.
  • Revision ID: jelmer@samba.org-20111005121617-cpmg83tbv5l2eweq
Avoid all iter_reverse_revision_history calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
455
455
        rev1 = tree.commit('foo')
456
456
        tree.lock_write()
457
457
        self.addCleanup(tree.unlock)
 
458
        graph = tree.branch.repository.get_graph()
458
459
        orig_history = list(
459
 
            tree.branch.repository.iter_reverse_revision_history(
460
 
                tree.branch.last_revision()))
 
460
            graph.iter_lefthand_ancestry(
 
461
                tree.branch.last_revision(), [revision.NULL_REVISION]))
461
462
        rev2 = tree.commit('bar', allow_pointless=True)
462
463
        tree.branch.generate_revision_history(rev1)
463
464
        self.assertEqual(orig_history, list(
464
 
            tree.branch.repository.iter_reverse_revision_history(
465
 
                tree.branch.last_revision())))
 
465
            graph.iter_lefthand_ancestry(
 
466
                tree.branch.last_revision(), [revision.NULL_REVISION])))
466
467
 
467
468
    def test_generate_revision_history_NULL_REVISION(self):
468
469
        tree = self.make_branch_and_tree('.')