Fossil

Check-in [8e301242]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Updated the code printing the changeset statistics to know about change to the changeset types.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:8e3012423b2db720c1c09b01a8cf2df53f9743bb
User & Date: aku 2007-11-29 06:23:30
Context
2007-11-29
06:31
Started to adapt the integrity module. Renamed Check to CheckRev, and added analoguous commands for Tags and Branches. Added placeholders for the new integrity commands, updated main changeset integrity command. check-in: 7c28fe13 user: aku tags: trunk
06:23
Updated the code printing the changeset statistics to know about change to the changeset types. check-in: 8e301242 user: aku tags: trunk
06:21
Brought knowledge of the new types to the state definition, changed the creation of the initial changesets to use tags and branches. check-in: 215d2f1a user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tools/cvs2fossil/lib/c2f_repository.tcl.

277
278
279
280
281
282
283
284
285
286

287
288
289
290
291

292
293
294
295
296
297
298
...
305
306
307
308
309
310
311
312

313
314
315
316

317
318
319
320
321
322
323


    # pass IV+ results
    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 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

	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}]"


	set prlist [TheProjects]
	set npr [llength $prlist]

	if {$npr > 1} {
	    set  bmax [max [struct::list map $prlist [myproc .BaseLength]]]
	    incr bmax 2
................................................................................
	    set pid [$p id]
	    set prefix "Project [format $bfmt \"[$p printbase]\"]"
	    regsub -all {[^	]} $prefix { } blanks
	    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 }]


	    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}]"

	}
	return
    }

    # # ## ### ##### ######## #############
    ## State








|

|
>
|



|
>







 







|
>



|
>







277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
...
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327


    # pass IV+ results
    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 rcount [state one { SELECT COUNT (*) FROM changeset WHERE type = 0 }]
	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 $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]

	if {$npr > 1} {
	    set  bmax [max [struct::list map $prlist [myproc .BaseLength]]]
	    incr bmax 2
................................................................................
	    set pid [$p id]
	    set prefix "Project [format $bfmt \"[$p printbase]\"]"
	    regsub -all {[^	]} $prefix { } blanks
	    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 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 $tcount] [sp $tcount {tag symbol changeset}]"
	    log write 2 repository "Statistics: $blanks$sep[format $fmt $bcount] [sp $bcount {branch symbol changeset}]"
	}
	return
    }

    # # ## ### ##### ######## #############
    ## State