remote-bzr: iterate revisions properly

This way we don't need to store the list of all the revisions, which doesn't seem to be very memory efficient with bazaar's design, for whatever reason. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Felipe Contreras committed Apr 30, 2013 at 20:10 UTC 38cecbdf52a081b732726180ad5e182d15117914
1 file changed +3 -2
contrib/remote-helpers/git-remote-bzr
+3 -2
@@ -286,9 +286,10 @@ def export_branch(repo, name):
286 last_revno, _ = branch.last_revision_info()
287 total = last_revno - tip_revno
288
289 - revs = [revid, seq for revid, _, seq, _ in revs if not marks.is_marked(revid)]
289 + for revid, _, seq, _ in revs:
290
291 - for revid, seq in revs:
291 + if marks.is_marked(revid):
292 + continue
293
294 rev = repo.get_revision(revid)
295 revno = seq[0]