/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/tests/branch_implementations/test_push.py

  • Committer: Robert Collins
  • Date: 2007-03-29 07:39:49 UTC
  • mto: (2018.18.6 hpss-faster-copy)
  • mto: This revision was merged to the branch mainline in revision 2435.
  • Revision ID: robertc@robertcollins.net-20070329073949-t6qt1arpx375mjek
Make all branch_implementations tests pass.

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 
19
19
import os
20
20
 
 
21
from bzrlib import bzrdir, errors
21
22
from bzrlib.branch import Branch
22
 
from bzrlib import errors
23
23
from bzrlib.memorytree import MemoryTree
24
24
from bzrlib.remote import RemoteBranch
25
25
from bzrlib.revision import NULL_REVISION
26
26
from bzrlib.tests.branch_implementations.test_branch import TestCaseWithBranch
 
27
from bzrlib.transport.local import LocalURLServer
27
28
 
28
29
 
29
30
class TestPush(TestCaseWithBranch):
133
134
        try:
134
135
            tree = a_branch.bzrdir.create_workingtree()
135
136
        except errors.NotLocalUrl:
136
 
            tree = a_branch.create_checkout('repo/tree', lightweight=True)
 
137
            if self.vfs_transport_factory is LocalURLServer:
 
138
                # the branch is colocated on disk, we cannot create a checkout.
 
139
                # hopefully callers will expect this.
 
140
                local_controldir= bzrdir.BzrDir.open(self.get_vfs_only_url('repo/tree'))
 
141
                tree = local_controldir.create_workingtree()
 
142
            else:
 
143
                tree = a_branch.create_checkout('repo/tree', lightweight=True)
137
144
        self.build_tree(['repo/tree/a'])
138
145
        tree.add(['a'])
139
146
        tree.commit('a')