~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

  • Committer: Jelmer Vernooij
  • Date: 2011-05-03 15:04:00 UTC
  • mto: This revision was merged to the branch mainline in revision 5826.
  • Revision ID: jelmer@samba.org-20110503150400-9of47sxsmv38vap5
Fix test.

Show diffs side-by-side

added added

removed removed

Lines of Context:
98
98
    if show_ids:
99
99
        return _show_id_annotations(annotations, to_file, full)
100
100
 
101
 
    # Create a virtual revision to represent the current tree state.
102
 
    # Should get some more pending commit attributes, like pending tags,
103
 
    # bugfixes etc.
104
 
    current_rev = Revision(CURRENT_REVISION)
105
 
    current_rev.parent_ids = tree.get_parent_ids()
106
 
    current_rev.committer = branch.get_config().username()
107
 
    current_rev.message = "?"
108
 
    current_rev.timestamp = round(time.time(), 3)
109
 
    current_rev.timezone = osutils.local_time_offset()
 
101
    if not getattr(tree, "get_revision_id", False):
 
102
        # Create a virtual revision to represent the current tree state.
 
103
        # Should get some more pending commit attributes, like pending tags,
 
104
        # bugfixes etc.
 
105
        current_rev = Revision(CURRENT_REVISION)
 
106
        current_rev.parent_ids = tree.get_parent_ids()
 
107
        current_rev.committer = branch.get_config().username()
 
108
        current_rev.message = "?"
 
109
        current_rev.timestamp = round(time.time(), 3)
 
110
        current_rev.timezone = osutils.local_time_offset()
 
111
    else:
 
112
        current_rev = None
110
113
    annotation = list(_expand_annotations(annotations, branch,
111
114
        current_rev))
112
115
    _print_annotations(annotation, verbose, to_file, full)