diff options
author | Jonathan Corbet <corbet@lwn.net> | 2009-02-10 14:27:19 -0700 |
---|---|---|
committer | Jonathan Corbet <corbet@lwn.net> | 2009-02-10 14:27:19 -0700 |
commit | 1b1e0eb6ecd98e9eb87e40bda7f73feeb7fd3941 (patch) | |
tree | ac2fb070721eb950beca1ac7914ceff0747a8ed2 | |
parent | 50e3f2e1eeaec1793c6be8784ec79c392ff681d2 (diff) |
Sort the output text
...also make a pseudo tree for changesets which go straight to the
mainline.
-rwxr-xr-x | treeplot | 10 |
1 files changed, 8 insertions, 2 deletions
@@ -204,8 +204,12 @@ class FlowNode: def BuildFlowTree(): rootnode = FlowNode(Mainline) + notree = Tree('[No tree]', '') for centry in CommitTrees.values(): - FillFlowPath(centry.path, rootnode) + path = centry.path + if not path: + path = [ notree ] + FillFlowPath(path, rootnode) return rootnode def FillFlowPath(path, node): @@ -221,7 +225,9 @@ def FillFlowPath(path, node): def PrintFlowTree(ftree, indent = ''): print '%s%3d %s' % (indent, ftree.commits, ftree.tree.name) - for input in ftree.inputs.values(): + inputs = ftree.inputs.values() + inputs.sort(GVSort) + for input in inputs: PrintFlowTree(input, indent + ' ') # |