236
236
complex_shortcut2 = {'a':[NULL_REVISION], 'b':['a'], 'c':['b'], 'd':['c'],
237
'e':['d'], 'f':['e'],
238
'g':['f'], 'h':['d'], 'k':['h', 'i'], 'j':['h'],
239
'i':['g'], 'l':['k'], 'm':['l'],
240
'n':['m'], 't':['i', 's'], 'u':['s', 'j'],
241
'o':['n'], 'p':['o'], 'q':['p'],
242
'r':['q'], 's':['r'],
237
'e':['d'], 'f':['e'], 'g':['f'], 'h':['d'], 'i':['g'],
238
'j':['h'], 'k':['h', 'i'], 'l':['k'], 'm':['l'], 'n':['m'],
239
'o':['n'], 'p':['o'], 'q':['p'], 'r':['q'], 's':['r'],
240
't':['i', 's'], 'u':['s', 'j'],
245
243
# Graph where different walkers will race to find the common and uncommon
410
408
self.calls.extend(nodes)
411
409
return self._real_parents_provider.get_parent_map(nodes)
413
def get_parent_map(self, nodes):
414
self.calls.extend(nodes)
415
return self._real_parents_provider.get_parent_map(nodes)
418
412
class TestGraph(TestCaseWithMemoryTransport):
1230
1224
graph = self.make_graph(racing_shortcuts)
1231
1225
self.assertFindUniqueAncestors(graph,
1232
1226
['p', 'q', 'z'], 'z', ['y'])
1233
import pdb; pdb.set_trace()
1234
1227
self.assertFindUniqueAncestors(graph,
1235
1228
['h', 'i', 'j', 'y'], 'j', ['z'])