/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 breezy/annotate.py

  • Committer: Jelmer Vernooij
  • Date: 2017-11-12 13:09:58 UTC
  • mto: This revision was merged to the branch mainline in revision 6819.
  • Revision ID: jelmer@jelmer.uk-20171112130958-6e3rstt48asiedzn
Swap arguments for annotate_iter.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
    )
54
54
 
55
55
 
56
 
def annotate_file_tree(tree, file_id, to_file, verbose=False, full=False,
57
 
    show_ids=False, branch=None):
 
56
def annotate_file_tree(tree, path, to_file, verbose=False, full=False,
 
57
    show_ids=False, branch=None, file_id=None):
58
58
    """Annotate file_id in a tree.
59
59
 
60
60
    The tree should already be read_locked() when annotate_file_tree is called.
61
61
 
62
62
    :param tree: The tree to look for revision numbers and history from.
63
 
    :param file_id: The file_id to annotate.
 
63
    :param path: The path to annotate
64
64
    :param to_file: The file to output the annotation to.
65
65
    :param verbose: Show all details rather than truncating to ensure
66
66
        reasonable text width.
67
67
    :param full: XXXX Not sure what this does.
68
68
    :param show_ids: Show revision ids in the annotation output.
 
69
    :param file_id: The file_id to annotate (must match file path)
69
70
    :param branch: Branch to use for revision revno lookups
70
71
    """
71
72
    if branch is None:
74
75
        to_file = sys.stdout
75
76
 
76
77
    # Handle the show_ids case
77
 
    annotations = list(tree.annotate_iter(file_id))
 
78
    annotations = list(tree.annotate_iter(path, file_id))
78
79
    if show_ids:
79
80
        return _show_id_annotations(annotations, to_file, full)
80
81