211
211
direction, include_merges=include_merges))
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)
218
repository = branch.repository
218
219
while revision_ids:
219
revisions = branch.repository.get_revisions(revision_ids[:num])
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)