~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

Refactored out ControlFiles and RevisionStore from _Branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
def _annotate_file(branch, rev_id, file_id ):
57
57
 
58
58
    rh = branch.revision_history()
59
 
    w = branch.weave_store.get_weave(file_id, branch.get_transaction())
 
59
    w = branch.storage.weave_store.get_weave(file_id, 
 
60
                                             branch.storage.get_transaction())
60
61
    last_origin = None
61
62
    for origin, text in w.annotate_iter(rev_id):
62
63
        text = text.rstrip('\r\n')
65
66
        else:
66
67
            last_origin = origin
67
68
            line_rev_id = w.idx_to_name(origin)
68
 
            if not branch.has_revision(line_rev_id):
 
69
            if not branch.storage.has_revision(line_rev_id):
69
70
                (revno_str, author, date_str) = ('?','?','?')
70
71
            else:
71
72
                if line_rev_id in rh:
72
73
                    revno_str = str(rh.index(line_rev_id) + 1)
73
74
                else:
74
75
                    revno_str = 'merge'
75
 
            rev = branch.get_revision(line_rev_id)
 
76
            rev = branch.storage.get_revision(line_rev_id)
76
77
            tz = rev.timezone or 0
77
78
            date_str = time.strftime('%Y%m%d', 
78
79
                                     time.gmtime(rev.timestamp + tz))