~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

(jelmer) Deprecate Branch.revision_history(). (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1820
1820
    @display_command
1821
1821
    def run(self, location="."):
1822
1822
        branch = Branch.open_containing(location)[0]
1823
 
        for revid in branch.revision_history():
 
1823
        self.add_cleanup(branch.lock_read().unlock)
 
1824
        graph = branch.repository.get_graph()
 
1825
        history = list(graph.iter_lefthand_ancestry(branch.last_revision(),
 
1826
            [_mod_revision.NULL_REVISION]))
 
1827
        for revid in reversed(history):
1824
1828
            self.outf.write(revid)
1825
1829
            self.outf.write('\n')
1826
1830