~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

Added more docs

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
            (revno_str, author, date_str) = ('','','')
65
65
        else:
66
66
            last_origin = origin
67
 
            if not branch.repository.has_revision(origin):
 
67
            line_rev_id = w.idx_to_name(origin)
 
68
            if not branch.repository.has_revision(line_rev_id):
68
69
                (revno_str, author, date_str) = ('?','?','?')
69
70
            else:
70
 
                if origin in rh:
71
 
                    revno_str = str(rh.index(origin) + 1)
 
71
                if line_rev_id in rh:
 
72
                    revno_str = str(rh.index(line_rev_id) + 1)
72
73
                else:
73
74
                    revno_str = 'merge'
74
 
            rev = branch.repository.get_revision(origin)
 
75
            rev = branch.repository.get_revision(line_rev_id)
75
76
            tz = rev.timezone or 0
76
77
            date_str = time.strftime('%Y%m%d', 
77
78
                                     time.gmtime(rev.timestamp + tz))
82
83
                author = extract_email_address(author)
83
84
            except BzrError:
84
85
                pass        # use the whole name
85
 
        yield (revno_str, author, date_str, origin, text)
 
86
        yield (revno_str, author, date_str, line_rev_id, text)