~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-05-06 14:50:40 UTC
  • mfrom: (4338.1.1 integration)
  • Revision ID: pqm@pqm.ubuntu.com-20090506145040-n94tm9ju7m2cb4r6
(igc) reconfigure --standalone no longer raises
        IncompatibleRepositories (Martin von Gagern)

Show diffs side-by-side

added added

removed removed

Lines of Context:
58
58
        checkout = branch.create_checkout('checkout', lightweight=True)
59
59
        self.run_bzr('reconfigure --checkout checkout')
60
60
 
 
61
    def test_lightweight_checkout_to_tree(self):
 
62
        branch = self.make_branch('branch')
 
63
        checkout = branch.create_checkout('checkout', lightweight=True)
 
64
        self.run_bzr('reconfigure --tree checkout')
 
65
 
61
66
    def test_no_args(self):
62
67
        branch = self.make_branch('branch')
63
68
        self.run_bzr_error(['No target configuration specified'],
127
132
            working_dir='repo/branch')
128
133
        self.failUnlessExists('repo/branch/foo')
129
134
        tree = workingtree.WorkingTree.open('repo/branch')
 
135
 
 
136
    def test_shared_format_to_standalone(self, format=None):
 
137
        repo = self.make_repository('repo', shared=True, format=format)
 
138
        branch = bzrdir.BzrDir.create_branch_convenience('repo/tree')
 
139
        self.assertNotEqual(branch.bzrdir.root_transport.base,
 
140
            branch.repository.bzrdir.root_transport.base)
 
141
        tree = workingtree.WorkingTree.open('repo/tree')
 
142
        self.build_tree_contents([('repo/tree/file', 'foo\n')]);
 
143
        tree.add(['file'])
 
144
        tree.commit('added file')
 
145
        self.run_bzr('reconfigure --standalone', working_dir='repo/tree')
 
146
        tree = workingtree.WorkingTree.open('repo/tree')
 
147
        self.build_tree_contents([('repo/tree/file', 'bar\n')]);
 
148
        self.check_file_contents('repo/tree/file', 'bar\n')
 
149
        self.run_bzr('revert', working_dir='repo/tree')
 
150
        self.check_file_contents('repo/tree/file', 'foo\n')
 
151
        self.assertEqual(tree.bzrdir.root_transport.base,
 
152
            tree.branch.repository.bzrdir.root_transport.base)
 
153
 
 
154
    def test_shared_knit_to_standalone(self):
 
155
        self.test_shared_format_to_standalone('knit')
 
156
 
 
157
    def test_shared_pack092_to_standalone(self):
 
158
        self.test_shared_format_to_standalone('pack-0.92')
 
159
 
 
160
    def test_shared_rich_root_pack_to_standalone(self):
 
161
        self.test_shared_format_to_standalone('rich-root-pack')
 
162
 
 
163
    def test_lightweight_format_checkout_to_tree(self, format=None):
 
164
        branch = self.make_branch('branch', format=format)
 
165
        checkout = branch.create_checkout('checkout', lightweight=True)
 
166
        tree = workingtree.WorkingTree.open('checkout')
 
167
        self.build_tree_contents([('checkout/file', 'foo\n')]);
 
168
        tree.add(['file'])
 
169
        tree.commit('added file')
 
170
        self.run_bzr('reconfigure --tree', working_dir='checkout')
 
171
        tree = workingtree.WorkingTree.open('checkout')
 
172
        self.build_tree_contents([('checkout/file', 'bar\n')]);
 
173
        self.check_file_contents('checkout/file', 'bar\n')
 
174
        self.run_bzr('revert', working_dir='checkout')
 
175
        self.check_file_contents('checkout/file', 'foo\n')
 
176
 
 
177
    def test_lightweight_knit_checkout_to_tree(self, format=None):
 
178
        self.test_lightweight_format_checkout_to_tree('knit')
 
179
 
 
180
    def test_lightweight_pack092_checkout_to_tree(self, format=None):
 
181
        self.test_lightweight_format_checkout_to_tree('pack-0.92')
 
182
 
 
183
    def test_lightweight_rich_root_pack_checkout_to_tree(self, format=None):
 
184
        self.test_lightweight_format_checkout_to_tree('rich-root-pack')