~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-04-02 01:44:26 UTC
  • mfrom: (6518 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6519.
  • Revision ID: jelmer@samba.org-20120402014426-0o5qtysohyl006b2
merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
25
25
 
26
26
from bzrlib import (
27
27
    branch,
28
 
    bzrdir,
29
28
    check,
 
29
    controldir,
30
30
    errors,
31
31
    push,
32
32
    symbol_versioning,
34
34
    vf_repository,
35
35
    )
36
36
from bzrlib.branch import Branch
37
 
from bzrlib.bzrdir import BzrDir
 
37
from bzrlib.controldir import ControlDir
38
38
from bzrlib.memorytree import MemoryTree
39
39
from bzrlib.revision import NULL_REVISION
40
40
from bzrlib.smart.repository import SmartServerRepositoryGetParentMap
64
64
        # result object contains some structured data
65
65
        self.assertEqual(result.old_revid, 'M1')
66
66
        self.assertEqual(result.new_revid, 'P2')
67
 
        # and it can be treated as an integer for compatibility
68
 
        self.assertEqual(self.applyDeprecated(
69
 
            symbol_versioning.deprecated_in((2, 3, 0)),
70
 
            result.__int__),
71
 
            0)
72
67
 
73
68
    def test_push_merged_indirect(self):
74
69
        # it should be possible to do a push from one branch into another
165
160
            if self.vfs_transport_factory is test_server.LocalURLServer:
166
161
                # the branch is colocated on disk, we cannot create a checkout.
167
162
                # hopefully callers will expect this.
168
 
                local_controldir = bzrdir.BzrDir.open(self.get_vfs_only_url('repo/tree'))
 
163
                local_controldir = controldir.ControlDir.open(self.get_vfs_only_url('repo/tree'))
169
164
                tree = local_controldir.create_workingtree()
170
165
            else:
171
166
                tree = a_branch.create_checkout('repo/tree', lightweight=True)
349
344
            # remotebranches can't be bound.  Let's instead make a new local
350
345
            # branch of the default type, which does allow binding.
351
346
            # See https://bugs.launchpad.net/bzr/+bug/112020
352
 
            local = BzrDir.create_branch_convenience('local2')
 
347
            local = ControlDir.create_branch_convenience('local2')
353
348
            local.bind(target)
354
349
        source = self.make_from_branch('source')
355
350
        Branch.hooks.install_named_hook('post_push',