~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/builtins.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2011-06-19 18:33:40 UTC
  • mfrom: (5972.3.25 get-ancestry-is-evil)
  • Revision ID: pqm@pqm.ubuntu.com-20110619183340-ds1rpql77nxrmo4n
(jelmer) Deprecate Repository.get_ancestry(). (Jelmer Vernooij)

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
        revisions = [revid for revid, parents in
 
1746
            graph.iter_ancestry([last_revision])]
 
1747
        for revision_id in reversed(revisions):
 
1748
            if _mod_revision.is_null(revision_id):
 
1749
                continue
1746
1750
            self.outf.write(revision_id + '\n')
1747
1751
 
1748
1752