Fossil SCM

Moved the counting of imported changesets to the beginning for a more accurate percent calculation and proper ending at 100%.

aku 2007-09-20 07:08 trunk
Commit 330f2da791611680e4153ee5521149e945615518
--- tools/lib/import_statistics.tcl
+++ tools/lib/import_statistics.tcl
@@ -47,10 +47,12 @@
4747
proc ::vc::fossil::import::stats::csbegin {cset} {
4848
variable max_format
4949
variable run_format
5050
variable total_running
5151
variable total_csets
52
+
53
+ incr total_running
5254
5355
write 0 stats "ChangeSet [format $max_format $cset] @ [format $run_format $total_running]/$total_csets ([F6 [expr {$total_running*100.0/$total_csets}]]%)"
5456
return
5557
}
5658
@@ -57,11 +59,10 @@
5759
proc ::vc::fossil::import::stats::csend {seconds} {
5860
variable total_csets
5961
variable total_seconds
6062
variable total_running
6163
62
- incr total_running
6364
set total_seconds [expr {$total_seconds + $seconds}]
6465
6566
set avg [Avg]
6667
set end [expr {$total_csets * $avg}]
6768
set rem [expr {$end - $total_seconds}]
6869
--- 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

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button