Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_repository.tcl part of check-in [6809145eb1] - More comments on sql statements. by aku on 2008-01-19 06:07:49. [view]

To:

File tools/cvs2fossil/lib/c2f_repository.tcl part of check-in [348e45b0d6] - Added basic import of changesets. Note that this code is incomplete with regard to handling the various possible interactions between a vendor-branh and trunk. by aku on 2008-01-30 08:28:34. [view]

@@ -85,8 +85,17 @@
 	struct::list assign [$mymeta keyof $mid] pid bid aid cid
 	return [$mycmsg keyof $cid]
     }
 
+    typemethod getmeta {mid} {
+	struct::list assign [$mymeta keyof $mid] pid bid aid cid
+	return [list \
+		    $myprojmap($pid) \
+		    [$mysymbol keyof $bid] \
+		    [$myauthor keyof $aid] \
+		    [$mycmsg   keyof $cid]]
+    }
+
     # pass I results
     typemethod printstatistics {} {
 	set prlist [TheProjects]
 	set npr [llength $prlist]
@@ -258,8 +267,27 @@
 		# this is used to load the pass II data, which means
 		# that everything is 'undefined' at this point anyway.
 
 		# future: $symbol load (blockers, and parents)
+	    }
+
+	    # Beyond the symbols we also load the author, commit log,
+	    # and meta information.
+
+	    foreach {aid aname} [state run {
+		SELECT aid, name FROM author
+	    }] {
+		$myauthor map $aid $aname
+	    }
+	    foreach {cid text} [state run {
+		SELECT cid, text FROM cmessage
+	    }] {
+		$mycmsg map $cid $text
+	    }
+	    foreach {mid pid bid aid cid} [state run {
+		SELECT mid, pid, bid, aid, cid FROM meta
+	    }] {
+		$mymeta map $mid [list $pid $bid $aid $cid]
 	    }
 	}
 	return
     }
@@ -471,6 +499,5 @@
 }
 
 # # ## ### ##### ######## ############# #####################
 ## Ready
-
 return