~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Patch Queue Manager
  • Date: 2016-02-01 19:13:13 UTC
  • mfrom: (6614.2.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20160201191313-wdfvmfff1djde6oq
(vila) Release 2.7.0 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2012 Canonical Ltd
 
1
# Copyright (C) 2006-2012, 2016 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
122
122
        self.assertTrue("Not a branch" in err)
123
123
        self.run_bzr('merge -r revno:%d:./..revno:%d:../b'
124
124
                    %(ancestor,b.revno()), working_dir='a')
125
 
        self.assertEquals(a.get_parent_ids(),
 
125
        self.assertEqual(a.get_parent_ids(),
126
126
                          [a.branch.last_revision(), b.last_revision()])
127
127
        self.check_file_contents('a/goodbye', 'quux')
128
128
        a_tree.revert(backups=False)
129
129
        self.run_bzr('merge -r revno:%d:../b'%b.revno(), working_dir='a')
130
 
        self.assertEquals(a.get_parent_ids(),
 
130
        self.assertEqual(a.get_parent_ids(),
131
131
                          [a.branch.last_revision(), b.last_revision()])
132
132
        a_tip = a.commit('merged')
133
133
        self.run_bzr('merge ../b -r last:1', working_dir='a')
263
263
        self.assertEqual(None, branch_b.get_parent())
264
264
        # test merge for failure without parent set
265
265
        out = self.run_bzr('merge', retcode=3, working_dir='branch_b')
266
 
        self.assertEquals(out,
 
266
        self.assertEqual(out,
267
267
                ('','bzr: ERROR: No location specified or remembered\n'))
268
268
 
269
269
        # test uncommitted changes
280
280
        self.assertEndsWith(err, '+N  b\nAll changes applied successfully.\n')
281
281
        # re-open branch as external run_bzr modified it
282
282
        branch_b = branch_b.bzrdir.open_branch()
283
 
        self.assertEquals(osutils.abspath(branch_b.get_submit_branch()),
 
283
        self.assertEqual(osutils.abspath(branch_b.get_submit_branch()),
284
284
                          osutils.abspath(parent))
285
285
        # test implicit --remember when committing new file
286
286
        self.build_tree(['branch_b/e'])
295
295
        # test explicit --remember
296
296
        out, err = self.run_bzr('merge ../branch_c --remember',
297
297
                                working_dir='branch_b')
298
 
        self.assertEquals(out, '')
299
 
        self.assertEquals(err, '+N  c\nAll changes applied successfully.\n')
 
298
        self.assertEqual(out, '')
 
299
        self.assertEqual(err, '+N  c\nAll changes applied successfully.\n')
300
300
        # re-open branch as external run_bzr modified it
301
301
        branch_b = branch_b.bzrdir.open_branch()
302
 
        self.assertEquals(osutils.abspath(branch_b.get_submit_branch()),
 
302
        self.assertEqual(osutils.abspath(branch_b.get_submit_branch()),
303
303
                          osutils.abspath(branch_c.bzrdir.root_transport.base))
304
304
        # re-open tree as external run_bzr modified it
305
305
        tree_b = branch_b.bzrdir.open_workingtree()
595
595
 
596
596
        # Remember should not happen if using default from parent
597
597
        out, err = self.run_bzr(['merge', '-d', 'b', '--no-remember'])
598
 
        self.assertEquals(None, tree_b.branch.get_submit_branch())
 
598
        self.assertEqual(None, tree_b.branch.get_submit_branch())
599
599
 
600
600
        # Remember should not happen if user supplies location but ask for not
601
601
        # remembering it