699
699
self.assertEqual({'rev2': ['rev1']},
700
700
stacked.get_parent_map(['rev2']))
702
def test__stacked_parents_provider_deprecated(self):
703
parents1 = _mod_graph.DictParentsProvider({'rev2': ['rev3']})
704
parents2 = _mod_graph.DictParentsProvider({'rev1': ['rev4']})
705
stacked = self.applyDeprecated(deprecated_in((1, 16, 0)),
706
_mod_graph._StackedParentsProvider, [parents1, parents2])
707
self.assertEqual({'rev1':['rev4'], 'rev2':['rev3']},
708
stacked.get_parent_map(['rev1', 'rev2']))
709
self.assertEqual({'rev2':['rev3'], 'rev1':['rev4']},
710
stacked.get_parent_map(['rev2', 'rev1']))
711
self.assertEqual({'rev2':['rev3']},
712
stacked.get_parent_map(['rev2', 'rev2']))
713
self.assertEqual({'rev1':['rev4']},
714
stacked.get_parent_map(['rev1', 'rev1']))
716
702
def test_iter_topo_order(self):
717
703
graph = self.make_graph(ancestry_1)
718
704
args = ['rev2a', 'rev3', 'rev1']