~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

  • Committer: John Arbash Meinel
  • Date: 2009-07-08 17:09:03 UTC
  • mto: This revision was merged to the branch mainline in revision 4522.
  • Revision ID: john@arbash-meinel.com-20090708170903-nea7ru9bh2hdtf1w
Add support for compatibility with old '_break_annotation_tie' function.

Show diffs side-by-side

added added

removed removed

Lines of Context:
313
313
    return matcher.get_matching_blocks()
314
314
 
315
315
 
316
 
def _break_annotation_tie(annotated_lines):
 
316
_break_annotation_tie = None
 
317
 
 
318
def _old_break_annotation_tie(annotated_lines):
317
319
    """Chose an attribution between several possible ones.
318
320
 
319
321
    :param annotated_lines: A list of tuples ((file_id, rev_id), line) where
394
396
                        # If the result is not stable, there is a risk a
395
397
                        # performance degradation as criss-cross merges will
396
398
                        # flip-flop the attribution.
397
 
                        output_append(_break_annotation_tie([left, right]))
 
399
                        if _break_annotation_tie is None:
 
400
                            output_append(
 
401
                                _old_break_annotation_tie([left, right]))
 
402
                        else:
 
403
                            output_append(_break_annotation_tie([left, right]))
398
404
        last_child_idx = child_idx + match_len
399
405
 
400
406