~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/blackbox/test_resolve.py

  • Committer: Jelmer Vernooij
  • Date: 2012-02-01 19:18:09 UTC
  • mfrom: (6459 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6460.
  • Revision ID: jelmer@samba.org-20120201191809-xn340a5i5v4fqsfu
Merge bzr.dev.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
Path conflict: mydir3 / mydir2
37
37
Text conflict in myfile
38
38
$ bzr resolve myfile
39
 
2>1 conflict(s) resolved, 2 remaining
 
39
2>1 conflict resolved, 2 remaining
40
40
$ bzr resolve my_other_file
41
 
2>1 conflict(s) resolved, 1 remaining
 
41
2>1 conflict resolved, 1 remaining
42
42
$ bzr resolve mydir2
43
 
2>1 conflict(s) resolved, 0 remaining
 
43
2>1 conflict resolved, 0 remaining
44
44
""")
45
45
 
46
46
    def test_resolve_all(self):
47
47
        self.run_script("""\
48
48
$ cd branch
49
49
$ bzr resolve --all
50
 
2>3 conflict(s) resolved, 0 remaining
 
50
2>3 conflicts resolved, 0 remaining
51
51
$ bzr conflicts
52
52
""")
53
53
 
56
56
$ mkdir branch/subdir
57
57
$ cd branch/subdir
58
58
$ bzr resolve ../myfile
59
 
2>1 conflict(s) resolved, 2 remaining
 
59
2>1 conflict resolved, 2 remaining
60
60
""")
61
61
 
62
62
    def test_resolve_via_directory_option(self):
63
63
        self.run_script("""\
64
64
$ bzr resolve -d branch myfile
65
 
2>1 conflict(s) resolved, 2 remaining
 
65
2>1 conflict resolved, 2 remaining
66
66
""")
67
67
 
68
68
    def test_resolve_all_via_directory_option(self):
69
69
        self.run_script("""\
70
70
$ bzr resolve -d branch --all
71
 
2>3 conflict(s) resolved, 0 remaining
 
71
2>3 conflicts resolved, 0 remaining
72
72
$ bzr conflicts -d branch
73
73
""")
74
74
 
107
107
$ bzr resolve --take-other
108
108
2>deleted dir/file.THIS
109
109
2>deleted dir
110
 
2>3 conflict(s) resolved, 0 remaining
 
110
2>3 conflicts resolved, 0 remaining
111
111
''')
112
112
 
113
113
 
123
123
        file_conflict = conflicts.TextConflict('file', file_id='file_id')
124
124
        tree.set_conflicts(conflicts.ConflictList([file_conflict]))
125
125
        note = self.run_bzr('resolve', retcode=1, working_dir='tree')[1]
126
 
        self.assertContainsRe(note, '0 conflict\\(s\\) auto-resolved.')
 
126
        self.assertContainsRe(note, '0 conflicts auto-resolved.')
127
127
        self.assertContainsRe(note,
128
128
            'Remaining conflicts:\nText conflict in file')
129
129
        self.build_tree_contents([('tree/file', 'a\n')])