~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
 
40
40
    def test_join(self):
41
41
        base_tree, sub_tree = self.make_trees()
42
 
        self.run_bzr('join', 'tree/subtree')
 
42
        self.run_bzr('join tree/subtree')
43
43
        self.check_success('tree')
44
44
 
45
45
    def test_join_dot(self):
46
46
        base_tree, sub_tree = self.make_trees()
47
 
        self.run_bzr('join', '.', working_dir='tree/subtree')
 
47
        self.run_bzr('join .', working_dir='tree/subtree')
48
48
        self.check_success('tree')
49
49
 
50
50
    def test_join_error(self):
53
53
        os.rename('tree/subtree', 'tree/subtree2/subtree')
54
54
        self.run_bzr_error(
55
55
            ('Cannot join .*subtree.  Parent directory is not versioned',),
56
 
             'join', 'tree/subtree2/subtree')
 
56
             'join tree/subtree2/subtree')
57
57
        # disabled because this gives an ugly error at present -- mbp 20070306
58
58
        ## self.run_bzr_error(
59
59
        ##     ('Cannot join .*subtree.  Parent directory is not versioned',),
60
60
        ##      'join', '--reference', 'tree/subtree2/subtree')
61
 
        self.run_bzr_error(('Not a branch:.*subtree2',), 'join',
62
 
                            'tree/subtree2')
 
61
        self.run_bzr_error(('Not a branch:.*subtree2',),
 
62
                           'join tree/subtree2')
63
63
 
64
64
    def test_join_reference(self):
65
65
        """Join can add a reference if --reference is supplied"""
66
66
        base_tree, sub_tree = self.make_trees()
67
 
        self.run_bzr('join', '.', '--reference', working_dir='tree/subtree')
 
67
        self.run_bzr('join . --reference', working_dir='tree/subtree')
68
68
        sub_tree.lock_read()
69
69
        self.addCleanup(sub_tree.unlock)
70
70
        self.assertEqual('file1-id', sub_tree.path2id('file1'))
85
85
        # cannot.
86
86
        tree = self.make_branch_and_tree('tree', format='dirstate')
87
87
        tree2 = self.make_branch_and_tree('tree/subtree')
88
 
        out, err = self.run_bzr('join', '--reference', 'tree/subtree',
89
 
            retcode=3)
90
 
        self.assertContainsRe(err,
91
 
            r"Can't join trees")
92
 
        self.assertContainsRe(err,
93
 
            r"use bzr upgrade")
 
88
        out, err = self.run_bzr('join --reference tree/subtree',
 
89
                                retcode=3)
 
90
        self.assertContainsRe(err, r"Can't join trees")
 
91
        self.assertContainsRe(err, r"use bzr upgrade")
94
92
 
95
93