Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_ptrunk.tcl part of check-in [2c08006d9d] - Changed the coding of trunk symbols. Using NULL makes for difficult comparisons later when doing integrity checks. Each trunk now has a regular unique id as a symbol. Added documentation to the table definitions, about references, constraints, etc. by aku on 2007-10-25 05:13:41. [view]

To:

File tools/cvs2fossil/lib/c2f_ptrunk.tcl part of check-in [6f8667b03e] - Added code creating aggregate symbol statistics. This completes pass 2 (CollRev). by aku on 2007-10-31 03:44:01. [view]

@@ -25,21 +25,39 @@
     # # ## ### ##### ######## #############
     ## Public API
 
     constructor {project} {
-	set myid [[$project getsymbol $myname] id]
+	set mysymbol [$project getsymbol $myname]
+	set myid     [$mysymbol id]
 	return
+    }
+
+    destructor {
+	$mysymbol destroy
     }
 
     method name    {} { return $myname }
     method id      {} { return $myid   }
     method istrunk {} { return 1 }
+    method symbol  {} { return $self }
+
+    method countasbranch {} {}
+    method countastag    {} {}
+    method countacommit  {} {}
+
+    method blockedby      {symbol} {}
+    method possibleparent {symbol} {}
+
+    method isghost {} { return 0 }
+
+    delegate method persistrev to mysymbol
 
     # # ## ### ##### ######## #############
     ## State
 
-    typevariable myname :trunk: ; # Name shared by all trunk symbols.
-    variable     myid   {}      ; # The trunk's symbol id.
+    typevariable myname   :trunk: ; # Name shared by all trunk symbols.
+    variable     myid     {}      ; # The trunk's symbol id.
+    variable     mysymbol {}      ; # The symbol underneath the trunk.
 
     # # ## ### ##### ######## #############
     ## Internal methods
 
@@ -48,9 +66,8 @@
 
     pragma -hastypeinfo    no  ; # no type introspection
     pragma -hasinfo        no  ; # no object introspection
     pragma -hastypemethods no  ; # type is not relevant.
-    pragma -simpledispatch yes ; # simple fast dispatch
 
     # # ## ### ##### ######## #############
 }