~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_log.py

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
 
206
206
class Test_GenerateAllRevisions(TestLogWithLogCatcher):
207
207
 
 
208
    def setUp(self):
 
209
        super(Test_GenerateAllRevisions, self).setUp()
 
210
        builder = self.make_branch_with_many_merges()
 
211
        b = builder.get_branch()
 
212
        b.lock_read()
 
213
        self.addCleanup(b.unlock)
 
214
        self.branch = b
 
215
 
208
216
    def make_branch_with_many_merges(self, path='.', format=None):
209
217
        builder = branchbuilder.BranchBuilder(self.get_transport())
210
218
        builder.start_series()
226
234
        return builder
227
235
 
228
236
    def test_not_an_ancestor(self):
229
 
        builder = self.make_branch_with_many_merges()
230
 
        b = builder.get_branch()
231
 
        b.lock_read()
232
 
        self.addCleanup(b.unlock)
233
237
        self.assertRaises(errors.BzrCommandError,
234
238
                          log._generate_all_revisions,
235
 
                          b, '1.1.1', '2.1.3', 'reverse',
 
239
                          self.branch, '1.1.1', '2.1.3', 'reverse',
236
240
                          delayed_graph_generation=True)
237
241
 
238
242
    def test_wrong_order(self):
239
 
        builder = self.make_branch_with_many_merges()
240
 
        b = builder.get_branch()
241
 
        b.lock_read()
242
 
        self.addCleanup(b.unlock)
243
243
        self.assertRaises(errors.BzrCommandError,
244
244
                          log._generate_all_revisions,
245
 
                          b, '5', '2.1.3', 'reverse',
 
245
                          self.branch, '5', '2.1.3', 'reverse',
246
246
                          delayed_graph_generation=True)
247
247
 
 
248
    def test_no_start_rev_id_with_end_rev_id_being_a_merge(self):
 
249
        revs = log._generate_all_revisions(
 
250
            self.branch, None, '2.1.3',
 
251
            'reverse', delayed_graph_generation=True)
 
252
 
248
253
 
249
254
class TestLogRevSpecsWithPaths(TestLogWithLogCatcher):
250
255