~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2008-10-30 03:56:00 UTC
  • mfrom: (3565.6.13 switch_nick)
  • Revision ID: pqm@pqm.ubuntu.com-20081030035600-ot66vjf0ctaw4guu
(mbp) switch and bind update the branch nick

Show diffs side-by-side

added added

removed removed

Lines of Context:
317
317
                            working_dir='tree_1')
318
318
        self.assertIs(None, tree.branch.get_bound_location())
319
319
 
 
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')
 
324
        os.chdir('child')
 
325
        self.assertEqual(child.branch.nick, 'child')
 
326
        self.assertEqual(child.branch.get_config().has_explicit_nickname(),
 
327
            False)
 
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(),
 
331
            False)
 
332
 
 
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')
 
337
        os.chdir('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(),
 
341
            "explicit_nick")
 
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(),
 
345
            base.branch.nick)
 
346
 
320
347
    def test_commit_after_merge(self):
321
348
        base_tree, child_tree = self.create_branches()
322
349