~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Martin Packman
  • Date: 2012-01-05 09:50:04 UTC
  • mfrom: (6424 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6426.
  • Revision ID: martin.packman@canonical.com-20120105095004-mia9xb7y0efmto0v
Merge bzr.dev to resolve conflicts in bzrlib.builtins

Show diffs side-by-side

added added

removed removed

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