/breezy/unstable

To get this branch, use:
bzr branch https://code.breezy-vcs.org/breezy/unstable

« back to all changes in this revision

Viewing changes to breezy/tests/blackbox/test_merge.py

  • Committer: Jelmer Vernooij
  • Date: 2017-05-24 01:39:33 UTC
  • mfrom: (3815.3776.6)
  • Revision ID: jelmer@jelmer.uk-20170524013933-ir4y4tqtrsiz2ka2
New upstream snapshot.

Show diffs side-by-side

added added

removed removed

Lines of Context:
16
16
#
17
17
# Author: Aaron Bentley <aaron.bentley@utoronto.ca>
18
18
 
19
 
"""Black-box tests for bzr merge.
 
19
"""Black-box tests for brz merge.
20
20
"""
21
21
 
22
22
import doctest
24
24
 
25
25
from testtools import matchers
26
26
 
27
 
from bzrlib import (
 
27
from breezy import (
28
28
    branch,
29
29
    conflicts,
30
30
    controldir,
34
34
    urlutils,
35
35
    workingtree,
36
36
    )
37
 
from bzrlib.tests import (
 
37
from breezy.tests import (
38
38
    scenarios,
39
39
    script,
40
40
    )
264
264
        # test merge for failure without parent set
265
265
        out = self.run_bzr('merge', retcode=3, working_dir='branch_b')
266
266
        self.assertEqual(out,
267
 
                ('','bzr: ERROR: No location specified or remembered\n'))
 
267
                ('','brz: ERROR: No location specified or remembered\n'))
268
268
 
269
269
        # test uncommitted changes
270
270
        self.build_tree(['branch_b/d'])
278
278
 
279
279
        base = urlutils.local_path_from_url(branch_a.base)
280
280
        self.assertEndsWith(err, '+N  b\nAll changes applied successfully.\n')
281
 
        # re-open branch as external run_bzr modified it
 
281
        # re-open branch as external run_brz modified it
282
282
        branch_b = branch_b.bzrdir.open_branch()
283
283
        self.assertEqual(osutils.abspath(branch_b.get_submit_branch()),
284
284
                          osutils.abspath(parent))
289
289
        out, err = self.run_bzr('merge', working_dir='branch_b')
290
290
        self.assertStartsWith(
291
291
            err, 'Merging from remembered submit location %s\n' % (base,))
292
 
        # re-open tree as external run_bzr modified it
 
292
        # re-open tree as external run_brz modified it
293
293
        tree_b = branch_b.bzrdir.open_workingtree()
294
294
        tree_b.commit('merge branch_a')
295
295
        # test explicit --remember
297
297
                                working_dir='branch_b')
298
298
        self.assertEqual(out, '')
299
299
        self.assertEqual(err, '+N  c\nAll changes applied successfully.\n')
300
 
        # re-open branch as external run_bzr modified it
 
300
        # re-open branch as external run_brz modified it
301
301
        branch_b = branch_b.bzrdir.open_branch()
302
302
        self.assertEqual(osutils.abspath(branch_b.get_submit_branch()),
303
303
                          osutils.abspath(branch_c.bzrdir.root_transport.base))
304
 
        # re-open tree as external run_bzr modified it
 
304
        # re-open tree as external run_brz modified it
305
305
        tree_b = branch_b.bzrdir.open_workingtree()
306
306
        tree_b.commit('merge branch_c')
307
307
 
308
308
    def test_merge_bundle(self):
309
 
        from bzrlib.testament import Testament
 
309
        from breezy.testament import Testament
310
310
        tree_a = self.make_branch_and_tree('branch_a')
311
311
        self.build_tree_contents([('branch_a/a', 'hello')])
312
312
        tree_a.add('a')
729
729
        source.commit('Added a', rev_id='rev1')
730
730
        target = self.make_branch_and_tree('target')
731
731
        self.run_script("""\
732
 
$ bzr merge -d target source
733
 
2>bzr: ERROR: Merging into empty branches not currently supported, https://bugs.launchpad.net/bzr/+bug/308562
 
732
$ brz merge -d target source
 
733
2>brz: ERROR: Merging into empty branches not currently supported, https://bugs.launchpad.net/bzr/+bug/308562
734
734
""")
735
735
 
736
736
class TestMergeForce(tests.TestCaseWithTransport):