~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: v.ladeuil+lp at free
  • Date: 2007-01-09 15:44:23 UTC
  • mfrom: (2227 +trunk)
  • mto: (2323.7.1 redirection)
  • mto: This revision was merged to the branch mainline in revision 2390.
  • Revision ID: v.ladeuil+lp@free.fr-20070109154423-lyvr5gmkwv6e0v6h
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import os
21
21
 
22
22
import bzrlib
 
23
from bzrlib import (
 
24
    bzrdir,
 
25
    )
23
26
from bzrlib.branch import Branch
24
27
from bzrlib.bzrdir import (BzrDir,
25
28
                           BzrDirFormat,
34
37
 
35
38
    def create_branches(self):
36
39
        self.build_tree(['base/', 'base/a', 'base/b'])
37
 
        old_format = BzrDirFormat.get_default_format()
38
 
        BzrDirFormat.set_default_format(BzrDirMetaFormat1())
39
 
        try:
40
 
            wt_base = BzrDir.create_standalone_workingtree('base')
41
 
        finally:
42
 
            BzrDirFormat.set_default_format(old_format)
 
40
        format = bzrdir.format_registry.make_bzrdir('knit')
 
41
        wt_base = BzrDir.create_standalone_workingtree('base',
 
42
            format=format)
43
43
    
44
44
        b_base = wt_base.branch
45
45
 
72
72
        # manually make a branch we can bind, because the default format
73
73
        # may not be bindable-from, and we want to test the side effects etc
74
74
        # of bondage.
75
 
        old_format = BzrDirFormat.get_default_format()
76
 
        BzrDirFormat.set_default_format(BzrDirMetaFormat1())
77
 
        try:
78
 
            b_child = BzrDir.create_branch_convenience('child')
79
 
        finally:
80
 
            BzrDirFormat.set_default_format(old_format)
 
75
        format = bzrdir.format_registry.make_bzrdir('knit')
 
76
        b_child = BzrDir.create_branch_convenience('child', format=format)
81
77
        self.assertEqual(None, b_child.get_bound_location())
82
78
        self.assertEqual(None, b_child.get_master_branch())
83
79