/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 breezy/tests/blackbox/test_merge.py

  • Committer: Jelmer Vernooij
  • Date: 2020-08-10 15:00:17 UTC
  • mfrom: (7490.40.99 work)
  • mto: This revision was merged to the branch mainline in revision 7521.
  • Revision ID: jelmer@jelmer.uk-20200810150017-vs7xnrd1vat4iktg
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
from breezy import (
28
28
    branch,
29
 
    conflicts,
30
29
    controldir,
31
30
    merge_directive,
32
31
    osutils,
34
33
    urlutils,
35
34
    workingtree,
36
35
    )
 
36
from breezy.bzr import (
 
37
    conflicts,
 
38
    )
37
39
from breezy.tests import (
38
40
    scenarios,
39
41
    script,
328
330
                                              tree_b.get_parent_ids()[0])
329
331
        self.assertEqualDiff(testament_a.as_text(),
330
332
                             testament_b.as_text())
331
 
        tree_a.set_conflicts(conflicts.ConflictList())
 
333
        tree_a.set_conflicts([])
332
334
        tree_a.commit('message')
333
335
        # it is legal to attempt to merge an already-merged bundle
334
336
        err = self.run_bzr('merge ../bundle', working_dir='branch_a')[1]
427
429
        tree_b.commit('content change')
428
430
        self.run_bzr('merge ../tree_a', retcode=1, working_dir='tree_b')
429
431
        self.assertEqual(tree_b.conflicts(),
430
 
                         [conflicts.ContentsConflict('file',
431
 
                                                     file_id='file-id')])
 
432
                         [conflicts.ContentsConflict('file', file_id='file-id')])
432
433
 
433
434
    def test_directive_cherrypick(self):
434
435
        source = self.make_branch_and_tree('source')
632
633
        tree_a.merge_from_branch(tree_b.branch)
633
634
        self.build_tree_contents([('a/file',
634
635
                                   b'base-contents\nthis-contents\n')])
635
 
        tree_a.set_conflicts(conflicts.ConflictList())
 
636
        tree_a.set_conflicts([])
636
637
        tree_b.merge_from_branch(tree_a.branch)
637
638
        self.build_tree_contents([('b/file',
638
639
                                   b'base-contents\nother-contents\n')])
639
 
        tree_b.set_conflicts(conflicts.ConflictList())
 
640
        tree_b.set_conflicts([])
640
641
        tree_a.commit('', rev_id=b'rev3a')
641
642
        tree_b.commit('', rev_id=b'rev3b')
642
643
        out, err = self.run_bzr(['merge', '-d', 'a', 'b', '--lca'], retcode=1)