~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-11-07 14:14:44 UTC
  • mfrom: (5530.1.1 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20101107141444-r9agveqsbq5mka5u
(vila) Merge 2.2 into trunk including fix for bug #646961 (Vincent
        Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
19
19
    tests,
20
20
    workingtree,
21
21
    )
 
22
from bzrlib.tests import script
 
23
 
22
24
 
23
25
# FIXME: These don't really look at the output of the conflict commands, just
24
26
# the number of lines - there should be more examination.
131
133
        self.assertEqual('', err)
132
134
        out, err = self.run_bzr('conflicts')
133
135
        self.assertEqual(0, len(out.splitlines()))
 
136
 
 
137
class TestResolveSilentlyIgnore(script.TestCaseWithTransportAndScript):
 
138
 
 
139
    def test_bug_646961(self):
 
140
        self.run_script("""\
 
141
            $ bzr init base
 
142
            Created a standalone tree (format: 2a)
 
143
            $ cd base
 
144
            $ echo >file1
 
145
            $ bzr add
 
146
            adding file1
 
147
            $ bzr ci -m "stuff"
 
148
            2>Committing to: .../base/
 
149
            2>added file1
 
150
            2>Committed revision 1.
 
151
            $ cd ..
 
152
            $ bzr branch base branch
 
153
            2>Branched 1 revision(s).
 
154
            $ cd base
 
155
            $ echo "1" >> file1
 
156
            $ bzr ci -m "branch 1"
 
157
            2>Committing to: .../base/
 
158
            2>modified file1
 
159
            2>Committed revision 2.
 
160
            $ cd ../branch
 
161
            $ echo "2" >> file1
 
162
            $ bzr ci -m "branch 2"
 
163
            2>Committing to: .../branch/
 
164
            2>modified file1
 
165
            2>Committed revision 2.
 
166
            $ cd ../base
 
167
            $ bzr merge ../branch
 
168
            2> M  file1
 
169
            2>Text conflict in file1
 
170
            2>1 conflicts encountered.
 
171
            # The following succeeds silently without resolving the conflict
 
172
            $ bzr resolve file1 --take-other
 
173
            # The following wil fail when --take-other is implemented
 
174
            # for text conflicts
 
175
            $ bzr conflicts
 
176
            Text conflict in file1
 
177
            """)
 
178