/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/tests/test_merge.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
17
import os
18
 
from StringIO import StringIO
19
18
 
20
 
from bzrlib import (
 
19
from .. import (
21
20
    branch as _mod_branch,
22
21
    cleanup,
23
22
    conflicts,
32
31
    transform,
33
32
    versionedfile,
34
33
    )
35
 
from bzrlib.conflicts import ConflictList, TextConflict
36
 
from bzrlib.errors import UnrelatedBranches, NoCommits
37
 
from bzrlib.merge import transform_tree, merge_inner, _PlanMerge
38
 
from bzrlib.osutils import basename, pathjoin, file_kind
39
 
from bzrlib.tests import (
 
34
from ..conflicts import ConflictList, TextConflict
 
35
from ..errors import UnrelatedBranches, NoCommits
 
36
from ..merge import transform_tree, merge_inner, _PlanMerge
 
37
from ..osutils import basename, pathjoin, file_kind
 
38
from . import (
40
39
    features,
41
40
    TestCaseWithMemoryTransport,
42
41
    TestCaseWithTransport,
43
42
    test_merge_core,
44
43
    )
45
 
from bzrlib.workingtree import WorkingTree
 
44
from ..workingtree import WorkingTree
46
45
 
47
46
 
48
47
class TestMerge(TestCaseWithTransport):
182
181
        tree_b.lock_write()
183
182
        self.addCleanup(tree_b.unlock)
184
183
        tree_a.commit(message="hello again")
185
 
        log = StringIO()
186
184
        merge_inner(tree_b.branch, tree_a, tree_b.basis_tree(),
187
185
                    this_tree=tree_b, ignore_zero=True)
188
186
        self.assertTrue('All changes applied successfully.\n' not in
288
286
        self.assertFalse('merge4' in [x[0] for x in
289
287
                        merge_type_option.iter_switches()])
290
288
        registry = _mod_merge.get_merge_type_registry()
291
 
        registry.register_lazy('merge4', 'bzrlib.merge', 'Merge4Merger',
 
289
        registry.register_lazy('merge4', 'breezy.merge', 'Merge4Merger',
292
290
                               'time-travelling merge')
293
291
        self.assertTrue('merge4' in [x[0] for x in
294
292
                        merge_type_option.iter_switches()])
520
518
        merger.merge_type = _mod_merge.Merge3Merger
521
519
        conflict_count = merger.do_merge()
522
520
        self.assertEqual(0, conflict_count)
523
 
        self.assertEqual(set([old_root_id]), tree.all_file_ids())
 
521
        self.assertEqual({old_root_id}, tree.all_file_ids())
524
522
        tree.set_parent_ids([])
525
523
 
526
524
    def test_merge_add_into_deleted_root(self):