~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_merge.py

  • Committer: abentley
  • Date: 2006-04-20 23:47:53 UTC
  • mfrom: (1681 +trunk)
  • mto: This revision was merged to the branch mainline in revision 1683.
  • Revision ID: abentley@lappy-20060420234753-6a6874b76f09f86d
Merge bzr.dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
        merge([u'.', -1], [None, None])
24
24
        self.assertEquals(len(wt.pending_merges()), 0)
25
25
 
 
26
    def test_undo(self):
 
27
        wt = self.make_branch_and_tree('.')
 
28
        wt.commit("lala!")
 
29
        wt.commit("haha!")
 
30
        wt.commit("blabla!")
 
31
        merge([u'.', 2], [u'.', 1])
 
32
 
26
33
    def test_nocommits(self):
27
34
        self.test_pending()
28
35
        wt2 = self.make_branch_and_tree('branch2')
37
44
                          [None, None])
38
45
        return wt2
39
46
 
 
47
    def test_merge_one(self):
 
48
        wt1 = self.make_branch_and_tree('branch1')
 
49
        wt1.commit('empty commit')
 
50
        wt2 = self.make_branch_and_tree('branch2')
 
51
        wt2.pull(wt1.branch)
 
52
        file('branch1/foo', 'wb').write('foo')
 
53
        file('branch1/bar', 'wb').write('bar')
 
54
        wt1.add('foo')
 
55
        wt1.add('bar')
 
56
        wt1.commit('add foobar')
 
57
        os.chdir('branch2')
 
58
        self.run_bzr('merge', '../branch1/baz', retcode=3)
 
59
        self.run_bzr('merge', '../branch1/foo')
 
60
        self.failUnlessExists('foo')
 
61
        self.failIfExists('bar')
 
62
        wt2 = WorkingTree.open_containing('branch2')[0]
 
63
        self.assertEqual(wt2.pending_merges(), [])
 
64
 
40
65
    def test_pending_with_null(self):
41
66
        """When base is forced to revno 0, pending_merges is set"""
42
67
        wt2 = self.test_unrelated()