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