~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

  • Committer: Aaron Bentley
  • Date: 2007-02-07 03:09:58 UTC
  • mfrom: (2268 +trunk)
  • mto: This revision was merged to the branch mainline in revision 2269.
  • Revision ID: aaron.bentley@utoronto.ca-20070207030958-fx6ykp7rg7zma6xu
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2004, 2005 Canonical Ltd
 
1
# Copyright (C) 2004, 2005, 2006, 2007 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
83
83
        prevanno=anno
84
84
 
85
85
 
86
 
def _annotate_file(branch, rev_id, file_id ):
 
86
def _annotate_file(branch, rev_id, file_id):
87
87
    """Yield the origins for each line of a file.
88
88
 
89
89
    This includes detailed information, such as the committer name, and
90
90
    date string for the commit, rather than just the revision id.
91
91
    """
92
 
 
93
 
    rh = branch.revision_history()
94
 
    revision_graph = branch.repository.get_revision_graph(rev_id)
 
92
    branch_last_revision = branch.last_revision()
 
93
    revision_graph = branch.repository.get_revision_graph(branch_last_revision)
95
94
    merge_sorted_revisions = tsort.merge_sort(
96
95
        revision_graph,
97
 
        rev_id,
 
96
        branch_last_revision,
98
97
        None,
99
98
        generate_revno=True)
100
99
    revision_id_to_revno = dict((rev_id, revno)