~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-01-27 16:27:09 UTC
  • mto: This revision was merged to the branch mainline in revision 6449.
  • Revision ID: jelmer@samba.org-20120127162709-eq21rt2enb9giauw
Fix support for tree-reference unpacking in 2a.

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
        self.assertEqual(['1'], result.open_workingtree().get_parent_ids())
77
77
        self.assertPathDoesNotExist('checkout/added_in_2')
78
78
 
79
 
    def test_checkout_into_empty_dir(self):
80
 
        self.make_bzrdir('checkout')
81
 
        out, err = self.run_bzr(['checkout', 'branch', 'checkout'])
82
 
        result = bzrdir.BzrDir.open('checkout')
83
 
        tree = result.open_workingtree()
84
 
        branch = result.open_branch()
85
 
 
86
79
    def test_checkout_reconstitutes_working_trees(self):
87
80
        # doing a 'bzr checkout' in the directory of a branch with no tree
88
81
        # or a 'bzr checkout path' with path the name of a directory with
176
169
        target_stat = os.stat('target/file1')
177
170
        self.assertEqual(second_stat, target_stat)
178
171
 
179
 
    def test_colo_checkout(self):
180
 
        source = self.make_branch_and_tree('source', format='development-colo')
181
 
        self.build_tree(['source/file1'])
182
 
        source.add('file1')
183
 
        source.commit('added file')
184
 
        target = source.bzrdir.sprout('file:second,branch=somebranch',
185
 
            create_tree_if_local=False)
186
 
        out, err = self.run_bzr('checkout file:,branch=somebranch .',
187
 
            working_dir='second')
188
 
        # We should always be creating a lighweight checkout for colocated
189
 
        # branches.
190
 
        self.assertEquals(
191
 
            target.open_branch(name='somebranch').base,
192
 
            target.get_branch_reference(name=""))
193
 
 
194
172
 
195
173
class TestSmartServerCheckout(TestCaseWithTransport):
196
174
 
223
201
        # being too low. If rpc_count increases, more network roundtrips have
224
202
        # become necessary for this use case. Please do not adjust this number
225
203
        # upwards without agreement from bzr's network support maintainers.
226
 
        self.assertLength(13, self.hpss_calls)
 
204
        self.assertLength(15, self.hpss_calls)
227
205
        self.assertThat(self.hpss_calls, ContainsNoVfsCalls)