~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

  • Committer: John Arbash Meinel
  • Date: 2006-12-01 19:41:16 UTC
  • mfrom: (2158 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2159.
  • Revision ID: john@arbash-meinel.com-20061201194116-nvn5qhfxux5284jc
[merge] bzr.dev 2158

Show diffs side-by-side

added added

removed removed

Lines of Context:
59
59
    w = branch.repository.weave_store.get_weave(file_id, 
60
60
        branch.repository.get_transaction())
61
61
    last_origin = None
62
 
    for origin, text in w.annotate_iter(rev_id):
 
62
    annotations = list(w.annotate_iter(rev_id))
 
63
    revision_ids = set(o for o, t in annotations)
 
64
    revision_ids = [o for o in revision_ids if 
 
65
                    branch.repository.has_revision(o)]
 
66
    revisions = dict((r.revision_id, r) for r in 
 
67
                     branch.repository.get_revisions(revision_ids))
 
68
    for origin, text in annotations:
63
69
        text = text.rstrip('\r\n')
64
70
        if origin == last_origin:
65
71
            (revno_str, author, date_str) = ('','','')
66
72
        else:
67
73
            last_origin = origin
68
 
            if not branch.repository.has_revision(origin):
 
74
            if origin not in revisions:
69
75
                (revno_str, author, date_str) = ('?','?','?')
70
76
            else:
71
77
                if origin in rh:
72
78
                    revno_str = str(rh.index(origin) + 1)
73
79
                else:
74
80
                    revno_str = 'merge'
75
 
            rev = branch.repository.get_revision(origin)
 
81
            rev = revisions[origin]
76
82
            tz = rev.timezone or 0
77
83
            date_str = time.strftime('%Y%m%d', 
78
84
                                     time.gmtime(rev.timestamp + tz))