~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Jelmer Vernooij
  • Date: 2011-06-16 11:44:06 UTC
  • mto: This revision was merged to the branch mainline in revision 5987.
  • Revision ID: jelmer@samba.org-20110616114406-9d8dt6uai0a0mq95
Use iter_ancestry in 'bzr ancestry'.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1740
1740
            b = wt.branch
1741
1741
            last_revision = wt.last_revision()
1742
1742
 
1743
 
        revision_ids = b.repository.get_ancestry(last_revision)
1744
 
        revision_ids.pop(0)
1745
 
        for revision_id in revision_ids:
 
1743
        self.add_cleanup(b.repository.lock_read().unlock)
 
1744
        graph = b.repository.get_graph()
 
1745
        for revision_id, parents in graph.iter_ancestry([last_revision]):
 
1746
            if _mod_revision.is_null(revision_id):
 
1747
                continue
1746
1748
            self.outf.write(revision_id + '\n')
1747
1749
 
1748
1750