per_workingtree tests don't use reasonable permutations for WT6

Bug #604957 reported by John A Meinel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Bazaar
Confirmed
High
Unassigned
Breezy
Triaged
High
Unassigned

Bug Description

The WorkingTree permutation tests use WT._matchingbzrdir to figure out what repository and branch formats to use with the given working tree.

DirStateWorkingTreeFormat has this:
    def __get_matchingbzrdir(self):
        return self._get_matchingbzrdir()

    def _get_matchingbzrdir(self):
        """Overrideable method to get a bzrdir for testing."""
        # please test against something that will let us do tree references
        return bzrdir.format_registry.make_bzrdir(
            'dirstate-with-subtree')

    _matchingbzrdir = property(__get_matchingbzrdir)

The goal of having a permutation against a subtree compatible format is reasonable. The main loss is that WT4,5,6 all inherit from this format. Which means that when testing WT6 we don't use the 2a default format that you get when doing 'bzr init' you get Knit3 as the repository.

And because of bugs like bug #???? this doesn't actually test the live code paths that are used for 'bzr commit' in a new 2a format branch+repo+wt.

A simple fix is to just set def _get_matchingbzrdir() for WT6. One of the arguments Martin had, was that the working tree formats really shouldn't inherit from each other. WT6 *is not* a WT5, at best it is a sibling, but certainly shouldn't be a child.

Also, we still need to answer the question as to whether the WT permutations should all be permuted against the latest repository format, or the format most likely to be created along with the wt format, or both the latest and an older one, or...

Note that most code paths in WT are independent, but the subtree support specifically is effected. (WT6 claims subtree support if the backing repo supports subtrees, and that currently changes commit code paths.)

This goes back all the way to the 2.0 branch. And there is concern that we have a fair number of hidden bugs because our permutation tests weren't actually testing what we thought.

Tags: selftest
Jelmer Vernooij (jelmer)
tags: added: selftest
Jelmer Vernooij (jelmer)
tags: added: check-for-breezy
Jelmer Vernooij (jelmer)
Changed in brz:
status: New → Triaged
importance: Undecided → High
assignee: nobody → Jelmer Vernooij (jelmer)
tags: removed: check-for-breezy
Jelmer Vernooij (jelmer)
Changed in brz:
assignee: Jelmer Vernooij (jelmer) → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.