Check-in [bcc630d3f5]
Not logged in
Overview

SHA1 Hash:bcc630d3f5a352d5ed58520044cab357a8d32630
Date: 2007-11-25 07:41:07
User: aku
Comment:Tweaked log output of the topological sorter (revisions) to be tabular (aligned columns), added information (time ranges).
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified tools/cvs2fossil/lib/c2f_prtopsort.tcl from [96780b3d36] to [8a68348b95].

@@ -73,13 +73,19 @@
 
     typemethod run {} {
 	# Pass manager interface. Executed to perform the
 	# functionality of the pass.
 
+	set len [string length [project::rev num]]
+	set myatfmt %${len}s
+	incr len 6
+	set mycsfmt %${len}s
+
 	cyclebreaker savecmd  [myproc SaveOrder]
+
 	state transaction {
-	    cyclebreaker run break-rev [myproc Changesets]
+	    cyclebreaker run tsort-rev [myproc Changesets]
 	}
 	return
     }
 
     typemethod discard {} {
@@ -99,19 +105,29 @@
     }
 
     proc IsByRevision {cset} { $cset byrevision }
 
     proc SaveOrder {graph at cset} {
+	::variable myatfmt
+	::variable mycsfmt
+
 	set cid [$cset id]
 
-	log write 4 rtopsort "Changeset @ $at: [$cset str] <<[$graph node set $cset timerange]>>"
+	log write 4 rtopsort "Changeset @ [format $myatfmt $at]: [format $mycsfmt [$cset str]] <<[FormatTR $graph $cset]>>"
 	state run {
 	    INSERT INTO csorder (cid,  pos)
 	    VALUES              ($cid, $at)
 	}
 	return
     }
+
+    proc FormatTR {graph cset} {
+	return [join [struct::list map [$graph node set $cset timerange] {clock format}] { -- }]
+    }
+
+    typevariable myatfmt ; # Format for log output to gain better alignment of the various columns.
+    typevariable mycsfmt ; # Ditto for the changesets.
 
     # # ## ### ##### ######## #############
     ## Configuration
 
     pragma -hasinstances   no ; # singleton