Diff
Not logged in

Differences From:

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

To:

File tools/cvs2fossil/lib/c2f_frev.tcl part of check-in [cfe4b269ac] - Added detection of irrelevant trunk revisions for files added to a branch but not the trunk. Repository extended to keep inverted indices for the meta data and commit messages for retrieval of commit messages per meta data, required for the previous. fixed problem with file objects, we kept only the rcs path, and need the user visible path too. by aku on 2007-10-17 04:37:05. [view]

@@ -51,8 +51,26 @@
     method state {} { return $mystate }
     method lod   {} { return $mylod   }
     method date  {} { return $mydate  }
 
+    method isneeded {} {
+	if {$myoperation ne "nothing"}         {return 1}
+	if {$myrevnr ne "1.1"}                 {return 1}
+	if {![$mylod istrunk]}                 {return 1}
+	if {![llength $mybranches]}            {return 1}
+	set firstbranch [lindex $mybranches 0]
+	if {![$firstbranch haschild]}          {return 1}
+	if {$myisondefaultbranch}              {return 1}
+
+	# FIX: This message will not match if the RCS file was renamed
+	# manually after it was created.
+
+	set gen "file [file tail [$myfile usrpath]] was initially added on branch [$firstbranch name]."
+	set log [$myfile commitmessageof $mymetaid]
+
+	return [expr {$log ne $gen}]
+    }
+
     # Basic parent/child linkage __________
 
     method hasparent {} { return [expr {$myparent ne ""}] }
     method haschild  {} { return [expr {$mychild  ne ""}] }
@@ -83,8 +101,9 @@
 	return
     }
 
     method parentbranch {} { return $myparentbranch }
+    method branches     {} { return $mybranches }
 
     method addbranch {branch} {
 	lappend mybranches $branch
 	return
@@ -149,12 +168,27 @@
 	set mybranchchildren {}
 	return
     }
 
+    method removeallbranches {} {
+	foreach branch $mybranches {
+	    $branch destroy
+	}
+	set mybranches       {}
+	set mybranchchildren {}
+	return
+    }
+
     # Tag linkage _________________________
 
     method addtag {tag} {
 	lappend mytags $tag
+	return
+    }
+
+    method removealltags {} {
+	foreach tag $mytags { $tag destroy }
+	set mytags {}
 	return
     }
 
     method movetagsto {rev} {