Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_fsym.tcl part of check-in [67c24820c7] - Reworked the whole handling of meta data (author, commit message, plus project/branch information), so that revisions now store only the meta id, everything else is stored centrally. All the relevant pieces (author, cmessage, symbols, projects) now also get numeric ids assigned early instead of when being saved to the state. Project ids are loaded from the state now too. by aku on 2007-10-14 01:58:07. [view]

To:

File tools/cvs2fossil/lib/c2f_fsym.tcl part of check-in [e5441b908d] - Continued work on pass II, starting to post-process tags, branches, and revisions, cleaning up cvs quirks, determining higher-level aggregates ... by aku on 2007-10-15 00:03:30. [view]

@@ -52,22 +52,45 @@
 	set mybranchchildrevnr $revnr
 	return
     }
 
-    method setposition {n} { set mybranchposition $n }
+    method setposition {n}   { set mybranchposition $n ; return }
+    method setparent   {rev} { set mybranchparent $rev ; return }
 
     method branchnr    {} { return $mynr }
     method parentrevnr {} { return $mybranchparentrevnr }
     method childrevnr  {} { return $mybranchchildrevnr }
-
     method haschild    {} { return [expr {$mybranchchildrevnr ne ""}] }
     method child       {} { return $mybranchchild }
-
-    method position {} { return $mybranchposition }
+    method position    {} { return $mybranchposition }
 
     # Tag acessor methods.
 
-    method tagrevnr {} { return $mynr }
+    method tagrevnr  {}    { return $mynr }
+    method settagrev {rev} {set mytagrev $rev ; return }
+
+    # Derived information
+
+    method lod {} { return $mylod }
+
+    method setlod {lod} {
+	set mylod $lod
+
+	# Consistency check integrated. The symbol's
+	# line-of-development has to be same as the
+	# line-of-development of its source.
+
+	switch -exact -- $mytype {
+	    branch  { set slod [$mybranchparent lod] }
+	    tag     { set slod [$mytagrev       lod] }
+	}
+
+	if {$mylod ne $slod} {
+	    trouble fatal "For [$mysymbol name]: LOD conflict with source, '[$mylod name]' vs. '[$slod name]'"
+	    return
+	}
+	return
+    }
 
     # # ## ### ##### ######## #############
     ## State
 
@@ -77,8 +100,13 @@
     variable mynr     {} ; # Revision number of a 'tag', branch number
 			   # of a 'branch'.
     variable mysymbol {} ; # Reference to the symbol object of this
 			   # symbol at the project level.
+    variable mylod    {} ; # Reference to the line-of-development
+			   # object the symbol belongs to. An
+			   # alternative idiom would be to call it the
+			   # branch the symbol is on. This reference
+			   # is to a project-level symbol object.
 
     ## Branch symbols _____________________
 
     variable mybranchparentrevnr {} ; # The number of the parent
@@ -96,8 +124,11 @@
 				      # the file, to sort into
 				      # creation order.
 
     ## Tag symbols ________________________
+
+    variable mytagrev {} ; # Reference to the revision object the tag
+			   # is on, identified by 'mynr'.
 
     # ... nothing special ... (only mynr, see basic)
 
     # # ## ### ##### ######## #############