remote-bzr: iterate revisions properly
authorFelipe Contreras <felipe.contreras@gmail.com>
Wed, 1 May 2013 01:10:08 +0000 (20:10 -0500)
committerJunio C Hamano <gitster@pobox.com>
Wed, 1 May 2013 05:06:47 +0000 (22:06 -0700)
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>
contrib/remote-helpers/git-remote-bzr

index 2e21008..66e3861 100755 (executable)
@@ -286,9 +286,10 @@ def export_branch(repo, name):
     last_revno, _ = branch.last_revision_info()
     total = last_revno - tip_revno
 
-    revs = [revid, seq for revid, _, seq, _ in revs if not marks.is_marked(revid)]
+    for revid, _, seq, _ in revs:
 
-    for revid, seq in revs:
+        if marks.is_marked(revid):
+            continue
 
         rev = repo.get_revision(revid)
         revno = seq[0]