1234
1241
# TODO: Manage this incrementally to avoid covering the same path
1235
1242
# repeatedly. (The server will have to on each request, but the less
1237
1250
parents_map = self._unstacked_provider.get_cached_map()
1239
1252
# Repository is not locked, so there's no cache.
1241
1255
start_set = set(parents_map)
1243
1258
for parents in parents_map.itervalues():
1244
1259
result_parents.update(parents)
1245
1260
stop_keys = result_parents.difference(start_set)
1246
1264
included_keys = start_set.intersection(result_parents)
1247
1265
start_set.difference_update(included_keys)
1248
1266
recipe = ('manual', start_set, stop_keys, len(parents_map))