Fossil SCM

Print the tree of symbols (i.e. definite parents) at high verbosity levels.

aku 2008-02-06 04:51 trunk
Commit 70acbf63ecb0a70eef3091a6a7d88418c2176c26
--- tools/cvs2fossil/lib/c2f_pfiltersym.tcl
+++ tools/cvs2fossil/lib/c2f_pfiltersym.tcl
@@ -87,10 +87,11 @@
8787
FilterExcludedSymbols
8888
MutateSymbols
8989
AdjustParents
9090
RefineSymbols
9191
92
+ PrintSymbolTree
9293
repository printrevstatistics
9394
9495
# Strict integrity enforces that all meta entries are in
9596
# the same LOD as the revision using them. At this point
9697
# this may not be true any longer. If a NTDB was excluded
@@ -99,11 +100,11 @@
99100
# refer to the now gone LOD symbol. This is fine however,
100101
# it will not affect our ability to use the meta entries
101102
# to distinguish and group revisions into changesets. It
102103
# should be noted that we cannot simply switch the meta
103104
# entries over to the trunk either, as that may cause the
104
- # modified entries to violate the unique-ness constrain
105
+ # modified entries to violate the unique-ness constraint
105106
# set on that table.
106107
integrity metarelaxed
107108
}
108109
109110
log write 1 filtersym "Filtering completed"
@@ -511,10 +512,56 @@
511512
SELECT B.bid, 1
512513
FROM branch B, revision R
513514
WHERE B.root = R.rid
514515
AND R.op = 0 -- nothing
515516
}
517
+ return
518
+ }
519
+
520
+ proc maxlen {v str} {
521
+ upvar 1 $v n
522
+ set l [string length $str]
523
+ if {$l <= $n} return
524
+ set n $l
525
+ return
526
+ }
527
+
528
+ proc PrintSymbolTree {} {
529
+ if {![log visible? 9]} return
530
+
531
+ array set sym {}
532
+ set n 0
533
+ set t 0
534
+ set c 0
535
+
536
+ foreach {s stype cc p ptype} [state run {
537
+ SELECT S.name, A.name, S.commit_count, P.name, B.name
538
+ FROM tag T, symbol S, symbol P, symtype A, symtype B
539
+ WHERE S.sid = T.sid
540
+ AND P.sid = T.lod
541
+ AND A.tid = S.type
542
+ AND B.tid = P.type
543
+ UNION
544
+ SELECT S.name, A.name, S.commit_count, P.name, B.name
545
+ FROM branch B, symbol S, symbol P, symtype A, symtype B
546
+ WHERE S.sid = B.sid
547
+ AND P.sid = B.lod
548
+ AND A.tid = S.type
549
+ AND B.tid = P.type
550
+ }] {
551
+ lappend sym($s) $p $stype $ptype $cc
552
+ maxlen n $s
553
+ maxlen t $stype
554
+ maxlen t $ptype
555
+ maxlen c $cc
556
+ }
557
+
558
+ foreach s [lsort -dict [array names sym]] {
559
+ struct::list assign $sym($s) p stype ptype cc
560
+
561
+ log write 9 filtersym {Tree: [format %-${t}s $stype] ([format %-${c}d $cc]) [format %-${n}s $s] <-- [format %-${t}s $ptype] $p}
562
+ }
516563
return
517564
}
518565
519566
# # ## ### ##### ######## #############
520567
## Configuration
521568
--- tools/cvs2fossil/lib/c2f_pfiltersym.tcl
+++ tools/cvs2fossil/lib/c2f_pfiltersym.tcl
@@ -87,10 +87,11 @@
87 FilterExcludedSymbols
88 MutateSymbols
89 AdjustParents
90 RefineSymbols
91
 
92 repository printrevstatistics
93
94 # Strict integrity enforces that all meta entries are in
95 # the same LOD as the revision using them. At this point
96 # this may not be true any longer. If a NTDB was excluded
@@ -99,11 +100,11 @@
99 # refer to the now gone LOD symbol. This is fine however,
100 # it will not affect our ability to use the meta entries
101 # to distinguish and group revisions into changesets. It
102 # should be noted that we cannot simply switch the meta
103 # entries over to the trunk either, as that may cause the
104 # modified entries to violate the unique-ness constrain
105 # set on that table.
106 integrity metarelaxed
107 }
108
109 log write 1 filtersym "Filtering completed"
@@ -511,10 +512,56 @@
511 SELECT B.bid, 1
512 FROM branch B, revision R
513 WHERE B.root = R.rid
514 AND R.op = 0 -- nothing
515 }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
516 return
517 }
518
519 # # ## ### ##### ######## #############
520 ## Configuration
521
--- tools/cvs2fossil/lib/c2f_pfiltersym.tcl
+++ tools/cvs2fossil/lib/c2f_pfiltersym.tcl
@@ -87,10 +87,11 @@
87 FilterExcludedSymbols
88 MutateSymbols
89 AdjustParents
90 RefineSymbols
91
92 PrintSymbolTree
93 repository printrevstatistics
94
95 # Strict integrity enforces that all meta entries are in
96 # the same LOD as the revision using them. At this point
97 # this may not be true any longer. If a NTDB was excluded
@@ -99,11 +100,11 @@
100 # refer to the now gone LOD symbol. This is fine however,
101 # it will not affect our ability to use the meta entries
102 # to distinguish and group revisions into changesets. It
103 # should be noted that we cannot simply switch the meta
104 # entries over to the trunk either, as that may cause the
105 # modified entries to violate the unique-ness constraint
106 # set on that table.
107 integrity metarelaxed
108 }
109
110 log write 1 filtersym "Filtering completed"
@@ -511,10 +512,56 @@
512 SELECT B.bid, 1
513 FROM branch B, revision R
514 WHERE B.root = R.rid
515 AND R.op = 0 -- nothing
516 }
517 return
518 }
519
520 proc maxlen {v str} {
521 upvar 1 $v n
522 set l [string length $str]
523 if {$l <= $n} return
524 set n $l
525 return
526 }
527
528 proc PrintSymbolTree {} {
529 if {![log visible? 9]} return
530
531 array set sym {}
532 set n 0
533 set t 0
534 set c 0
535
536 foreach {s stype cc p ptype} [state run {
537 SELECT S.name, A.name, S.commit_count, P.name, B.name
538 FROM tag T, symbol S, symbol P, symtype A, symtype B
539 WHERE S.sid = T.sid
540 AND P.sid = T.lod
541 AND A.tid = S.type
542 AND B.tid = P.type
543 UNION
544 SELECT S.name, A.name, S.commit_count, P.name, B.name
545 FROM branch B, symbol S, symbol P, symtype A, symtype B
546 WHERE S.sid = B.sid
547 AND P.sid = B.lod
548 AND A.tid = S.type
549 AND B.tid = P.type
550 }] {
551 lappend sym($s) $p $stype $ptype $cc
552 maxlen n $s
553 maxlen t $stype
554 maxlen t $ptype
555 maxlen c $cc
556 }
557
558 foreach s [lsort -dict [array names sym]] {
559 struct::list assign $sym($s) p stype ptype cc
560
561 log write 9 filtersym {Tree: [format %-${t}s $stype] ([format %-${c}d $cc]) [format %-${n}s $s] <-- [format %-${t}s $ptype] $p}
562 }
563 return
564 }
565
566 # # ## ### ##### ######## #############
567 ## Configuration
568

Keyboard Shortcuts

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