~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

[merge] from robert

Show diffs side-by-side

added added

removed removed

Lines of Context:
84
84
if __name__ == '__main__':
85
85
    from bzrlib.branch import Branch
86
86
    from bzrlib.trace import enable_default_logging
 
87
    from bzrlib.workingtree import WorkingTree
87
88
 
88
89
    enable_default_logging()
89
90
    b = Branch.open_containing(sys.argv[1])
90
 
    rp = b.relpath(sys.argv[1])
 
91
    tree = WorkingTree(b.base, b)
 
92
    rp = tree.relpath(sys.argv[1])
91
93
    tree = b.revision_tree(b.last_revision())
92
94
    file_id = tree.inventory.path2id(rp)
93
95
    file_version = tree.inventory[file_id].revision