76
76
def test_pending_merges(self):
77
77
"""Tracking pending-merged revisions."""
78
78
b = Branch('.', init=True)
80
79
self.assertEquals(b.pending_merges(), [])
82
b.add_pending_merge('foo@azkhazan-123123-abcabc')
84
self.assertEquals(b.pending_merges(), ['foo@azkhazan-123123-abcabc'])
86
b.add_pending_merge('foo@azkhazan-123123-abcabc')
88
self.assertEquals(b.pending_merges(), ['foo@azkhazan-123123-abcabc'])
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'])
95
88
b.commit("commit from base with two merges")
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')
104
95
# list should be cleared when we do a commit
105
96
self.assertEquals(b.pending_merges(), [])