/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/blackbox/test_join.py

  • Committer: Martin Pool
  • Date: 2007-03-07 01:31:55 UTC
  • mto: (2321.1.1 integration)
  • mto: This revision was merged to the branch mainline in revision 2322.
  • Revision ID: mbp@sourcefrog.net-20070307013155-kxvc6ppleyv8jswg
Add blackbox test that join gives clean error when the repository doesn't support rich roots

Show diffs side-by-side

added added

removed removed

Lines of Context:
77
77
        self.assertTrue('file1-id' not in base_tree)
78
78
        self.assertEqual('subtree-root-id', base_tree.path2id('subtree'))
79
79
        self.assertEqual('subtree', base_tree.id2path('subtree-root-id'))
 
80
 
 
81
    def test_references_check_repository_support(self):
 
82
        """Users are stopped from adding a reference that can't be committed."""
 
83
        # in 0.15 the default format has a dirstate workingtree, that can
 
84
        # support tree references, but the default repository format 
 
85
        # cannot.
 
86
        tree = self.make_branch_and_tree('tree', format='dirstate')
 
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")
 
94
 
 
95