Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_frev.tcl part of check-in [cb70cf4ad6] - The basic work of setting up and linking revisions, tags, and branches is complete. by aku on 2007-10-13 05:39:00. [view]

To:

File tools/cvs2fossil/lib/c2f_frev.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]

@@ -24,25 +24,22 @@
 snit::type ::vc::fossil::import::cvs::file::rev {
     # # ## ### ##### ######## #############
     ## Public API
 
-    constructor {revnr date author state thefile} {
+    constructor {revnr date state thefile} {
 	set myrevnr    $revnr
 	set mydate     $date
 	set myorigdate $date
-	set myauthor   $author
 	set mystate    $state
 	set myfile     $thefile
 	return
     }
 
     # Basic pieces ________________________
 
-    method hascommitmsg {} { return $myhascm }
-
-    method setcommitmsg  {cm}   { set mycommitmsg  $cm   ; set myhascm 1 ; return }
-    method settext       {text} { set mytext       $text ; return }
-    method setbranchname {name} { set mybranchname $name ; return }
+    method hasmeta {}     { return [expr {$mymetaid ne ""}] }
+    method setmeta {meta} { set mymetaid $meta ; return }
+    method settext {text} { set mytext   $text ; return }
 
     method revnr {} { return $myrevnr }
 
     # Basic parent/child linkage __________
@@ -163,18 +160,19 @@
     variable mydate      {} ; # Timestamp of the revision, seconds since epoch
     variable myorigdate  {} ; # Original unmodified timestamp.
     variable mystate     {} ; # State of the revision.
     variable myfile      {} ; # Ref to the file object the revision belongs to.
-    variable myhascm     0  ; # Bool flag, set when the commit msg was set.
     variable mytext      {} ; # Range of the (delta) text for this revision in the file.
 
-    # The meta data block used later to group revisions into changesets.
-    # The project name factors into this as well, but is not stored
-    # here. The name is acessible via myfile's project.
-
-    variable myauthor     {} ; # Name of the user who committed the revision.
-    variable mycommitmsg  {} ; # The message entered as part of the commit.
-    variable mybranchname {} ; # The name of the branch the revision was committed on.
+    variable mymetaid    {} ; # Id of the meta data group the revision
+			      # belongs to. This is later used to put
+			      # the file revisions into preliminary
+			      # changesets (aka project revisions).
+			      # This id encodes 4 pieces of data,
+			      # namely: the project and branch the
+			      # revision was committed to, the author
+			      # who did the commit, and the message
+			      # used.
 
     # Basic parent/child linkage (lines of development)
 
     variable myparent {} ; # Ref to parent revision object. Link required because of