def test_add_revision_one_head(self): map_ = RevisionMap(lambda: [ Revision('a', ()), Revision('b', ('a', )), Revision('c', ('b', )), ]) eq_(map_.heads, ('c', )) map_.add_revision(Revision('d', ('c', ))) eq_(map_.heads, ('d', ))
def test_add_revision_two_head(self): map_ = RevisionMap(lambda: [ Revision('a', ()), Revision('b', ('a', )), Revision('c1', ('b', )), Revision('c2', ('b', )), ]) eq_(map_.heads, ('c1', 'c2')) map_.add_revision(Revision('d1', ('c1', ))) eq_(map_.heads, ('c2', 'd1'))