~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_interrepository/__init__.py

  • Committer: Vincent Ladeuil
  • Date: 2010-10-07 06:08:01 UTC
  • mto: This revision was merged to the branch mainline in revision 5491.
  • Revision ID: v.ladeuil+lp@free.fr-20101007060801-wfdhizfhfmctl8qa
Fix some typos and propose a release planning.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
        (label, repository_format, repository_format_to).
50
50
    """
51
51
    result = []
52
 
    for label, repository_format, repository_format_to in formats:
 
52
    for label, repository_format, repository_format_to, extra_setup in formats:
53
53
        id = '%s,%s,%s' % (label, repository_format.__class__.__name__,
54
54
                           repository_format_to.__class__.__name__)
55
55
        scenario = (id,
57
57
             "transport_readonly_server": transport_readonly_server,
58
58
             "repository_format": repository_format,
59
59
             "repository_format_to": repository_format_to,
 
60
             "extra_setup": extra_setup,
60
61
             })
61
62
        result.append(scenario)
62
63
    return result
71
72
        weaverepo,
72
73
        )
73
74
    result = []
74
 
    def add_combo(label, from_format, to_format):
75
 
        result.append((label, from_format, to_format))
 
75
    def add_combo(label, from_format, to_format, extra_setup=None):
 
76
        result.append((label, from_format, to_format, extra_setup))
76
77
    # test the default InterRepository between format 6 and the current
77
78
    # default format.
78
79
    # XXX: robertc 20060220 reinstate this when there are two supported
89
90
    # XXX: although we attach InterRepository class names to these scenarios,
90
91
    # there's nothing asserting that these labels correspond to what is
91
92
    # actually used.
 
93
    def force_known_graph(testcase):
 
94
        from bzrlib.fetch import Inter1and2Helper
 
95
        testcase.overrideAttr(Inter1and2Helper, 'known_graph_threshold', -1)
92
96
    add_combo('InterRepository',
93
97
              weaverepo.RepositoryFormat5(),
94
98
              knitrepo.RepositoryFormatKnit3())
113
117
    add_combo('InterDifferingSerializer',
114
118
              pack_repo.RepositoryFormatKnitPack1(),
115
119
              pack_repo.RepositoryFormatKnitPack6RichRoot())
 
120
    add_combo('InterDifferingSerializer+get_known_graph_ancestry',
 
121
              pack_repo.RepositoryFormatKnitPack1(),
 
122
              pack_repo.RepositoryFormatKnitPack6RichRoot(),
 
123
              force_known_graph,
 
124
              )
116
125
    add_combo('InterDifferingSerializer',
117
126
              pack_repo.RepositoryFormatKnitPack6RichRoot(),
118
127
              groupcompress_repo.RepositoryFormat2a())
132
141
 
133
142
    def setUp(self):
134
143
        super(TestCaseWithInterRepository, self).setUp()
 
144
        if self.extra_setup:
 
145
            self.extra_setup(self)
135
146
 
136
147
    def make_branch(self, relpath, format=None):
137
148
        repo = self.make_repository(relpath, format=format)