206
206
class Test_GenerateAllRevisions(TestLogWithLogCatcher):
209
super(Test_GenerateAllRevisions, self).setUp()
210
builder = self.make_branch_with_many_merges()
211
b = builder.get_branch()
213
self.addCleanup(b.unlock)
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()
228
236
def test_not_an_ancestor(self):
229
builder = self.make_branch_with_many_merges()
230
b = builder.get_branch()
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)
238
242
def test_wrong_order(self):
239
builder = self.make_branch_with_many_merges()
240
b = builder.get_branch()
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)
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)
249
254
class TestLogRevSpecsWithPaths(TestLogWithLogCatcher):