/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/per_workingtree/test_merge_from_branch.py

  • Committer: Aaron Bentley
  • Date: 2011-06-09 18:56:55 UTC
  • mto: (5954.6.3 795456-eager-test)
  • mto: This revision was merged to the branch mainline in revision 5968.
  • Revision ID: aaron@aaronbentley.com-20110609185655-zw6tk88vlm2e1b7l
Support merging into null tree.

Show diffs side-by-side

added added

removed removed

Lines of Context:
201
201
        outer.remove(['dir-outer/file3'], keep_files=False)
202
202
        outer.commit('delete file3')
203
203
        nb_conflicts = outer.merge_from_branch(inner, to_revision='3')
204
 
        self.assertEqual(4, nb_conflicts)
 
204
        self.assertEqual(1, nb_conflicts)
205
205
        self.assertTreeLayout(['dir-outer',
206
206
                               'dir-outer/dir',
207
207
                               'dir-outer/dir/file1',
217
217
    def test_file4_added_in_root(self):
218
218
        outer, inner = self.make_outer_tree()
219
219
        nb_conflicts = outer.merge_from_branch(inner, to_revision='4')
220
 
        # file4 could not be added to its original root, so it gets added to
221
 
        # the new root with a conflict.
222
 
        self.assertEqual(1, nb_conflicts)
223
220
        self.assertTreeLayout(['dir-outer',
224
221
                               'dir-outer/dir',
225
222
                               'dir-outer/dir/file1',
230
227
 
231
228
    def test_file4_added_then_renamed(self):
232
229
        outer, inner = self.make_outer_tree()
233
 
        # 1 conflict, because file4 can't be put into the old root
234
 
        self.assertEqual(1, outer.merge_from_branch(inner, to_revision='4'))
235
 
        try:
236
 
            outer.set_conflicts(conflicts.ConflictList())
237
 
        except errors.UnsupportedOperation:
238
 
            # WT2 doesn't have a separate list of conflicts to clear. It
239
 
            # actually says there is a conflict, but happily forgets all about
240
 
            # it.
241
 
            pass
242
230
        outer.commit('added file4')
243
231
        # And now file4 gets renamed into an existing dir
244
232
        nb_conflicts = outer.merge_from_branch(inner, to_revision='5')
245
 
        self.assertEqual(1, nb_conflicts)
246
233
        self.assertTreeLayout(['dir-outer',
247
234
                               'dir-outer/dir',
248
235
                               'dir-outer/dir/file1',