Package submission contains all related logic to submit Gerrit CLs.



This section is empty.


This section is empty.


This section is empty.


type CL

type CL struct {
	Key  string
	Deps []Dep

func ComputeOrder

func ComputeOrder(cls []CL) ([]CL, error)

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: However, approximation is fine within CV context so long as hard dependencies are satisfied.

type Dep

type Dep struct {
	Key         string
	Requirement RequirementType

type RequirementType

type RequirementType int8
const (
	Soft RequirementType = iota

Source Files