/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/log.py

Cleanup bt.per_branch.test_iter_merge_sorted_revisions

Show diffs side-by-side

added added

removed removed

Lines of Context:
561
561
                    if (start_rev_id is not None
562
562
                        and not graph.is_ancestor(start_rev_id, end_rev_id)):
563
563
                        raise _StartNotLinearAncestor()
 
564
                    # Since we collected the revisions so far, we need to
 
565
                    # adjust end_rev_id.
564
566
                    end_rev_id = rev_id
565
567
                    break
566
568
                else:
579
581
            raise errors.BzrCommandError('Start revision not found in'
580
582
                ' history of end revision.')
581
583
 
 
584
    # We exit the loop above because we encounter a revision with merges, from
 
585
    # this revision, we need to switch to _graph_view_revisions.
 
586
 
582
587
    # A log including nested merges is required. If the direction is reverse,
583
588
    # we rebase the initial merge depths so that the development line is
584
589
    # shown naturally, i.e. just like it is for linear logging. We can easily
586
591
    # indented at the end seems slightly nicer in that case.
587
592
    view_revisions = chain(iter(initial_revisions),
588
593
        _graph_view_revisions(branch, start_rev_id, end_rev_id,
589
 
        rebase_initial_depths=direction == 'reverse'))
 
594
                              rebase_initial_depths=(direction == 'reverse')))
590
595
    if direction == 'reverse':
591
596
        return view_revisions
592
597
    elif direction == 'forward':
658
663
 
659
664
 
660
665
def _graph_view_revisions(branch, start_rev_id, end_rev_id,
661
 
    rebase_initial_depths=True):
 
666
                          rebase_initial_depths=True):
662
667
    """Calculate revisions to view including merges, newest to oldest.
663
668
 
664
669
    :param branch: the branch