~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

Nuke __main__ for annotate.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
            except BzrError:
85
85
                pass        # use the whole name
86
86
        yield (revno_str, author, date_str, line_rev_id, text)
87
 
 
88
 
 
89
 
if __name__ == '__main__':
90
 
    from bzrlib.trace import enable_default_logging
91
 
    from bzrlib.workingtree import WorkingTree
92
 
 
93
 
    enable_default_logging()
94
 
    tree, rp = WorkingTree.open_containing(sys.argv[1])
95
 
    b = tree.branch
96
 
    tree = b.revision_tree(b.last_revision())
97
 
    file_id = tree.inventory.path2id(rp)
98
 
    file_version = tree.inventory[file_id].revision
99
 
    annotate_file(b, file_version, file_id, to_file = sys.stdout)