~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/branch.py

  • Committer: Ian Clatworthy
  • Date: 2009-12-04 22:13:52 UTC
  • mfrom: (4511.3.17 log_returns_too_much)
  • mto: This revision was merged to the branch mainline in revision 4868.
  • Revision ID: ian.clatworthy@canonical.com-20091204221352-5ky1o5d31kqkvbge
Merge fix for logging too much

Show diffs side-by-side

added added

removed removed

Lines of Context:
503
503
                left_parent = stop_rev.parent_ids[0]
504
504
            else:
505
505
                left_parent = _mod_revision.NULL_REVISION
 
506
            # left_parent is the actual revision we want to stop logging at,
 
507
            # since we want to show the merged revisions after the stop_rev too
 
508
            reached_stop_revision_id = False
 
509
            revision_id_whitelist = []
506
510
            for node in rev_iter:
507
511
                rev_id = node.key[-1]
508
512
                if rev_id == left_parent:
 
513
                    # reached the left parent after the stop_revision
509
514
                    return
510
 
                yield (rev_id, node.merge_depth, node.revno,
 
515
                if (not reached_stop_revision_id or
 
516
                        rev_id in revision_id_whitelist):
 
517
                    yield (rev_id, node.merge_depth, node.revno,
511
518
                       node.end_of_merge)
 
519
                    if reached_stop_revision_id or rev_id == stop_revision_id:
 
520
                        # only do the merged revs of rev_id from now on
 
521
                        rev = self.repository.get_revision(rev_id)
 
522
                        if rev.parent_ids:
 
523
                            reached_stop_revision_id = True
 
524
                            revision_id_whitelist.extend(rev.parent_ids)
512
525
        else:
513
526
            raise ValueError('invalid stop_rule %r' % stop_rule)
514
527