69
69
:param show_ids: Show revision ids in the annotation output.
71
71
tree = branch.repository.revision_tree(rev_id)
72
annotate_file_revision_tree(tree, file_id, to_file, verbose=verbose,
72
annotate_file_tree(tree, file_id, to_file, verbose=verbose,
73
73
full=full, show_ids=show_ids, branch=branch)
76
def annotate_file_revision_tree(tree, file_id, to_file, verbose=False,
77
full=False, show_ids=False, branch=None):
78
"""Annotate file_id in a revision tree.
80
:param tree: The tree to look for revision numbers and history from.
81
:param file_id: The file_id to annotate.
82
:param to_file: The file to output the annotation to.
83
:param verbose: Show all details rather than truncating to ensure
84
reasonable text width.
85
:param full: XXXX Not sure what this does.
86
:param show_ids: Show revision ids in the annotation output.
87
:param branch: Branch to use for revno lookups.
92
# Handle the show_ids case
93
annotations = list(tree.annotate_iter(file_id))
95
return _show_id_annotations(annotations, to_file, full)
97
# Calculate the lengths of the various columns
98
annotation = list(_expand_annotations(annotations, branch))
99
_print_annotations(annotation, verbose, to_file, full)
102
76
def annotate_file_tree(tree, file_id, to_file, verbose=False, full=False,
103
77
show_ids=False, branch=None):
104
78
"""Annotate file_id in a tree.