From: Jonathan Corbet Date: Tue, 10 Feb 2009 21:27:19 +0000 (-0700) Subject: Sort the output text X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=1b1e0eb6ecd98e9eb87e40bda7f73feeb7fd3941;p=people%2Flarsk%2Fxenproject-org-gitdm.git Sort the output text ...also make a pseudo tree for changesets which go straight to the mainline. --- diff --git a/treeplot b/treeplot index f61f8a7..1869c9c 100755 --- 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 + ' ') #