63 stage = previousStageChildren |
63 stage = previousStageChildren |
64 removes = [] |
64 removes = [] |
65 for current in stage: |
65 for current in stage: |
66 currentParents = parents.get(current, []) |
66 currentParents = parents.get(current, []) |
67 for parent in currentParents: |
67 for parent in currentParents: |
68 if parent in stage and parent != current: |
68 if ( |
69 # might wind up removing current |
69 parent in stage and |
70 if current not in parents.get(parent, []): |
70 parent != current and |
71 # is not mutually dependant |
71 current not in parents.get(parent, []) |
72 removes.append(current) |
72 ): |
|
73 # is not mutually dependant |
|
74 removes.append(current) |
73 |
75 |
74 for remove in removes: |
76 for remove in removes: |
75 while remove in stage: |
77 while remove in stage: |
76 stage.remove(remove) |
78 stage.remove(remove) |
77 |
79 |