4teamwork/ftw.upgrade — pull request #51 by jone (2014-10-01 13:09:39+00:00)
Title: Update upgrade view ordering for root nodes.

The dependency graph does not define any order for root profiles (e.g. included in buildout directly), which causes random sorting in the upgrade view for those profiles.
This change sorts those root profiles by name without changing the order of profiles which is depended on.

**Example**
Given these dependencies:
- A => []
- B => [C, D]
- C => []
- D => []
- E => []

Is no consistently ordered:
- A (alphabetical ordering of root nodes)
- C (topogical ordering of dependency by B)
- D (topogical ordering of dependency by B)
- B (alphabetical ordering of root nodes)
- E (alphabetical ordering of root nodes)

**Background**
The problem was that the sorting order was not always sorted consistently the same with a similar code base in different zope processes / different servers.

I've also verified that the order of the dependencies in the ``metadata.xml`` matters. The dependencies at the top of the ``metadata.xml`` are also ordered at the top of the upgrades view (within the dependency group). The "policy" is always moved to the bottom.

@phgross @deiferni
/cc @maethu