[MERGE][0.92] Fix bug 155730: force file versions with unreferenced parents to be stored as fulltexts.
Ian Clatworthy
ian.clatworthy at internode.on.net
Fri Oct 26 04:21:45 BST 2007
Andrew Bennetts wrote:
> This bundle fixes bug 155730, which is marked critical because it makes it hard
> for affected repositories (like bzr.dev!) to be converted to the just-merged
> pack format.
bb: comment
I'm still working my way through this but here are some initial comments.
> === modified file 'bzrlib/check.py'
> --- bzrlib/check.py 2007-10-12 03:06:52 +0000
> +++ bzrlib/check.py 2007-10-24 10:52:24 +0000
> @@ -214,10 +214,13 @@
> weave_checker = self.repository.get_versioned_file_checker(
> self.planned_revisions, self.revision_versions)
> result = weave_checker.check_file_version_parents(w, weave_id)
> -
> - for revision_id, (weave_parents,correct_parents) in result.items():
> + bad_parents, dangling_versions = result
> + bad_parents = bad_parents.items()
> + for revision_id, (weave_parents,correct_parents) in bad_parents:
The original bug mentioned that 'bzr check' never complained even though
a genuine problem existed. This change fixes check.py to exist the new
API but still isn't reporting the issue as best I can see. In other
words, dangling_versions being non-empty ought to trigger some output I
think.
> === modified file 'bzrlib/repository.py'
> --- bzrlib/repository.py 2007-10-19 17:00:10 +0000
> +++ bzrlib/repository.py 2007-10-25 00:14:05 +0000
> @@ -2535,6 +2535,19 @@
> self.revision_parents[revision_id] = parents
> return parents
>
> + def used_file_versions(self):
> + """Return a set of (revision_id, file_id) pairs for each file version
> + referenced by any inventory cached by this _RevisionTextVersionCache.
> +
> + If the entire repository has been cached, this can be used to find all
More information about the bazaar
mailing list