Reverting repo list to topological order