Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_repository.tcl part of check-in [b679ca3356] - Code cleanup. Removed trailing whitespace across the board. by aku on 2007-11-25 07:54:09. [view]

To:

File tools/cvs2fossil/lib/c2f_repository.tcl part of check-in [8e3012423b] - Updated the code printing the changeset statistics to know about change to the changeset types. by aku on 2007-11-29 06:23:30. [view]

@@ -280,16 +280,18 @@
     typemethod printcsetstatistics {} {
 	log write 2 repository "Changeset statistics"
 	# number of revisions, symbols, repository wide, and per project ...
 
-	set ccount [state one { SELECT COUNT (*) FROM changeset                }]
+	set ccount [state one { SELECT COUNT (*) FROM changeset                 }]
 	set rcount [state one { SELECT COUNT (*) FROM changeset WHERE type = 0 }]
-	set scount [state one { SELECT COUNT (*) FROM changeset WHERE type = 1 }]
-	set fmt %[string length [max [list $ccount $rcount $scount]]]s
+	set tcount [state one { SELECT COUNT (*) FROM changeset WHERE type = 1 }]
+	set bcount [state one { SELECT COUNT (*) FROM changeset WHERE type = 2 }]
+	set fmt %[string length [max [list $ccount $rcount $tcount $bcount]]]s
 
 	log write 2 repository "Statistics: [format $fmt $ccount] [sp $ccount changeset]"
 	log write 2 repository "Statistics: [format $fmt $rcount] [sp $rcount {revision changeset}]"
-	log write 2 repository "Statistics: [format $fmt $scount] [sp $scount {symbol changeset}]"
+	log write 2 repository "Statistics: [format $fmt $tcount] [sp $tcount {tag symbol changeset}]"
+	log write 2 repository "Statistics: [format $fmt $bcount] [sp $bcount {branch symbol changeset}]"
 
 	set prlist [TheProjects]
 	set npr [llength $prlist]
 
@@ -308,13 +310,15 @@
 	    set sep " : "
 
 	    set ccount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid              }]
 	    set rcount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid AND type = 0 }]
-	    set scount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid AND type = 1 }]
+	    set tcount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid AND type = 1 }]
+	    set bcount [state one { SELECT COUNT (*) FROM changeset WHERE pid = $pid AND type = 2 }]
 
 	    log write 2 repository "Statistics: $prefix$sep[format $fmt $ccount] [sp $ccount changeset]"
 	    log write 2 repository "Statistics: $blanks$sep[format $fmt $rcount] [sp $rcount {revision changeset}]"
-	    log write 2 repository "Statistics: $blanks$sep[format $fmt $scount] [sp $scount {symbol changeset}]"
+	    log write 2 repository "Statistics: $blanks$sep[format $fmt $tcount] [sp $tcount {tag symbol changeset}]"
+	    log write 2 repository "Statistics: $blanks$sep[format $fmt $bcount] [sp $bcount {branch symbol changeset}]"
 	}
 	return
     }