]> xenbits.xensource.com Git - people/larsk/xenproject-org-gitdm.git/commitdiff
Sort the output text
authorJonathan Corbet <corbet@lwn.net>
Tue, 10 Feb 2009 21:27:19 +0000 (14:27 -0700)
committerJonathan Corbet <corbet@lwn.net>
Tue, 10 Feb 2009 21:27:19 +0000 (14:27 -0700)
...also make a pseudo tree for changesets which go straight to the
mainline.

treeplot

index f61f8a7db2af6be7a3c73e1f1541880d44d1ecd5..1869c9c0756efa6724e8e0c7659d24de9eb57038 100755 (executable)
--- a/treeplot
+++ b/treeplot
@@ -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 + '  ')
 
 #