~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Aaron Bentley
  • Date: 2007-03-16 15:14:40 UTC
  • mto: This revision was merged to the branch mainline in revision 2389.
  • Revision ID: abentley@panoramicfeedback.com-20070316151440-kwqaumvxjcyiurv2
Change bundle reader and merge directive to both be 'mergeables'

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
        self.assertEqual('bar-id', wt.last_revision())
134
134
 
135
135
    def test_manual_pull_user_r(self):
136
 
        """If the user supplies -r, it overrides the directive's revision"""
 
136
        """If the user supplies -r, an error is emitted"""
137
137
        self.prepare_merge_directive()
138
138
        self.tree1.commit('baz', rev_id='baz-id')
139
139
        md_text = self.run_bzr('merge-directive', self.tree2.basedir,
140
140
                               self.tree1.basedir, '--plain')[0]
141
141
        self.build_tree_contents([('../directive', md_text)])
142
142
        os.chdir('../tree2')
143
 
        self.run_bzr('pull', '-r', '2', '../directive')
144
 
        wt = workingtree.WorkingTree.open('.')
145
 
        self.assertEqual('bar-id', wt.last_revision())
 
143
        self.run_bzr_error(
 
144
            ('Cannot use -r with merge directives or bundles',),
 
145
            'pull', '-r', '2', '../directive')
146
146
 
147
147
    def test_manual_pull_bundle(self):
148
148
        self.prepare_merge_directive()
167
167
        self.assertEqual('bar-id', wt.get_parent_ids()[1])
168
168
 
169
169
    def test_manual_merge_user_r(self):
170
 
        """If the user supplies -r, it overrides the directive's revision"""
 
170
        """If the user supplies -r, an error is emitted"""
171
171
        self.prepare_merge_directive()
172
172
        self.tree1.commit('baz', rev_id='baz-id')
173
173
        md_text = self.run_bzr('merge-directive', self.tree2.basedir,
174
174
                               self.tree1.basedir, '--plain')[0]
175
175
        self.build_tree_contents([('../directive', md_text)])
176
176
        os.chdir('../tree2')
177
 
        self.run_bzr('merge', '-r', '2', '../directive')
178
 
        wt = workingtree.WorkingTree.open('.')
179
 
        self.assertEqual('bar-id', wt.get_parent_ids()[1])
 
177
        self.run_bzr_error(
 
178
            ('Cannot use -r with merge directives or bundles',),
 
179
            'merge', '-r', '2', '../directive')
180
180
 
181
181
    def test_manual_merge_bundle(self):
182
182
        self.prepare_merge_directive()