/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: Jelmer Vernooij
  • Date: 2011-05-02 13:47:28 UTC
  • mto: This revision was merged to the branch mainline in revision 5826.
  • Revision ID: jelmer@samba.org-20110502134728-czfsn9ldnrjm20lf
Simplify annotate.

Show diffs side-by-side

added added

removed removed

Lines of Context:
64
64
        to_file = sys.stdout
65
65
 
66
66
    # Handle the show_ids case
67
 
    annotations = _annotations(branch.repository, file_id, rev_id)
 
67
    annotations = branch.repository.texts.annotate((file_id, rev_id))
 
68
    annotations = [(key[-1], line) for (key, line) in annotations]
 
69
 
68
70
    if show_ids:
69
71
        return _show_id_annotations(annotations, to_file, full)
70
72
 
185
187
    return
186
188
 
187
189
 
188
 
def _annotations(repo, file_id, rev_id):
189
 
    """Return the list of (origin_revision_id, line_text) for a revision of a file in a repository."""
190
 
    annotations = repo.texts.annotate((file_id, rev_id))
191
 
    #
192
 
    return [(key[-1], line) for (key, line) in annotations]
193
 
 
194
 
 
195
190
def _expand_annotations(annotations, branch, current_rev=None):
196
191
    """Expand a file's annotations into command line UI ready tuples.
197
192