Fossil SCM
Moved the counting of imported changesets to the beginning for a more accurate percent calculation and proper ending at 100%.
Commit
330f2da791611680e4153ee5521149e945615518
Parent
a5476aed2741947…
1 file changed
+2
-1
+2
-1
| --- tools/lib/import_statistics.tcl | ||
| +++ tools/lib/import_statistics.tcl | ||
| @@ -47,10 +47,12 @@ | ||
| 47 | 47 | proc ::vc::fossil::import::stats::csbegin {cset} { |
| 48 | 48 | variable max_format |
| 49 | 49 | variable run_format |
| 50 | 50 | variable total_running |
| 51 | 51 | variable total_csets |
| 52 | + | |
| 53 | + incr total_running | |
| 52 | 54 | |
| 53 | 55 | write 0 stats "ChangeSet [format $max_format $cset] @ [format $run_format $total_running]/$total_csets ([F6 [expr {$total_running*100.0/$total_csets}]]%)" |
| 54 | 56 | return |
| 55 | 57 | } |
| 56 | 58 | |
| @@ -57,11 +59,10 @@ | ||
| 57 | 59 | proc ::vc::fossil::import::stats::csend {seconds} { |
| 58 | 60 | variable total_csets |
| 59 | 61 | variable total_seconds |
| 60 | 62 | variable total_running |
| 61 | 63 | |
| 62 | - incr total_running | |
| 63 | 64 | set total_seconds [expr {$total_seconds + $seconds}] |
| 64 | 65 | |
| 65 | 66 | set avg [Avg] |
| 66 | 67 | set end [expr {$total_csets * $avg}] |
| 67 | 68 | set rem [expr {$end - $total_seconds}] |
| 68 | 69 |
| --- tools/lib/import_statistics.tcl | |
| +++ tools/lib/import_statistics.tcl | |
| @@ -47,10 +47,12 @@ | |
| 47 | proc ::vc::fossil::import::stats::csbegin {cset} { |
| 48 | variable max_format |
| 49 | variable run_format |
| 50 | variable total_running |
| 51 | variable total_csets |
| 52 | |
| 53 | write 0 stats "ChangeSet [format $max_format $cset] @ [format $run_format $total_running]/$total_csets ([F6 [expr {$total_running*100.0/$total_csets}]]%)" |
| 54 | return |
| 55 | } |
| 56 | |
| @@ -57,11 +59,10 @@ | |
| 57 | proc ::vc::fossil::import::stats::csend {seconds} { |
| 58 | variable total_csets |
| 59 | variable total_seconds |
| 60 | variable total_running |
| 61 | |
| 62 | incr total_running |
| 63 | set total_seconds [expr {$total_seconds + $seconds}] |
| 64 | |
| 65 | set avg [Avg] |
| 66 | set end [expr {$total_csets * $avg}] |
| 67 | set rem [expr {$end - $total_seconds}] |
| 68 |
| --- tools/lib/import_statistics.tcl | |
| +++ tools/lib/import_statistics.tcl | |
| @@ -47,10 +47,12 @@ | |
| 47 | proc ::vc::fossil::import::stats::csbegin {cset} { |
| 48 | variable max_format |
| 49 | variable run_format |
| 50 | variable total_running |
| 51 | variable total_csets |
| 52 | |
| 53 | incr total_running |
| 54 | |
| 55 | write 0 stats "ChangeSet [format $max_format $cset] @ [format $run_format $total_running]/$total_csets ([F6 [expr {$total_running*100.0/$total_csets}]]%)" |
| 56 | return |
| 57 | } |
| 58 | |
| @@ -57,11 +59,10 @@ | |
| 59 | proc ::vc::fossil::import::stats::csend {seconds} { |
| 60 | variable total_csets |
| 61 | variable total_seconds |
| 62 | variable total_running |
| 63 | |
| 64 | set total_seconds [expr {$total_seconds + $seconds}] |
| 65 | |
| 66 | set avg [Avg] |
| 67 | set end [expr {$total_csets * $avg}] |
| 68 | set rem [expr {$end - $total_seconds}] |
| 69 |