310
310
self.assertEqual(repo.get_signature_text('A'),
311
311
d2.open_repository().get_signature_text('A'))
313
def test_missing_revisions(self):
314
t1 = self.make_branch_and_tree('b1')
315
rev1 = t1.commit('one')
316
t2 = t1.bzrdir.sprout('b2').open_workingtree()
317
rev2 = t1.commit('two')
318
rev3 = t1.commit('three')
320
self.assertEqual([rev2, rev3],
321
self.applyDeprecated(deprecated_in((1, 6, 0)),
322
t2.branch.missing_revisions, t1.branch))
325
self.applyDeprecated(deprecated_in((1, 6, 0)),
326
t2.branch.missing_revisions, t1.branch, stop_revision=1))
327
self.assertEqual([rev2],
328
self.applyDeprecated(deprecated_in((1, 6, 0)),
329
t2.branch.missing_revisions, t1.branch, stop_revision=2))
330
self.assertEqual([rev2, rev3],
331
self.applyDeprecated(deprecated_in((1, 6, 0)),
332
t2.branch.missing_revisions, t1.branch, stop_revision=3))
334
self.assertRaises(errors.NoSuchRevision,
335
self.applyDeprecated, deprecated_in((1, 6, 0)),
336
t2.branch.missing_revisions, t1.branch, stop_revision=4)
338
rev4 = t2.commit('four')
339
self.assertRaises(errors.DivergedBranches,
340
self.applyDeprecated, deprecated_in((1, 6, 0)),
341
t2.branch.missing_revisions, t1.branch)
343
313
def test_nicks(self):
344
314
"""Test explicit and implicit branch nicknames.