~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_revision.py

(jelmer) Deprecate Branch.revision_history(). (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
    tree1.merge_from_branch(br2)
78
78
    tree1.commit("Commit nine", rev_id="a@u-0-5")
79
79
    # DO NOT MERGE HERE - we WANT a GHOST.
80
 
    tree2.add_parent_tree_id(br1.revision_history()[4])
 
80
    br1.lock_read()
 
81
    try:
 
82
        graph = br1.repository.get_graph()
 
83
        revhistory = list(graph.iter_lefthand_ancestry(br1.last_revision(),
 
84
            [revision.NULL_REVISION]))
 
85
        revhistory.reverse()
 
86
    finally:
 
87
        br1.unlock()
 
88
    tree2.add_parent_tree_id(revhistory[4])
81
89
    tree2.commit("Commit ten - ghost merge", rev_id="b@u-0-6")
82
90
 
83
91
    return br1, br2