~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/plugins/weave_fmt/test_bzrdir.py

(jelmer) Deprecate Branch.revision_history(). (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
33
33
    )
34
34
from bzrlib.osutils import (
35
35
    getcwd,
36
 
    lexists,
37
36
    )
38
37
from bzrlib.tests.test_bundle import V4BundleTester
39
38
from bzrlib.tests.test_sftp_transport import TestCaseWithSFTPServer
308
307
        # other tests.
309
308
        self.assertIsInstance(control._format, bzrdir.BzrDirMetaFormat1)
310
309
        b = control.open_branch()
311
 
        self.assertEquals(b.revision_history(),
 
310
        self.addCleanup(b.lock_read().unlock)
 
311
        self.assertEquals(b._revision_history(),
312
312
           ['mbp@sourcefrog.net-20051004035611-176b16534b086b3c',
313
313
            'mbp@sourcefrog.net-20051004035756-235f2b7dcdddd8dd'])
314
314
 
323
323
        self.assertIsInstance(
324
324
            control._format,
325
325
            bzrdir.BzrDirFormat.get_default_format().__class__)
326
 
        rh = b.revision_history()
 
326
        self.addCleanup(b.lock_read().unlock)
 
327
        rh = b._revision_history()
327
328
        eq(rh,
328
329
           ['mbp@sourcefrog.net-20051004035611-176b16534b086b3c',
329
330
            'mbp@sourcefrog.net-20051004035756-235f2b7dcdddd8dd'])
378
379
        self.build_tree_contents(_ghost_template)
379
380
        upgrade.upgrade(u'.')
380
381
        b = branch.Branch.open(u'.')
381
 
        revision_id = b.revision_history()[1]
 
382
        self.addCleanup(b.lock_read().unlock)
 
383
        revision_id = b._revision_history()[1]
382
384
        rev = b.repository.get_revision(revision_id)
383
385
        eq(len(rev.parent_ids), 2)
384
386
        eq(rev.parent_ids[1], 'wibble@wobble-2')
407
409
        self.build_tree_contents(_upgrade_dir_template)
408
410
        upgrade.upgrade('.', bzrdir.BzrDirMetaFormat1())
409
411
        tree = workingtree.WorkingTree.open('.')
410
 
        self.assertEqual([tree.branch.revision_history()[-1]],
 
412
        self.addCleanup(tree.lock_read().unlock)
 
413
        self.assertEqual([tree.branch._revision_history()[-1]],
411
414
            tree.get_parent_ids())
412
415
 
413
416