Rev 2689: Supply weave_store.__iter__ for compatibility with check. in http://people.ubuntu.com/~robertc/baz2.0/repository
Robert Collins
robertc at robertcollins.net
Wed Aug 1 05:39:06 BST 2007
At http://people.ubuntu.com/~robertc/baz2.0/repository
------------------------------------------------------------
revno: 2689
revision-id: robertc at robertcollins.net-20070801043901-3ldmyghcbx028519
parent: robertc at robertcollins.net-20070801035157-188zudlolnhuiqp2
committer: Robert Collins <robertc at robertcollins.net>
branch nick: repository
timestamp: Wed 2007-08-01 14:39:01 +1000
message:
Supply weave_store.__iter__ for compatibility with check.
modified:
bzrlib/check.py check.py-20050309040759-f3a679400c06bcc1
bzrlib/repofmt/knitrepo.py knitrepo.py-20070206081537-pyy4a00xdas0j4pf-1
=== modified file 'bzrlib/check.py'
--- a/bzrlib/check.py 2006-10-11 23:08:27 +0000
+++ b/bzrlib/check.py 2007-08-01 04:39:01 +0000
@@ -156,7 +156,7 @@
weave_ids = []
if self.repository.weave_store.listable():
weave_ids = list(self.repository.weave_store)
- n_weaves = len(weave_ids)
+ n_weaves = len(weave_ids) + 1
self.progress.update('checking weave', 0, n_weaves)
self.inventory_weave.check(progress_bar=self.progress)
for i, weave_id in enumerate(weave_ids):
=== modified file 'bzrlib/repofmt/knitrepo.py'
--- a/bzrlib/repofmt/knitrepo.py 2007-07-31 07:12:33 +0000
+++ b/bzrlib/repofmt/knitrepo.py 2007-08-01 04:39:01 +0000
@@ -563,6 +563,14 @@
get_weave = get_weave_or_empty
+ def __iter__(self):
+ """Generate a list of the fileids inserted, for use by check."""
+ self._ensure_all_index()
+ ids = set()
+ for key, value, refs in self.repo._text_all_indices.iter_all_entries():
+ ids.add(key[0])
+ return iter(ids)
+
def name_to_text_index_name(self, name):
"""The text index is the name + .tix."""
return name + '.tix'
More information about the bazaar-commits
mailing list