~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Jelmer Vernooij
  • Date: 2011-10-14 12:49:33 UTC
  • mto: This revision was merged to the branch mainline in revision 6216.
  • Revision ID: jelmer@samba.org-20111014124933-732wmdc39ebzga0b
Fix last locking issues.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1785
1785
    @display_command
1786
1786
    def run(self, location="."):
1787
1787
        branch = Branch.open_containing(location)[0]
 
1788
        self.add_cleanup(branch.lock_read().unlock)
1788
1789
        graph = branch.repository.get_graph()
1789
1790
        history = list(graph.iter_lefthand_ancestry(branch.last_revision(),
1790
 
            [_mod_revision.NULL_REVISION])
 
1791
            [_mod_revision.NULL_REVISION]))
1791
1792
        for revid in reversed(history):
1792
1793
            self.outf.write(revid)
1793
1794
            self.outf.write('\n')