~vila/bzr/1606203-long-auth

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge_core.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) 2005-2011 Canonical Ltd
 
1
# Copyright (C) 2005-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
553
553
        wtb.add('b_file')
554
554
        b_rev = wtb.commit('b_revision', allow_pointless=False)
555
555
        wta.merge_from_branch(wtb.branch, b_rev, 'null:')
556
 
        self.assert_(os.path.lexists('a/b_file'))
 
556
        self.assertTrue(os.path.lexists('a/b_file'))
557
557
        self.assertEqual([b_rev], wta.get_parent_ids()[1:])
558
558
 
559
559
    def test_merge_unrelated_conflicting(self):
569
569
        wtb.add('file')
570
570
        b_rev = wtb.commit('b_revision', allow_pointless=False)
571
571
        wta.merge_from_branch(wtb.branch, b_rev, 'null:')
572
 
        self.assert_(os.path.lexists('a/file'))
573
 
        self.assert_(os.path.lexists('a/file.moved'))
 
572
        self.assertTrue(os.path.lexists('a/file'))
 
573
        self.assertTrue(os.path.lexists('a/file.moved'))
574
574
        self.assertEqual([b_rev], wta.get_parent_ids()[1:])
575
575
 
576
576
    def test_merge_deleted_conflicts(self):
603
603
        self.assertFalse(os.path.exists('a/file'))
604
604
        b_wt.commit('exec a')
605
605
        a_wt.merge_from_branch(b_wt.branch, b_wt.last_revision(), 'null:')
606
 
        self.assert_(os.path.exists('a/file'))
 
606
        self.assertTrue(os.path.exists('a/file'))
607
607
 
608
608
    def test_merge_swapping_renames(self):
609
609
        a_wt = self.make_branch_and_tree('a')
640
640
        b_wt.commit('r2')
641
641
        a_wt.merge_from_branch(b_wt.branch, b_wt.branch.last_revision(),
642
642
                               b_wt.branch.get_rev_id(1))
643
 
        self.assert_(os.path.exists('a/file'))
 
643
        self.assertTrue(os.path.exists('a/file'))
644
644
        self.assertEqual(file('a/file').read(),'THAT')
645
645
 
646
646
    def test_merge_rename_before_create(self):