~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2006-05-25 00:00:13 UTC
  • mfrom: (1711.2.6 jam-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20060525000013-db043ecdc78b88f4
(jam) test case for bug 43713 to prove it was squashed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
276
276
        zf = ZipFile('../first-zip')
277
277
        self.assert_('first-zip/hello' in zf.namelist(), zf.namelist())
278
278
 
279
 
    def test_branch(self):
280
 
        """Branch from one branch to another."""
281
 
        os.mkdir('a')
282
 
        os.chdir('a')
283
 
        self.example_branch()
284
 
        os.chdir('..')
285
 
        self.runbzr('branch a b')
286
 
        b = bzrlib.branch.Branch.open('b')
287
 
        self.assertEqual('b\n', b.control_files.get_utf8('branch-name').read())
288
 
        self.runbzr('branch a c -r 1')
289
 
        os.chdir('b')
290
 
        self.runbzr('commit -m foo --unchanged')
291
 
        os.chdir('..')
292
 
 
293
 
    def test_branch_basis(self):
294
 
        # ensure that basis really does grab from the basis by having incomplete source
295
 
        tree = self.make_branch_and_tree('commit_tree')
296
 
        self.build_tree(['foo'], transport=tree.bzrdir.transport.clone('..'))
297
 
        tree.add('foo')
298
 
        tree.commit('revision 1', rev_id='1')
299
 
        source = self.make_branch_and_tree('source')
300
 
        # this gives us an incomplete repository
301
 
        tree.bzrdir.open_repository().copy_content_into(source.branch.repository)
302
 
        tree.commit('revision 2', rev_id='2', allow_pointless=True)
303
 
        tree.bzrdir.open_branch().copy_content_into(source.branch)
304
 
        tree.copy_content_into(source)
305
 
        self.assertFalse(source.branch.repository.has_revision('2'))
306
 
        dir = source.bzrdir
307
 
        self.runbzr('branch source target --basis commit_tree')
308
 
        target = bzrdir.BzrDir.open('target')
309
 
        self.assertEqual('2', target.open_branch().last_revision())
310
 
        self.assertEqual('2', target.open_workingtree().last_revision())
311
 
        self.assertTrue(target.open_branch().repository.has_revision('2'))
312
 
 
313
279
    def test_inventory(self):
314
280
        bzr = self.runbzr
315
281
        def output_equals(value, *args):