Check-in [930ec162ce]
Not logged in
Overview

SHA1 Hash:930ec162ce0db00d35d29069a5cd11135b9abee1
Date: 2007-11-22 06:03:47
User: aku
Comment:Fixed the calculation of possible parents for a detached NTDB. Has to be trunk. The symbols were skipped before, causing them to have no parents at all later on, forcing an abort after CollateSymbols. Added some high verbosity log commands for debugging of this area.
Timelines: ancestors | descendants | both | trunk
Other Links: files | ZIP archive | manifest

Tags And Properties
Changes
[hide diffs]

Modified tools/cvs2fossil/lib/c2f_file.tcl from [a0a48d681e] to [2447083356].

@@ -1050,10 +1050,16 @@
 	    $lod countacommit
 
 	    if {[$root hasparentbranch]} {
 		# Note lod == [$root parentbranch]
 		$lod possibleparents
+	    } elseif {![$lod istrunk] && [$root isondefaultbranch]} {
+		# This is the root revision of a detached NTDB. We
+		# have to manually set the only possible parent for
+		# this LOD, the trunk itself.
+
+		[$lod symbol] possibleparent $mytrunk
 	    }
 
 	    # For the revisions in the line we register their branches
 	    # and tags as blockers for the lod, and update the type
 	    # counters as well. As branch symbols without commits on

Modified tools/cvs2fossil/lib/c2f_pcollsym.tcl from [7553c6538a] to [7f9106e82c].

@@ -218,12 +218,12 @@
 	#          each candidate overwriting all previous
 	#          selections. Note that we ignore excluded symbol, we
 	#          do not care about their prefered parents and do not
 	#          attempt to compute them.
 
-	foreach {s p sname pname prname} [state run {
-	    SELECT   S.sid, P.pid, S.name, SB.name, PR.name
+	foreach {s p sname pname prname votes} [state run {
+	    SELECT   S.sid, P.pid, S.name, SB.name, PR.name, P.n
 	    FROM     symbol S, parent P, symbol SB, project PR
 	    WHERE    S.sid = P.sid
 	    AND      P.pid = SB.sid
 	    AND      S.pid = PR.pid
 	    AND      S.type != $excl
@@ -232,10 +232,12 @@
 	    -- We simply keep the last possible parent for each
 	    -- symbol.  This parent will have the max number of votes
 	    -- for its symbol and will be the earliest created branch
 	    -- possible among all with many votes.
 	}] {
+	    log write 9 pcollsym "Voting $votes for Parent($sname) = $pname"
+
 	    set prefered($s) [list $p $sname $pname $prname]
 	}
 
 	# Phase II: Write the found preferences back into the table
 	#           this pass defined for it.

Modified tools/cvs2fossil/lib/c2f_psym.tcl from [e97d1e5410] to [bed2d94917].

@@ -105,10 +105,12 @@
 	struct::set include myblockers $symbol
 	return
     }
 
     method possibleparent {symbol} {
+	log write 9 symbol "Possible parent ($myname) = [$symbol name]"
+
 	if {[info exists mypparent($symbol)]} {
 	    incr mypparent($symbol)
 	} else {
 	    set  mypparent($symbol) 1
 	}