Diff
Not logged in

Differences From:

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]

To:

File tools/cvs2fossil/lib/c2f_fsym.tcl part of check-in [177a0cc55c] - Fix setting of myimported, wrong condition. Fix item assignment when sorting branches. Fix parent/child linkage when setting up branch dependencies. Completed processes on non-trunk default branch revisions. Added skeleton code for the deletion of superfluous revisions. by aku on 2007-10-17 03:15:12. [view]

@@ -54,15 +54,18 @@
     }
 
     method setposition {n}   { set mybranchposition $n ; return }
     method setparent   {rev} { set mybranchparent $rev ; return }
+    method setchild    {rev} { set mybranchchild  $rev ; return }
 
     method branchnr    {} { return $mynr }
     method parentrevnr {} { return $mybranchparentrevnr }
     method childrevnr  {} { return $mybranchchildrevnr }
     method haschild    {} { return [expr {$mybranchchildrevnr ne ""}] }
+    method parent      {} { return $mybranchparent }
     method child       {} { return $mybranchchild }
     method position    {} { return $mybranchposition }
+
 
     # Tag acessor methods.
 
     method tagrevnr  {}    { return $mynr }
@@ -73,20 +76,24 @@
     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.
+	$self checklod
+	return
+    }
+
+    method checklod {} {
+	# Consistency check. The symbol's line-of-development has to
+	# be same as the line-of-development of its source (parent
+	# revision of a branch, revision of a tag itself).
 
 	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]'"
+	    trouble fatal "For $mytype [$mysymbol name]: LOD conflict with source, '[$mylod name]' vs. '[$slod name]'"
 	    return
 	}
 	return
     }
@@ -104,9 +111,10 @@
     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.
+			   # is to a project-level object (symbol or
+			   # trunk).
 
     ## Branch symbols _____________________
 
     variable mybranchparentrevnr {} ; # The number of the parent