bzr check reports about inconsistent parents. What this means?
Martin Pool
mbp at sourcefrog.net
Thu Nov 29 06:10:29 GMT 2007
> +++ bzrlib/check.py 2007-11-15 18:13:35 +0000
> @@ -208,6 +208,7 @@
> self.inventory_weave.check(progress_bar=self.progress)
> files_in_revisions = {}
> revisions_of_files = {}
> + planned_set = set(self.planned_revisions)
> for i, weave_id in enumerate(weave_ids):
> self.progress.update('checking versionedfile', i, n_weaves)
> w = self.repository.weave_store.get_weave(weave_id,
I tend to use a frozenset when I want a copy of a list like that. I'm
not sure if it's any faster to access but it makes the intent a bit
more clear. I think it is faster when the input is already a set or
frozenset.
> @@ -215,8 +216,9 @@
> # No progress here, because it looks ugly.
> w.check()
>
> + weave_revisions = [v for v in w.versions() if v in planned_set]
> weave_checker = self.repository.get_versioned_file_checker(
> - - self.planned_revisions, self.revision_versions)
> + weave_revisions, self.revision_versions)
> result = weave_checker.check_file_version_parents(w, weave_id)
> bad_parents, dangling_versions = result
> bad_parents = bad_parents.items()
This looks reasonable to me too. Andrew can you merge it if you think
this is right?
--
Martin
More information about the bazaar
mailing list