41
41
self.make_branch_and_tree('child',
42
42
format=bzrdir.format_registry.make_bzrdir('weave'))
45
45
def test_bind_format_6_bzrdir(self):
46
46
# bind on a format 6 bzrdir should error
47
47
out,err = self.run_bzr('bind ../master', retcode=3)
51
51
cwd = urlutils.local_path_to_url(getcwd())
52
52
self.assertEqual('bzr: ERROR: To use this feature you must '
53
53
'upgrade your branch at %s/.\n' % cwd, err)
55
55
def test_unbind_format_6_bzrdir(self):
56
56
# bind on a format 6 bzrdir should error
57
57
out,err = self.run_bzr('unbind', retcode=3)
284
284
self.check_revno(1)
286
286
def test_bind_child_ahead(self):
287
# test binding when the master branches history is a prefix of the
287
# test binding when the master branches history is a prefix of the
288
288
# childs - it should bind ok but the revision histories should not
290
290
child_tree = self.create_branches()[1]
317
317
working_dir='tree_1')
318
318
self.assertIs(None, tree.branch.get_bound_location())
320
def test_bind_nick(self):
321
"""Bind should not update implicit nick."""
322
base = self.make_branch_and_tree('base')
323
child = self.make_branch_and_tree('child')
325
self.assertEqual(child.branch.nick, 'child')
326
self.assertEqual(child.branch.get_config().has_explicit_nickname(),
328
self.run_bzr('bind ../base')
329
self.assertEqual(child.branch.nick, base.branch.nick)
330
self.assertEqual(child.branch.get_config().has_explicit_nickname(),
333
def test_bind_explicit_nick(self):
334
"""Bind should update explicit nick."""
335
base = self.make_branch_and_tree('base')
336
child = self.make_branch_and_tree('child')
338
child.branch.nick = "explicit_nick"
339
self.assertEqual(child.branch.nick, "explicit_nick")
340
self.assertEqual(child.branch.get_config()._get_explicit_nickname(),
342
self.run_bzr('bind ../base')
343
self.assertEqual(child.branch.nick, base.branch.nick)
344
self.assertEqual(child.branch.get_config()._get_explicit_nickname(),
320
347
def test_commit_after_merge(self):
321
348
base_tree, child_tree = self.create_branches()