~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2011-10-13 14:09:11 UTC
  • mfrom: (6207.2.1 colo-fixes)
  • Revision ID: pqm@pqm.ubuntu.com-20111013140911-c2zv6a9pux62xnr9
(jelmer) Add support for cloning into a colocated branch. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
        self.assertFalse(b._transport.has('branch-name'))
64
64
        b.bzrdir.open_workingtree().commit(message='foo', allow_pointless=True)
65
65
 
 
66
    def test_into_colocated(self):
 
67
        """Branch from a branch into a colocated branch."""
 
68
        self.example_branch('a')
 
69
        out, err = self.run_bzr(
 
70
            'init --format=development-colo file:b,branch=orig')
 
71
        self.assertEqual(
 
72
            """Created a standalone tree (format: development-colo)\n""",
 
73
            out)
 
74
        self.assertEqual('', err)
 
75
        out, err = self.run_bzr(
 
76
            'branch --use-existing-dir a file:b,branch=thiswasa')
 
77
        self.assertEqual('', out)
 
78
        self.assertEqual('Branched 2 revisions.\n', err)
 
79
        out, err = self.run_bzr('branches b')
 
80
        self.assertEqual(" orig\n thiswasa\n", out)
 
81
        self.assertEqual('', err)
 
82
 
66
83
    def test_branch_broken_pack(self):
67
84
        """branching with a corrupted pack file."""
68
85
        self.example_branch('a')