~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/log.py

  • Committer: Aaron Bentley
  • Date: 2006-06-25 21:04:37 UTC
  • mto: This revision was merged to the branch mainline in revision 1811.
  • Revision ID: aaron.bentley@utoronto.ca-20060625210437-177daa5dfc94f0a1
Tweaks from review

Show diffs side-by-side

added added

removed removed

Lines of Context:
211
211
                          direction, include_merges=include_merges))
212
212
 
213
213
    def iter_revisions():
 
214
        # r = revision, n = revno, d = merge depth
214
215
        revision_ids = [r for r, n, d in view_revisions]
215
216
        zeros = set(r for r, n, d in view_revisions if d == 0)
216
217
        num = 9
217
 
        cur_deltas = {}
 
218
        repository = branch.repository
218
219
        while revision_ids:
219
 
            revisions = branch.repository.get_revisions(revision_ids[:num])
 
220
            cur_deltas = {}
 
221
            revisions = repository.get_revisions(revision_ids[:num])
220
222
            if verbose or specific_fileid:
221
223
                delta_revisions = [r for r in revisions if
222
224
                                   r.revision_id in zeros]
223
 
                deltas = branch.repository.get_revision_deltas(delta_revisions)
224
 
                cur_deltas = dict(zip((d.revision_id for d in 
225
 
                                       delta_revisions), deltas))
 
225
                deltas = repository.get_deltas_for_revisions(delta_revisions)
 
226
                cur_deltas = dict(izip((r.revision_id for r in 
 
227
                                        delta_revisions), deltas))
226
228
            for revision in revisions:
 
229
                # The delta value will be None unless
 
230
                # 1. verbose or specific_fileid is specified, and
 
231
                # 2. the revision is a mainline revision
227
232
                yield revision, cur_deltas.get(revision.revision_id)
228
233
            revision_ids  = revision_ids[num:]
229
234
            num = int(num * 1.5)