/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 18:02:24 UTC
  • mto: This revision was merged to the branch mainline in revision 5826.
  • Revision ID: jelmer@samba.org-20110502180224-0xx1htwtnjfuxy1q
Refactor annotate_file to be implemented on top of annotate_file_revision_tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
65
65
        used.
66
66
    :param show_ids: Show revision ids in the annotation output.
67
67
    """
68
 
    if to_file is None:
69
 
        to_file = sys.stdout
70
 
 
71
 
    # Handle the show_ids case
72
 
    annotations = branch.repository.texts.annotate((file_id, rev_id))
73
 
    annotations = [(key[-1], line) for (key, line) in annotations]
74
 
 
75
 
    if show_ids:
76
 
        return _show_id_annotations(annotations, to_file, full)
77
 
 
78
 
    # Calculate the lengths of the various columns
79
 
    annotation = list(_expand_annotations(annotations, branch))
80
 
    _print_annotations(annotation, verbose, to_file, full)
 
68
    tree = branch.repository.revision_tree(rev_id)
 
69
    annotate_file_revision_tree(tree, file_id, to_file, verbose=verbose,
 
70
        full=full, show_ids=show_ids, branch=branch)
81
71
 
82
72
 
83
73
def annotate_file_revision_tree(tree, file_id, to_file, verbose=False,