~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/annotate.py

[merge] robertc's integration, updated tests to check for retcode=3

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.branch import Branch
91
 
    from bzrlib.trace import enable_default_logging
92
 
    from bzrlib.workingtree import WorkingTree
93
 
 
94
 
    enable_default_logging()
95
 
    b = Branch.open_containing(sys.argv[1])[0]
96
 
    tree = WorkingTree(b.base, b)
97
 
    rp = tree.relpath(sys.argv[1])
98
 
    tree = b.revision_tree(b.last_revision())
99
 
    file_id = tree.inventory.path2id(rp)
100
 
    file_version = tree.inventory[file_id].revision
101
 
    annotate_file(b, file_version, file_id, to_file = sys.stdout)