/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 bzrlib/tests/blackbox/test_merge.py

  • Committer: Aaron Bentley
  • Date: 2009-03-08 23:40:12 UTC
  • mfrom: (4037.2.5 bzr.repo)
  • mto: This revision was merged to the branch mainline in revision 4092.
  • Revision ID: aaron@aaronbentley.com-20090308234012-vlyphxxye80fb8t0
Merge fast-fail from Aguilar.

Show diffs side-by-side

added added

removed removed

Lines of Context:
236
236
        out = self.run_bzr('merge', retcode=3)
237
237
        self.assertEquals(out,
238
238
                ('','bzr: ERROR: No location specified or remembered\n'))
239
 
        # test implicit --remember when no parent set, this merge conflicts
 
239
 
 
240
        # test uncommitted changes
240
241
        self.build_tree(['d'])
241
242
        tree_b.add('d')
242
243
        self.run_bzr_error(['Working tree ".*" has uncommitted changes'],
243
 
                           'merge ../branch_a')
244
 
        self.assertEquals(abspath(branch_b.get_submit_branch()),
245
 
                          abspath(parent))
246
 
        # test implicit --remember after resolving conflict
 
244
                           'merge')
 
245
 
 
246
        # merge should now pass and implicitly remember merge location
247
247
        tree_b.commit('commit d')
 
248
        out, err = self.run_bzr('merge ../branch_a')
 
249
 
 
250
        base = urlutils.local_path_from_url(branch_a.base)
 
251
        self.assertEndsWith(err, '+N  b\nAll changes applied successfully.\n')
 
252
        self.assertEquals(abspath(branch_b.get_submit_branch()),
 
253
                          abspath(parent))
 
254
        # test implicit --remember when committing new file
 
255
        self.build_tree(['e'])
 
256
        tree_b.add('e')
 
257
        tree_b.commit('commit e')
248
258
        out, err = self.run_bzr('merge')
249
 
 
250
 
        base = urlutils.local_path_from_url(branch_a.base)
251
259
        self.assertStartsWith(err,
252
260
                          'Merging from remembered submit location %s\n' % (base,))
253
 
        self.assertEndsWith(err, '+N  b\nAll changes applied successfully.\n')
254
 
        self.assertEquals(abspath(branch_b.get_submit_branch()),
255
 
                          abspath(parent))
256
261
        # re-open tree as external run_bzr modified it
257
262
        tree_b = branch_b.bzrdir.open_workingtree()
258
263
        tree_b.commit('merge branch_a')