/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/bzrdir_implementations/test_bzrdir.py

Merge from bzr.dev, resolving the worst of the semantic conflicts, but there's
still a little bit of breakage.

Show diffs side-by-side

added added

removed removed

Lines of Context:
419
419
        self.assertNotEqual(dir.transport.base, target.transport.base)
420
420
        self.assertDirectoriesEqual(dir.root_transport, target.root_transport,
421
421
                                    ['./.bzr/stat-cache',
 
422
                                     './.bzr/checkout/dirstate',
422
423
                                     './.bzr/checkout/stat-cache',
423
424
                                     './.bzr/checkout/merge-hashes',
424
425
                                     './.bzr/merge-hashes',
437
438
        self.skipIfNoWorkingTree(target)
438
439
        self.assertDirectoriesEqual(dir.root_transport, target.root_transport,
439
440
                                    ['./.bzr/stat-cache',
 
441
                                     './.bzr/checkout/dirstate',
440
442
                                     './.bzr/checkout/stat-cache',
441
443
                                     './.bzr/checkout/merge-hashes',
442
444
                                     './.bzr/merge-hashes',
446
448
        target.open_workingtree().revert([])
447
449
        self.assertDirectoriesEqual(dir.root_transport, target.root_transport,
448
450
                                    ['./.bzr/stat-cache',
 
451
                                     './.bzr/checkout/dirstate',
449
452
                                     './.bzr/checkout/stat-cache',
450
453
                                     './.bzr/checkout/merge-hashes',
451
454
                                     './.bzr/merge-hashes',
452
455
                                     './.bzr/repository/inventory.knit',
453
456
                                     ])
454
457
 
455
 
 
456
458
    def test_clone_bzrdir_tree_branch_reference(self):
457
459
        # a tree with a branch reference (aka a checkout) 
458
460
        # should stay a checkout on clone.
880
882
                                    [
881
883
                                     './.bzr/branch/branch.conf',
882
884
                                     './.bzr/branch/parent',
 
885
                                     './.bzr/checkout/dirstate',
883
886
                                     './.bzr/checkout/stat-cache',
884
887
                                     './.bzr/checkout/inventory',
885
888
                                     './.bzr/inventory',
1361
1364
        text = dir._format.get_format_description()
1362
1365
        self.failUnless(len(text))
1363
1366
 
 
1367
    def test_retire_bzrdir(self):
 
1368
        bd = self.make_bzrdir('.')
 
1369
        # must not overwrite existing directories
 
1370
        self.build_tree(['.bzr.retired.0/', '.bzr.retired.0/junk',])
 
1371
        self.failUnlessExists('.bzr')
 
1372
        bd.retire_bzrdir()
 
1373
        self.failIfExists('.bzr')
 
1374
        self.failUnlessExists('.bzr.retired.1')
1364
1375
 
1365
1376
class TestBreakLock(TestCaseWithBzrDir):
1366
1377
 
1456
1467
        bzrlib.ui.ui_factory.stdin = StringIO("y\ny\ny\ny\n")
1457
1468
        try:
1458
1469
            tree.bzrdir.break_lock()
1459
 
        except NotImplementedError:
 
1470
        except (NotImplementedError, errors.LockActive):
1460
1471
            # bzrdir does not support break_lock
 
1472
            # or one of the locked objects (currently only tree does this)
 
1473
            # raised a LockActive because we do still have a live locked
 
1474
            # object.
1461
1475
            tree.unlock()
1462
1476
            return
1463
1477
        self.assertEqual("y\n", bzrlib.ui.ui_factory.stdin.read())