/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/test_workingtree.py

  • Committer: Jelmer Vernooij
  • Date: 2020-07-05 12:50:01 UTC
  • mfrom: (7490.40.46 work)
  • mto: (7490.40.48 work)
  • mto: This revision was merged to the branch mainline in revision 7519.
  • Revision ID: jelmer@jelmer.uk-20200705125001-7s3vo0p55szbbws7
Merge lp:brz/3.1.

Show diffs side-by-side

added added

removed removed

Lines of Context:
28
28
    )
29
29
from ..bzr import (
30
30
    bzrdir,
31
 
    conflicts as _mod_bzr_conflicts,
32
31
    workingtree as bzrworkingtree,
33
32
    workingtree_3,
34
33
    workingtree_4,
431
430
        self.build_tree_contents([('this/hello', b'Hello World')])
432
431
        this.commit('Add World')
433
432
        this.merge_from_branch(other.branch)
434
 
        self.assertEqual([_mod_bzr_conflicts.TextConflict('hello', b'hello_id')],
 
433
        self.assertEqual([conflicts.TextConflict('hello', b'hello_id')],
435
434
                         this.conflicts())
436
435
        self._auto_resolve(this)
437
 
        self.assertEqual([_mod_bzr_conflicts.TextConflict('hello', b'hello_id')],
 
436
        self.assertEqual([conflicts.TextConflict('hello', b'hello_id')],
438
437
                         this.conflicts())
439
438
        self.build_tree_contents([('this/hello', '<<<<<<<')])
440
439
        self._auto_resolve(this)
441
 
        self.assertEqual([_mod_bzr_conflicts.TextConflict('hello', b'hello_id')],
 
440
        self.assertEqual([conflicts.TextConflict('hello', b'hello_id')],
442
441
                         this.conflicts())
443
442
        self.build_tree_contents([('this/hello', '=======')])
444
443
        self._auto_resolve(this)
445
 
        self.assertEqual([_mod_bzr_conflicts.TextConflict('hello', b'hello_id')],
 
444
        self.assertEqual([conflicts.TextConflict('hello', b'hello_id')],
446
445
                         this.conflicts())
447
446
        self.build_tree_contents([('this/hello', '\n>>>>>>>')])
448
447
        remaining, resolved = self._auto_resolve(this)
449
 
        self.assertEqual([_mod_bzr_conflicts.TextConflict('hello', b'hello_id')],
 
448
        self.assertEqual([conflicts.TextConflict('hello', b'hello_id')],
450
449
                         this.conflicts())
451
450
        self.assertEqual([], resolved)
452
451
        self.build_tree_contents([('this/hello', b'hELLO wORLD')])
453
452
        remaining, resolved = self._auto_resolve(this)
454
453
        self.assertEqual([], this.conflicts())
455
 
        self.assertEqual([_mod_bzr_conflicts.TextConflict('hello', b'hello_id')],
 
454
        self.assertEqual([conflicts.TextConflict('hello', b'hello_id')],
456
455
                         resolved)
457
456
        self.assertPathDoesNotExist('this/hello.BASE')
458
457
 
488
487
        tree = self.make_branch_and_tree('tree')
489
488
        self.build_tree(['tree/hello/'])
490
489
        tree.add('hello', b'hello-id')
491
 
        file_conflict = _mod_bzr_conflicts.TextConflict('hello', b'hello-id')
492
 
        tree.set_conflicts([file_conflict])
 
490
        file_conflict = conflicts.TextConflict('hello', b'hello-id')
 
491
        tree.set_conflicts(conflicts.ConflictList([file_conflict]))
493
492
        remaining, resolved = self._auto_resolve(tree)
494
493
        self.assertEqual(
495
494
            remaining,
496
 
            conflicts.ConflictList([_mod_bzr_conflicts.TextConflict(u'hello', 'hello-id')]))
 
495
            conflicts.ConflictList([conflicts.TextConflict(u'hello', 'hello-id')]))
497
496
        self.assertEqual(resolved, [])
498
497
 
499
498
    def test_auto_resolve_missing(self):
500
499
        tree = self.make_branch_and_tree('tree')
501
 
        file_conflict = _mod_bzr_conflicts.TextConflict('hello', b'hello-id')
502
 
        tree.set_conflicts([file_conflict])
 
500
        file_conflict = conflicts.TextConflict('hello', b'hello-id')
 
501
        tree.set_conflicts(conflicts.ConflictList([file_conflict]))
503
502
        remaining, resolved = self._auto_resolve(tree)
504
503
        self.assertEqual(remaining, [])
505
504
        self.assertEqual(
506
505
            resolved,
507
 
            conflicts.ConflictList([_mod_bzr_conflicts.TextConflict(u'hello', 'hello-id')]))
 
506
            conflicts.ConflictList([conflicts.TextConflict(u'hello', 'hello-id')]))
508
507
 
509
508
 
510
509
class TestStoredUncommitted(TestCaseWithTransport):