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

  • Committer: Jelmer Vernooij
  • Date: 2017-05-21 19:09:26 UTC
  • mfrom: (6622.1.36 breezy)
  • Revision ID: jelmer@jelmer.uk-20170521190926-5vtz8xaf0e9ylrpc
Merge rename to breezy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
# along with this program; if not, write to the Free Software
15
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
16
16
 
17
 
from bzrlib import (
 
17
from breezy import (
18
18
    conflicts,
19
19
    tests,
20
20
    )
21
 
from bzrlib.tests import script
22
 
from bzrlib.tests.blackbox import test_conflicts
 
21
from breezy.tests import script
 
22
from breezy.tests.blackbox import test_conflicts
23
23
 
24
24
 
25
25
class TestResolve(script.TestCaseWithTransportAndScript):
31
31
    def test_resolve_one_by_one(self):
32
32
        self.run_script("""\
33
33
$ cd branch
34
 
$ bzr conflicts
 
34
$ brz conflicts
35
35
Text conflict in my_other_file
36
36
Path conflict: mydir3 / mydir2
37
37
Text conflict in myfile
38
 
$ bzr resolve myfile
 
38
$ brz resolve myfile
39
39
2>1 conflict resolved, 2 remaining
40
 
$ bzr resolve my_other_file
 
40
$ brz resolve my_other_file
41
41
2>1 conflict resolved, 1 remaining
42
 
$ bzr resolve mydir2
 
42
$ brz resolve mydir2
43
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
 
$ bzr resolve --all
 
49
$ brz resolve --all
50
50
2>3 conflicts resolved, 0 remaining
51
 
$ bzr conflicts
 
51
$ brz conflicts
52
52
""")
53
53
 
54
54
    def test_resolve_from_subdir(self):
55
55
        self.run_script("""\
56
56
$ mkdir branch/subdir
57
57
$ cd branch/subdir
58
 
$ bzr resolve ../myfile
 
58
$ brz resolve ../myfile
59
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
 
$ bzr resolve -d branch myfile
 
64
$ brz resolve -d branch myfile
65
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
 
$ bzr resolve -d branch --all
 
70
$ brz resolve -d branch --all
71
71
2>3 conflicts resolved, 0 remaining
72
 
$ bzr conflicts -d branch
 
72
$ brz conflicts -d branch
73
73
""")
74
74
 
75
75
 
77
77
 
78
78
    def test_bug_788000(self):
79
79
        self.run_script('''\
80
 
$ bzr init a
 
80
$ brz init a
81
81
$ mkdir a/dir
82
82
$ echo foo > a/dir/file
83
 
$ bzr add a/dir
 
83
$ brz add a/dir
84
84
$ cd a
85
 
$ bzr commit -m one
 
85
$ brz commit -m one
86
86
$ cd ..
87
 
$ bzr clone a b
 
87
$ brz clone a b
88
88
$ echo bar > b/dir/file
89
89
$ cd a
90
90
$ rm -r dir
91
 
$ bzr commit -m two
 
91
$ brz commit -m two
92
92
$ cd ../b
93
93
''',
94
94
                        null_output_matches_anything=True)
95
95
 
96
96
        self.run_script('''\
97
 
$ bzr pull
 
97
$ brz pull
98
98
Using saved parent location:...
99
99
Now on revision 2.
100
100
2>RM  dir/file => dir/file.THIS
104
104
2>3 conflicts encountered.
105
105
''')
106
106
        self.run_script('''\
107
 
$ bzr resolve --take-other
 
107
$ brz resolve --take-other
108
108
2>deleted dir/file.THIS
109
109
2>deleted dir
110
110
2>3 conflicts resolved, 0 remaining