243
243
self.assertEqual('ftp://bazaar-vcs.org', branch.get_bound_location())
245
245
def test_set_revision_history(self):
246
tree = self.make_branch_and_memory_tree('.',
247
format=self.get_format_name())
251
tree.commit('foo', rev_id='foo')
252
tree.commit('bar', rev_id='bar')
253
tree.branch.set_revision_history(['foo', 'bar'])
254
tree.branch.set_revision_history(['foo'])
255
self.assertRaises(errors.NotLefthandHistory,
256
tree.branch.set_revision_history, ['bar'])
246
builder = self.make_branch_builder('.', format=self.get_format_name())
247
builder.build_snapshot('foo', None,
248
[('add', ('', None, 'directory', None))],
250
builder.build_snapshot('bar', None, [], message='bar')
251
branch = builder.get_branch()
253
self.addCleanup(branch.unlock)
254
branch.set_revision_history(['foo', 'bar'])
255
branch.set_revision_history(['foo'])
256
self.assertRaises(errors.NotLefthandHistory,
257
branch.set_revision_history, ['bar'])
260
259
def do_checkout_test(self, lightweight=False):
261
260
tree = self.make_branch_and_tree('source',