~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Vincent Ladeuil
  • Date: 2011-06-27 15:42:09 UTC
  • mfrom: (5993 +trunk)
  • mto: (5993.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 5994.
  • Revision ID: v.ladeuil+lp@free.fr-20110627154209-azubuhbuxsz109hq
Merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
678
678
    """
679
679
    br_revno, br_rev_id = branch.last_revision_info()
680
680
    repo = branch.repository
 
681
    graph = repo.get_graph()
681
682
    if start_rev_id is None and end_rev_id is None:
682
683
        cur_revno = br_revno
683
 
        for revision_id in repo.iter_reverse_revision_history(br_rev_id):
 
684
        for revision_id in graph.iter_lefthand_ancestry(br_rev_id,
 
685
            (_mod_revision.NULL_REVISION,)):
684
686
            yield revision_id, str(cur_revno), 0
685
687
            cur_revno -= 1
686
688
    else:
687
689
        if end_rev_id is None:
688
690
            end_rev_id = br_rev_id
689
691
        found_start = start_rev_id is None
690
 
        for revision_id in repo.iter_reverse_revision_history(end_rev_id):
 
692
        for revision_id in graph.iter_lefthand_ancestry(end_rev_id,
 
693
                (_mod_revision.NULL_REVISION,)):
691
694
            revno_str = _compute_revno_str(branch, revision_id)
692
695
            if not found_start and revision_id == start_rev_id:
693
696
                if not exclude_common_ancestry:
1086
1089
    cur_revno = branch_revno
1087
1090
    rev_nos = {}
1088
1091
    mainline_revs = []
1089
 
    for revision_id in branch.repository.iter_reverse_revision_history(
1090
 
                        branch_last_revision):
 
1092
    graph = branch.repository.get_graph()
 
1093
    for revision_id in graph.iter_lefthand_ancestry(
 
1094
            branch_last_revision, (_mod_revision.NULL_REVISION,)):
1091
1095
        if cur_revno < start_revno:
1092
1096
            # We have gone far enough, but we always add 1 more revision
1093
1097
            rev_nos[revision_id] = cur_revno
1945
1949
    old_revisions = set()
1946
1950
    new_history = []
1947
1951
    new_revisions = set()
1948
 
    new_iter = repository.iter_reverse_revision_history(new_revision_id)
1949
 
    old_iter = repository.iter_reverse_revision_history(old_revision_id)
 
1952
    graph = repository.get_graph()
 
1953
    new_iter = graph.iter_lefthand_ancestry(new_revision_id)
 
1954
    old_iter = graph.iter_lefthand_ancestry(old_revision_id)
1950
1955
    stop_revision = None
1951
1956
    do_old = True
1952
1957
    do_new = True