Differences From:
File
tools/cvs2fossil/lib/c2f_pfiltersym.tcl
part of check-in
[83d75a6c23]
- Modified filtering pass to drop the blobs of excluded revisions, for them we can be sure that we will not need them later, as whole branches are dropped. Modified the file import to use the new blob information to setup the expansion graph. This fixes the trouble we had with archive files in bwidget. They are now properly expanded.
by
aku on
2008-02-03 00:45:57.
[view]
To:
File
tools/cvs2fossil/lib/c2f_pfiltersym.tcl
part of check-in
[66235f2430]
- Updated the copyright information of all files touched in the new year.
by
aku on
2008-02-06 05:04:12.
Also file
tools/cvs2fossil/lib/c2f_pfiltersym.tcl
part of check-in
[6b78df3861]
- Merge in changes from Andreas's branch.
by
drh on
2008-02-08 21:52:21.
[view]
@@ -1,7 +1,7 @@
## -*- tcl -*-
# # ## ### ##### ######## ############# #####################
-## Copyright (c) 2007 Andreas Kupries.
+## Copyright (c) 2007-2008 Andreas Kupries.
#
# This software is licensed as described in the file LICENSE, which
# you should have received as part of this distribution.
#
@@ -88,8 +88,9 @@
MutateSymbols
AdjustParents
RefineSymbols
+ PrintSymbolTree
repository printrevstatistics
# Strict integrity enforces that all meta entries are in
# the same LOD as the revision using them. At this point
@@ -100,9 +101,9 @@
# it will not affect our ability to use the meta entries
# to distinguish and group revisions into changesets. It
# should be noted that we cannot simply switch the meta
# entries over to the trunk either, as that may cause the
- # modified entries to violate the unique-ness constrain
+ # modified entries to violate the unique-ness constraint
# set on that table.
integrity metarelaxed
}
@@ -511,8 +512,54 @@
SELECT B.bid, 1
FROM branch B, revision R
WHERE B.root = R.rid
AND R.op = 0 -- nothing
+ }
+ return
+ }
+
+ proc maxlen {v str} {
+ upvar 1 $v n
+ set l [string length $str]
+ if {$l <= $n} return
+ set n $l
+ return
+ }
+
+ proc PrintSymbolTree {} {
+ if {![log visible? 9]} return
+
+ array set sym {}
+ set n 0
+ set t 0
+ set c 0
+
+ foreach {s stype cc p ptype} [state run {
+ SELECT S.name, A.name, S.commit_count, P.name, B.name
+ FROM tag T, symbol S, symbol P, symtype A, symtype B
+ WHERE S.sid = T.sid
+ AND P.sid = T.lod
+ AND A.tid = S.type
+ AND B.tid = P.type
+ UNION
+ SELECT S.name, A.name, S.commit_count, P.name, B.name
+ FROM branch B, symbol S, symbol P, symtype A, symtype B
+ WHERE S.sid = B.sid
+ AND P.sid = B.lod
+ AND A.tid = S.type
+ AND B.tid = P.type
+ }] {
+ lappend sym($s) $p $stype $ptype $cc
+ maxlen n $s
+ maxlen t $stype
+ maxlen t $ptype
+ maxlen c $cc
+ }
+
+ foreach s [lsort -dict [array names sym]] {
+ struct::list assign $sym($s) p stype ptype cc
+
+ log write 9 filtersym {Tree: [format %-${t}s $stype] ([format %-${c}d $cc]) [format %-${n}s $s] <-- [format %-${t}s $ptype] $p}
}
return
}