/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/annotate.py

  • Committer: Martin Pool
  • Date: 2008-05-27 03:00:53 UTC
  • mfrom: (3452 +trunk)
  • mto: (3724.1.1 lock-hooks)
  • mto: This revision was merged to the branch mainline in revision 3730.
  • Revision ID: mbp@sourcefrog.net-20080527030053-0mct6dypek0ysjc3
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
113
113
def _annotations(repo, file_id, rev_id):
114
114
    """Return the list of (origin,text) for a revision of a file in a repository."""
115
115
    w = repo.weave_store.get_weave(file_id, repo.get_transaction())
116
 
    return list(w.annotate_iter(rev_id))
 
116
    return w.annotate(rev_id)
117
117
 
118
118
 
119
119
def _annotate_file(branch, rev_id, file_id):
311
311
    :param heads_provider: When parents disagree on the lineage of a line, we
312
312
        need to check if one side supersedes the other.
313
313
    """
314
 
    assert len(new_lines) == len(annotated_lines)
 
314
    if len(new_lines) != len(annotated_lines):
 
315
        raise AssertionError("mismatched new_lines and annotated_lines")
315
316
    # First compare the newly annotated lines with the right annotated lines.
316
317
    # Lines which were not changed in left or right should match. This tends to
317
318
    # be the bulk of the lines, and they will need no further processing.
341
342
        last_right_idx = right_idx + match_len
342
343
        last_left_idx = left_idx + match_len
343
344
        # If left and right agree on a range, just push that into the output
344
 
        assert len(lines) == left_idx
345
345
        lines_extend(annotated_lines[left_idx:left_idx + match_len])
346
346
    return lines