Fossil SCM
Updated the code printing the changeset statistics to know about change to the changeset types.
Commit
8e3012423b2db720c1c09b01a8cf2df53f9743bb
Parent
215d2f1ad99b870…
1 file changed
+10
-6
| --- tools/cvs2fossil/lib/c2f_repository.tcl | ||
| +++ tools/cvs2fossil/lib/c2f_repository.tcl | ||
| @@ -279,18 +279,20 @@ | ||
| 279 | 279 | # pass IV+ results |
| 280 | 280 | typemethod printcsetstatistics {} { |
| 281 | 281 | log write 2 repository "Changeset statistics" |
| 282 | 282 | # number of revisions, symbols, repository wide, and per project ... |
| 283 | 283 | |
| 284 | - set ccount [state one { SELECT COUNT (*) FROM changeset }] | |
| 284 | + set ccount [state one { SELECT COUNT (*) FROM changeset }] | |
| 285 | 285 | set rcount [state one { SELECT COUNT (*) FROM changeset WHERE type = 0 }] |
| 286 | - set scount [state one { SELECT COUNT (*) FROM changeset WHERE type = 1 }] | |
| 287 | - set fmt %[string length [max [list $ccount $rcount $scount]]]s | |
| 286 | + set tcount [state one { SELECT COUNT (*) FROM changeset WHERE type = 1 }] | |
| 287 | + set bcount [state one { SELECT COUNT (*) FROM changeset WHERE type = 2 }] | |
| 288 | + set fmt %[string length [max [list $ccount $rcount $tcount $bcount]]]s | |
| 288 | 289 | |
| 289 | 290 | log write 2 repository "Statistics: [format $fmt $ccount] [sp $ccount changeset]" |
| 290 | 291 | log write 2 repository "Statistics: [format $fmt $rcount] [sp $rcount {revision changeset}]" |
| 291 | - log write 2 repository "Statistics: [format $fmt $scount] [sp $scount {symbol changeset}]" | |
| 292 | + log write 2 repository "Statistics: [format $fmt $tcount] [sp $tcount {tag symbol changeset}]" | |
| 293 | + log write 2 repository "Statistics: [format $fmt $bcount] [sp $bcount {branch symbol changeset}]" | |
| 292 | 294 | |
| 293 | 295 | set prlist [TheProjects] |
| 294 | 296 | set npr [llength $prlist] |
| 295 | 297 | |
| 296 | 298 | if {$npr > 1} { |
| @@ -307,15 +309,17 @@ | ||
| 307 | 309 | regsub -all {[^ ]} $prefix { } blanks |
| 308 | 310 | set sep " : " |
| 309 | 311 | |
| 310 | 312 | set ccount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid }] |
| 311 | 313 | set rcount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid AND type = 0 }] |
| 312 | - set scount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid AND type = 1 }] | |
| 314 | + set tcount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid AND type = 1 }] | |
| 315 | + set bcount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid AND type = 2 }] | |
| 313 | 316 | |
| 314 | 317 | log write 2 repository "Statistics: $prefix$sep[format $fmt $ccount] [sp $ccount changeset]" |
| 315 | 318 | log write 2 repository "Statistics: $blanks$sep[format $fmt $rcount] [sp $rcount {revision changeset}]" |
| 316 | - log write 2 repository "Statistics: $blanks$sep[format $fmt $scount] [sp $scount {symbol changeset}]" | |
| 319 | + log write 2 repository "Statistics: $blanks$sep[format $fmt $tcount] [sp $tcount {tag symbol changeset}]" | |
| 320 | + log write 2 repository "Statistics: $blanks$sep[format $fmt $bcount] [sp $bcount {branch symbol changeset}]" | |
| 317 | 321 | } |
| 318 | 322 | return |
| 319 | 323 | } |
| 320 | 324 | |
| 321 | 325 | # # ## ### ##### ######## ############# |
| 322 | 326 |
| --- tools/cvs2fossil/lib/c2f_repository.tcl | |
| +++ tools/cvs2fossil/lib/c2f_repository.tcl | |
| @@ -279,18 +279,20 @@ | |
| 279 | # pass IV+ results |
| 280 | typemethod printcsetstatistics {} { |
| 281 | log write 2 repository "Changeset statistics" |
| 282 | # number of revisions, symbols, repository wide, and per project ... |
| 283 | |
| 284 | set ccount [state one { SELECT COUNT (*) FROM changeset }] |
| 285 | set rcount [state one { SELECT COUNT (*) FROM changeset WHERE type = 0 }] |
| 286 | set scount [state one { SELECT COUNT (*) FROM changeset WHERE type = 1 }] |
| 287 | set fmt %[string length [max [list $ccount $rcount $scount]]]s |
| 288 | |
| 289 | log write 2 repository "Statistics: [format $fmt $ccount] [sp $ccount changeset]" |
| 290 | log write 2 repository "Statistics: [format $fmt $rcount] [sp $rcount {revision changeset}]" |
| 291 | log write 2 repository "Statistics: [format $fmt $scount] [sp $scount {symbol changeset}]" |
| 292 | |
| 293 | set prlist [TheProjects] |
| 294 | set npr [llength $prlist] |
| 295 | |
| 296 | if {$npr > 1} { |
| @@ -307,15 +309,17 @@ | |
| 307 | regsub -all {[^ ]} $prefix { } blanks |
| 308 | set sep " : " |
| 309 | |
| 310 | set ccount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid }] |
| 311 | set rcount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid AND type = 0 }] |
| 312 | set scount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid AND type = 1 }] |
| 313 | |
| 314 | log write 2 repository "Statistics: $prefix$sep[format $fmt $ccount] [sp $ccount changeset]" |
| 315 | log write 2 repository "Statistics: $blanks$sep[format $fmt $rcount] [sp $rcount {revision changeset}]" |
| 316 | log write 2 repository "Statistics: $blanks$sep[format $fmt $scount] [sp $scount {symbol changeset}]" |
| 317 | } |
| 318 | return |
| 319 | } |
| 320 | |
| 321 | # # ## ### ##### ######## ############# |
| 322 |
| --- tools/cvs2fossil/lib/c2f_repository.tcl | |
| +++ tools/cvs2fossil/lib/c2f_repository.tcl | |
| @@ -279,18 +279,20 @@ | |
| 279 | # pass IV+ results |
| 280 | typemethod printcsetstatistics {} { |
| 281 | log write 2 repository "Changeset statistics" |
| 282 | # number of revisions, symbols, repository wide, and per project ... |
| 283 | |
| 284 | set ccount [state one { SELECT COUNT (*) FROM changeset }] |
| 285 | set rcount [state one { SELECT COUNT (*) FROM changeset WHERE type = 0 }] |
| 286 | set tcount [state one { SELECT COUNT (*) FROM changeset WHERE type = 1 }] |
| 287 | set bcount [state one { SELECT COUNT (*) FROM changeset WHERE type = 2 }] |
| 288 | set fmt %[string length [max [list $ccount $rcount $tcount $bcount]]]s |
| 289 | |
| 290 | log write 2 repository "Statistics: [format $fmt $ccount] [sp $ccount changeset]" |
| 291 | log write 2 repository "Statistics: [format $fmt $rcount] [sp $rcount {revision changeset}]" |
| 292 | log write 2 repository "Statistics: [format $fmt $tcount] [sp $tcount {tag symbol changeset}]" |
| 293 | log write 2 repository "Statistics: [format $fmt $bcount] [sp $bcount {branch symbol changeset}]" |
| 294 | |
| 295 | set prlist [TheProjects] |
| 296 | set npr [llength $prlist] |
| 297 | |
| 298 | if {$npr > 1} { |
| @@ -307,15 +309,17 @@ | |
| 309 | regsub -all {[^ ]} $prefix { } blanks |
| 310 | set sep " : " |
| 311 | |
| 312 | set ccount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid }] |
| 313 | set rcount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid AND type = 0 }] |
| 314 | set tcount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid AND type = 1 }] |
| 315 | set bcount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid AND type = 2 }] |
| 316 | |
| 317 | log write 2 repository "Statistics: $prefix$sep[format $fmt $ccount] [sp $ccount changeset]" |
| 318 | log write 2 repository "Statistics: $blanks$sep[format $fmt $rcount] [sp $rcount {revision changeset}]" |
| 319 | log write 2 repository "Statistics: $blanks$sep[format $fmt $tcount] [sp $tcount {tag symbol changeset}]" |
| 320 | log write 2 repository "Statistics: $blanks$sep[format $fmt $bcount] [sp $bcount {branch symbol changeset}]" |
| 321 | } |
| 322 | return |
| 323 | } |
| 324 | |
| 325 | # # ## ### ##### ######## ############# |
| 326 |