~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_sftp_transport.py

Branch now uses BzrDir reasonably sanely.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
import socket
19
19
import threading
20
20
 
21
 
from bzrlib.branch import Branch
 
21
from bzrlib.bzrdir import BzrDir
22
22
import bzrlib.errors as errors
23
23
from bzrlib.osutils import pathjoin, lexists
24
24
from bzrlib.tests import TestCaseInTempDir, TestCase, TestSkipped
217
217
 
218
218
    def test_lock_file(self):
219
219
        """Make sure that a Branch accessed over sftp tries to lock itself."""
220
 
        b = Branch.create(self._sftp_url)
 
220
        b = BzrDir.create_branch_and_repo(self._sftp_url)
221
221
        self.failUnlessExists('.bzr/')
222
222
        self.failUnlessExists('.bzr/branch-format')
223
223
        self.failUnlessExists('.bzr/branch-lock')
235
235
        t.add('foo')
236
236
        t.commit('foo', rev_id='a1')
237
237
 
238
 
        os.mkdir('b')
239
 
        b2 = Branch.create(self._sftp_url + '/b')
 
238
        b2 = BzrDir.create_branch_and_repo(self._sftp_url + '/b')
240
239
        b2.pull(b)
241
240
 
242
241
        self.assertEquals(b2.revision_history(), ['a1'])