Overview
SHA1 Hash: | 1c39e57637d4bfb976b43bebe223381c9dab269d |
---|---|
Date: | 2007-11-27 09:04:46 |
User: | aku |
Comment: | Updated to extended changeset string, and added tabular formatting. Further tweaked output, putting timestamp adjust messages on the same line as the changeset itself. |
Timelines: | ancestors | descendants | both | trunk |
Other Links: | files | ZIP archive | manifest |
Tags And Properties
- branch=trunk inherited from [a28c83647d]
- sym-trunk inherited from [a28c83647d]
Changes
[hide diffs]Modified tools/cvs2fossil/lib/c2f_patopsort.tcl from [65fa27700d] to [4f410cc1a2].
@@ -71,10 +71,15 @@ 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 12 + set mycsfmt %${len}s + cyclebreaker savecmd [myproc SaveTimestamps] state transaction { LoadSymbolChangesets cyclebreaker run tsort-all [myproc Changesets] @@ -105,22 +110,26 @@ proc SaveTimestamps {graph at cset} { set cid [$cset id] set date [GetTime [lindex [$graph node get $cset timerange] 1] \ - [struct::set contain $mysymchangesets $cset]] - - log write 4 atopsort "Changeset @ $at: [$cset str]" + [struct::set contain $mysymchangesets $cset] \ + message] + + log write 4 atopsort "Changeset @ [format $myatfmt $at]: [format $mycsfmt [$cset str]]$message" + state run { INSERT INTO cstimestamp (cid, pos, date) VALUES ($cid, $at, $date) } return } - proc GetTime {stamp expectchange} { + proc GetTime {stamp expectchange mv} { ::variable mylasttimestamp + upvar 1 $mv message + set message "" if {$stamp > $mymaxtimestamp} { # A timestamp in the future is believed to be bogus and # shifted backwars in time to prevent it from forcing # other timestamps to be pushed even further in the # future. @@ -133,22 +142,25 @@ # have been committed, even if other changesets with even # earlier timestamps depend on this one. incr mylasttimestamp if {!$expectchange} { - log write 4 atopsort "Timestamp [clock format $stamp] is in the future; shifted back to [clock format $mylasttimestamp]" + set message " Timestamp [clock format $stamp] is in the future; shifted back to [clock format $mylasttimestamp] ([expr {$mylasttimestamp - $stamp}])" } } elseif {$stamp < ($mylasttimestamp)+1} { incr mylasttimestamp if {!$expectchange} { - log write 4 atopsort "Timestamp [clock format $stamp] adjusted to [clock format $mylasttimestamp]" + set message " Timestamp [clock format $stamp] adjusted to [clock format $mylasttimestamp] (+[expr {$mylasttimestamp - $stamp}])" } } else { set mylasttimestamp $stamp } return $mylasttimestamp } + + typevariable myatfmt ; # Format for log output to gain better alignment of the various columns. + typevariable mycsfmt ; # Ditto for the changesets. typevariable mysymchangesets {} ; # Set of the symbol changesets. typevariable mylasttimestamp 0 ; # Last delivered timestamp. typevariable mymaxtimestamp
Modified tools/cvs2fossil/lib/c2f_prtopsort.tcl from [0540393dfb] to [ef7809d056].
@@ -75,11 +75,11 @@ # 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 + incr len 12 set mycsfmt %${len}s cyclebreaker savecmd [myproc SaveOrder] state transaction {