Rev 1722: Fix set moving while iterating. in file:///data/jelmer/bzr-svn/trunk/

Jelmer Vernooij jelmer at samba.org
Sat Aug 30 22:20:24 BST 2008


At file:///data/jelmer/bzr-svn/trunk/

------------------------------------------------------------
revno: 1722
revision-id: jelmer at samba.org-20080830212022-pcf5jue8wctt6257
parent: jelmer at samba.org-20080830211114-xnl50ubkekvqcrsp
committer: Jelmer Vernooij <jelmer at samba.org>
branch nick: trunk
timestamp: Sat 2008-08-30 23:20:22 +0200
message:
  Fix set moving while iterating.
modified:
  fetch.py                       fetch.py-20060625004942-x2lfaib8ra707a8p-1
=== modified file 'fetch.py'
--- a/fetch.py	2008-08-28 14:41:24 +0000
+++ b/fetch.py	2008-08-30 21:20:22 +0000
@@ -655,7 +655,7 @@
             checked = set()
         if revision_id in checked:
             return []
-        extra = set()
+        extra = []
         def check_revid(revision_id):
             revs = []
             meta_map = {}
@@ -678,7 +678,7 @@
                 if revid in checked:
                     # This revision (and its ancestry) has already been checked
                     break
-                extra.update(parent_ids[1:])
+                extra.append(parent_ids[1:])
                 if not self.target.has_revision(revid):
                     revs.append(revid)
                 elif not find_ghosts:
@@ -689,7 +689,8 @@
 
         needed = check_revid(revision_id)
 
-        for revid in extra:
+        while len(extra) > 0:
+            revid = extra.pop()
             if revid not in checked:
                 needed += check_revid(revid)
 




More information about the bazaar-commits mailing list