~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-08-08 02:45:34 UTC
  • mfrom: (3588.3.2 simple_annotate)
  • Revision ID: pqm@pqm.ubuntu.com-20080808024534-ff7wyd3vnhtpbat2
(jam) In reference to bug #232188,
        always pick a revision which modified a line,
        rather than a merge revision.

Show diffs side-by-side

added added

removed removed

Lines of Context:
285
285
                    if len(heads) == 1:
286
286
                        output_append((iter(heads).next(), left[1]))
287
287
                    else:
288
 
                        # Both claim different origins
289
 
                        output_append((revision_id, left[1]))
290
 
                        # We know that revision_id is the head for
291
 
                        # left and right, so cache it
292
 
                        heads_provider.cache(
293
 
                            (revision_id, left[0]),
294
 
                            (revision_id,))
295
 
                        heads_provider.cache(
296
 
                            (revision_id, right[0]),
297
 
                            (revision_id,))
 
288
                        # Both claim different origins, sort lexicographically
 
289
                        # so that we always get a stable result.
 
290
                        output_append(sorted([left, right])[0])
298
291
        last_child_idx = child_idx + match_len
299
292
 
300
293