~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_sftp_transport.py

  • Committer: Martin Pool
  • Date: 2006-02-01 12:24:35 UTC
  • mfrom: (1534.4.32 branch-formats)
  • mto: This revision was merged to the branch mainline in revision 1553.
  • Revision ID: mbp@sourcefrog.net-20060201122435-53f3efb1b5749fe1
[merge] branch-formats branch, and reconcile changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
from bzrlib.osutils import pathjoin, lexists
24
24
from bzrlib.tests import TestCaseInTempDir, TestCase, TestSkipped
25
25
import bzrlib.transport
 
26
from bzrlib.workingtree import WorkingTree
26
27
 
27
28
try:
28
29
    import paramiko
216
217
 
217
218
    def test_lock_file(self):
218
219
        """Make sure that a Branch accessed over sftp tries to lock itself."""
219
 
        b = Branch.initialize(self._sftp_url)
 
220
        b = Branch.create(self._sftp_url)
220
221
        self.failUnlessExists('.bzr/')
221
222
        self.failUnlessExists('.bzr/branch-format')
222
223
        self.failUnlessExists('.bzr/branch-lock')
228
229
        self.failIf(lexists('.bzr/branch-lock.write-lock'))
229
230
 
230
231
    def test_no_working_tree(self):
231
 
        b = Branch.initialize(self._sftp_url)
 
232
        b = Branch.create(self._sftp_url)
232
233
        self.assertRaises(errors.NoWorkingTree, b.working_tree)
233
234
 
234
235
    def test_push_support(self):
235
236
        self.build_tree(['a/', 'a/foo'])
236
 
        b = Branch.initialize('a')
237
 
        t = b.working_tree()
 
237
        t = WorkingTree.create_standalone('a')
 
238
        b = t.branch
238
239
        t.add('foo')
239
240
        t.commit('foo', rev_id='a1')
240
241
 
241
242
        os.mkdir('b')
242
 
        b2 = Branch.initialize(self._sftp_url + '/b')
 
243
        b2 = Branch.create(self._sftp_url + '/b')
243
244
        b2.pull(b)
244
245
 
245
246
        self.assertEquals(b2.revision_history(), ['a1'])