~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transform.py

  • Committer: Patch Queue Manager
  • Date: 2012-03-06 19:49:19 UTC
  • mfrom: (6472.2.6 use-bzr-controldir)
  • Revision ID: pqm@pqm.ubuntu.com-20120306194919-kt7mj6xmhifsgees
(jelmer) Use bzrlib.controldir for generic access to control directories,
 rather than bzrlib.bzrdir. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
    transform,
35
35
    urlutils,
36
36
    )
37
 
from bzrlib.bzrdir import BzrDir
38
37
from bzrlib.conflicts import (
39
38
    DeletingParent,
40
39
    DuplicateEntry,
44
43
    ParentLoop,
45
44
    UnversionedParent,
46
45
)
 
46
from bzrlib.controldir import ControlDir
47
47
from bzrlib.diff import show_diff_trees
48
48
from bzrlib.errors import (
49
49
    DuplicateKey,
1645
1645
    def __init__(self, dirname, root_id):
1646
1646
        self.name = dirname
1647
1647
        os.mkdir(dirname)
1648
 
        self.wt = BzrDir.create_standalone_workingtree(dirname)
 
1648
        self.wt = ControlDir.create_standalone_workingtree(dirname)
1649
1649
        self.wt.set_root_id(root_id)
1650
1650
        self.b = self.wt.branch
1651
1651
        self.tt = TreeTransform(self.wt)
1881
1881
    def test_build_tree_with_symlinks(self):
1882
1882
        self.requireFeature(SymlinkFeature)
1883
1883
        os.mkdir('a')
1884
 
        a = BzrDir.create_standalone_workingtree('a')
 
1884
        a = ControlDir.create_standalone_workingtree('a')
1885
1885
        os.mkdir('a/foo')
1886
1886
        with file('a/foo/bar', 'wb') as f: f.write('contents')
1887
1887
        os.symlink('a/foo/bar', 'a/foo/baz')
1888
1888
        a.add(['foo', 'foo/bar', 'foo/baz'])
1889
1889
        a.commit('initial commit')
1890
 
        b = BzrDir.create_standalone_workingtree('b')
 
1890
        b = ControlDir.create_standalone_workingtree('b')
1891
1891
        basis = a.basis_tree()
1892
1892
        basis.lock_read()
1893
1893
        self.addCleanup(basis.unlock)