~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

Merge up bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
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