~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2010-05-10 11:34:20 UTC
  • mfrom: (5218 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5221.
  • Revision ID: aaron@aaronbentley.com-20100510113420-toh2d5yioobb5uq1
Merged bzr.dev into transform-commit-full.

Show diffs side-by-side

added added

removed removed

Lines of Context:
422
422
        self.check_revno(4)
423
423
        self.check_revno(4, '../base')
424
424
 
 
425
    def test_bind_directory(self):
 
426
        """Test --directory option"""
 
427
        tree = self.make_branch_and_tree('base')
 
428
        self.build_tree(['base/a', 'base/b'])
 
429
        tree.add('a', 'b')
 
430
        tree.commit(message='init')
 
431
        branch = tree.branch
 
432
        tree.bzrdir.sprout('child')
 
433
        self.run_bzr('bind --directory=child base')
 
434
        d = BzrDir.open('child')
 
435
        self.assertNotEqual(None, d.open_branch().get_master_branch())
 
436
        self.run_bzr('unbind -d child')
 
437
        self.assertEqual(None, d.open_branch().get_master_branch())
 
438
        self.run_bzr('unbind --directory child', retcode=3)
 
439
 
425
440
 
426
441
class TestBind(script.TestCaseWithTransportAndScript):
427
442