~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/testmerge.py

  • Committer: Aaron Bentley
  • Date: 2005-09-19 02:33:09 UTC
  • mfrom: (1185.3.27)
  • mto: (1185.1.29)
  • mto: This revision was merged to the branch mainline in revision 1390.
  • Revision ID: aaron.bentley@utoronto.ca-20050919023309-24e8871f7f8b31cf
Merged latest from mpool

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
class TestMerge(TestCaseInTempDir):
9
9
    """Test appending more than one revision"""
10
10
    def test_pending(self):
11
 
        br = Branch(".", init=True)
 
11
        br = Branch.initialize(".")
12
12
        commit(br, "lala!")
13
13
        self.assertEquals(len(br.pending_merges()), 0)
14
14
        merge(['.', -1], [None, None])
17
17
    def test_nocommits(self):
18
18
        self.test_pending()
19
19
        os.mkdir('branch2')
20
 
        br2 = Branch('branch2', init=True)
 
20
        br2 = Branch.initialize('branch2')
21
21
        self.assertRaises(NoCommits, merge, ['branch2', -1], 
22
22
                          [None, None])
23
23
        return br2
32
32
    def test_pending_with_null(self):
33
33
        """When base is forced to revno 0, pending_merges is set"""
34
34
        br2 = self.test_unrelated()
35
 
        br1 = Branch('.')
 
35
        br1 = Branch.open('.')
36
36
        merge(['branch2', -1], ['branch2', 0])
37
37
        self.assertEquals(len(br1.pending_merges()), 1)
38
38
        return (br1, br2)