Package submission contains all related logic to submit Gerrit CLs.
func ComputeOrder ¶
ComputeOrder computes the best order for submission of CLs based on their dependencies. Dependency cycle is broken by arbitrarily but deterministically breaking soft requirement dependencies and approximately minimizing their number.
Returns error if duplicate CLs are provided or the hard requirement dependencies solely form a cycle (This should not be possible within current CV context as hard requirement deps can only be established if CLs follow Git's child -> parent relationship).
Overall, this is as hard as a minimum feedback arc set, which is NP-Hard: https://en.wikipedia.org/wiki/Feedback_arc_set#Minimum_feedback_arc_set However, approximation is fine within CV context so long as hard dependencies are satisfied.