~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-06 08:34:03 UTC
  • mfrom: (6191.2.1 843900-url-nameerror)
  • Revision ID: pqm@pqm.ubuntu.com-20111006083403-jnsw0exlirg01aed
(mbp) error message without traceback on invalid ubuntu/debian url (bug
 843900) (Martin Pool)

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
from bzrlib import (
23
23
    branch,
24
24
    bzrdir,
25
 
    controldir,
26
25
    errors,
27
26
    revision as _mod_revision,
28
27
    )
64
63
        self.assertFalse(b._transport.has('branch-name'))
65
64
        b.bzrdir.open_workingtree().commit(message='foo', allow_pointless=True)
66
65
 
67
 
    def test_into_colocated(self):
68
 
        """Branch from a branch into a colocated branch."""
69
 
        self.example_branch('a')
70
 
        out, err = self.run_bzr(
71
 
            'init --format=development-colo file:b,branch=orig')
72
 
        self.assertEqual(
73
 
            """Created a standalone tree (format: development-colo)\n""",
74
 
            out)
75
 
        self.assertEqual('', err)
76
 
        out, err = self.run_bzr(
77
 
            'branch --use-existing-dir a file:b,branch=thiswasa')
78
 
        self.assertEqual('', out)
79
 
        self.assertEqual('Branched 2 revisions.\n', err)
80
 
        out, err = self.run_bzr('branches b')
81
 
        self.assertEqual(" orig\n thiswasa\n", out)
82
 
        self.assertEqual('', err)
83
 
 
84
66
    def test_branch_broken_pack(self):
85
67
        """branching with a corrupted pack file."""
86
68
        self.example_branch('a')
177
159
 
178
160
        def make_shared_tree(path):
179
161
            shared_repo.bzrdir.root_transport.mkdir(path)
180
 
            controldir.ControlDir.create_branch_convenience('repo/' + path)
 
162
            shared_repo.bzrdir.create_branch_convenience('repo/' + path)
181
163
            return WorkingTree.open('repo/' + path)
182
164
        tree_a = make_shared_tree('a')
183
165
        self.build_tree(['repo/a/file'])