/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: Vincent Ladeuil
  • Date: 2009-03-30 09:03:57 UTC
  • mto: (4271.1.1 trunk)
  • mto: This revision was merged to the branch mainline in revision 4273.
  • Revision ID: v.ladeuil+lp@free.fr-20090330090357-simbq6nmdmr38ofh
Add more explanations for _break_annotation_tie.

Show diffs side-by-side

added added

removed removed

Lines of Context:
325
325
         do so have performance implications.
326
326
    """
327
327
    # sort lexicographically so that we always get a stable result.
 
328
 
 
329
    # TODO: while 'sort' is the easiest (and nearly the only possible solution)
 
330
    # with the current implementation, chosing the oldest revision is known to
 
331
    # provide better results (as in matching user expectations). The most
 
332
    # common use case being manual cherry-pick from an already existing
 
333
    # revision.
328
334
    return sorted(annotated_lines)[0]
329
335
 
330
336
 
384
390
                    if len(heads) == 1:
385
391
                        output_append((iter(heads).next(), left[1]))
386
392
                    else:
387
 
                        # Both claim different origins, sort lexicographically
388
 
                        # so that we always get a stable result.
 
393
                        # Both claim different origins, get a stable result.
 
394
                        # If the result is not stable, there is a risk a
 
395
                        # performance degradation as criss-cross merges will
 
396
                        # flip-flop the attribution.
389
397
                        output_append(_break_annotation_tie([left, right]))
390
398
        last_child_idx = child_idx + match_len
391
399