~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_bound_branches.py

  • Committer: Andrew Bennetts
  • Date: 2007-03-28 07:08:42 UTC
  • mfrom: (2380 +trunk)
  • mto: (2018.5.146 hpss)
  • mto: This revision was merged to the branch mainline in revision 2414.
  • Revision ID: andrew.bennetts@canonical.com-20070328070842-r843houy668oxb9o
Merge from bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
102
102
 
103
103
        self.run_bzr('unbind', retcode=3)
104
104
 
 
105
    def test_bind_branch6(self):
 
106
        branch1 = self.make_branch('branch1', format='dirstate-tags')
 
107
        os.chdir('branch1')
 
108
        error = self.run_bzr('bind', retcode=3)[1]
 
109
        self.assertContainsRe(error, 'no previous location known')
 
110
 
 
111
    def setup_rebind(self, format):
 
112
        branch1 = self.make_branch('branch1')
 
113
        branch2 = self.make_branch('branch2', format=format)
 
114
        branch2.bind(branch1)
 
115
        branch2.unbind()
 
116
 
 
117
    def test_rebind_branch6(self):
 
118
        self.setup_rebind('dirstate-tags')
 
119
        os.chdir('branch2')
 
120
        self.run_bzr('bind')
 
121
        b = Branch.open('.')
 
122
        self.assertContainsRe(b.get_bound_location(), '\/branch1\/$')
 
123
 
 
124
    def test_rebind_branch5(self):
 
125
        self.setup_rebind('knit')
 
126
        os.chdir('branch2')
 
127
        error = self.run_bzr('bind', retcode=3)[1]
 
128
        self.assertContainsRe(error, 'old locations')
 
129
 
105
130
    def init_meta_branch(self, path):
106
131
        format = bzrdir.format_registry.make_bzrdir('knit')
107
132
        return BzrDir.create_branch_convenience(path, format=format)