No subject


Thu Oct 18 14:49:24 BST 2007


cache the entire repository by calling populate_revs, then they would be
processing a list of versions thinking they were complete when they
weren't. The consequences might be nasty given the sort of code we're
talking about.

It's probably ok to leave this method but I'd add one called
all_file_versions which explicitly checked the cache was fully primed.
Alternatively, reword the docstring to say "This method ensures the
entire repository is cached and ...".


>      def check_file_version_parents(self, weave, file_id):
> -        result = {}
> +        """Check the parents stored in a versioned file are correct.
> +
> +        It also detects file versions that are not referenced by their
> +        corresponding revision's inventory.
> +
> +        :returns: A tuple of (wrong_parents, dangling_file_version).
> +            wrong_parents is a dict mapping {revision_id: (stored_parents,
> +            correct_parents)} for each revision_id where the stored parents
> +            are not correct.  dangling_file_version is a set of revision_ids
> +            for versions that are present in this versioned file, but not used
> +            by the corresponding inventory.
> +        """
> +        wrong_parents = {}
> +        dangling_file_version = set()

dangling_file_versions (plural) would be clearer, both in the docstring
and the code. Code using the API uses the plural name already BTW.

It looks like poolie would be on a plane by now and didn't get his
review to the list so I'll keep going ...

Ian C.



More information about the bazaar mailing list