~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/selftest/whitebox.py

  • Committer: Robert Collins
  • Date: 2005-08-24 05:29:04 UTC
  • mto: (974.1.50) (1185.1.10) (1092.3.1)
  • mto: This revision was merged to the branch mainline in revision 1139.
  • Revision ID: robertc@robertcollins.net-20050824052904-8c23b7fba5dc7908
provide a helper to redirect output as desired

Show diffs side-by-side

added added

removed removed

Lines of Context:
76
76
    def test_pending_merges(self):
77
77
        """Tracking pending-merged revisions."""
78
78
        b = Branch('.', init=True)
79
 
 
80
79
        self.assertEquals(b.pending_merges(), [])
81
 
        
82
 
        b.add_pending_merge('foo@azkhazan-123123-abcabc')
83
 
        
84
 
        self.assertEquals(b.pending_merges(), ['foo@azkhazan-123123-abcabc'])
85
 
    
86
 
        b.add_pending_merge('foo@azkhazan-123123-abcabc')
87
 
        
88
 
        self.assertEquals(b.pending_merges(), ['foo@azkhazan-123123-abcabc'])
89
 
 
 
80
        b.add_pending_merge('foo@azkhazan-123123-abcabc')
 
81
        self.assertEquals(b.pending_merges(), ['foo@azkhazan-123123-abcabc'])
 
82
        b.add_pending_merge('foo@azkhazan-123123-abcabc')
 
83
        self.assertEquals(b.pending_merges(), ['foo@azkhazan-123123-abcabc'])
90
84
        b.add_pending_merge('wibble@fofof--20050401--1928390812')
91
85
        self.assertEquals(b.pending_merges(),
92
86
                          ['foo@azkhazan-123123-abcabc',
93
87
                           'wibble@fofof--20050401--1928390812'])
94
 
 
95
88
        b.commit("commit from base with two merges")
96
 
 
97
89
        rev = b.get_revision(b.revision_history()[0])
98
90
        self.assertEquals(len(rev.parents), 2)
99
91
        self.assertEquals(rev.parents[0].revision_id,
100
92
                          'foo@azkhazan-123123-abcabc')
101
93
        self.assertEquals(rev.parents[1].revision_id,
102
94
                           'wibble@fofof--20050401--1928390812')
103
 
 
104
95
        # list should be cleared when we do a commit
105
96
        self.assertEquals(b.pending_merges(), [])
106
97