bzr check reports about inconsistent parents. What this means?

Andrew Bennetts andrew at canonical.com
Thu Nov 29 03:10:27 GMT 2007


John Arbash Meinel wrote:
[...]
> 
> By the way, this patch at least seems to quell the errors:
> === modified file 'bzrlib/check.py'
> - --- bzrlib/check.py     2007-10-26 06:48:09 +0000
> +++ 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,
> @@ -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()
> 
> 
> It basically asks the knits to check only the revisions which are present in
> the knit. I'm not 100% familiar with the code, though. So I'm not positive that
> it is the right fix.
> 
> As an aside, it should make 'bzr check' a lot faster if it doesn't have to
> check every weave for every revision.

That seems reasonable to me; I made the same change to the reconcile code, but I
guess I must have forgotten to look if the corresponding check code needed it
too.

-Andrew.




More information about the bazaar mailing list