Diff
Not logged in

Differences From:

File tools/cvs2fossil/lib/c2f_integrity.tcl part of check-in [b42cff97e3] - Replaced the checks for self-referential changesets in the cycle breaker with a scheme in the changeset class doing checks when splitting a changeset, which is also called by the general changeset integrity code, after each pass. Extended log output at high verbosity levels. Thorough checking of the fragments a changeset is to be split into. by aku on 2007-11-30 03:57:19. [view]

To:

File tools/cvs2fossil/lib/c2f_integrity.tcl part of check-in [0af7a3c8ac] - Easier name for self-referential changesets, loopcheck. Made conditional on option --loopcheck, default off, and avoided if the general checks on changesets report trouble. Reinstated the loop check in the cycle breaker core in simpler form, reusing the new command in the changeset class. by aku on 2007-11-30 06:57:19. [view]

@@ -59,9 +59,16 @@
 	set n 0
 	RevisionChangesets
 	TagChangesets
 	BranchChangesets
-	Selfreferentiality $csets
+	trouble abort? ; # Avoid expensive check if anything found before
+
+	LoopCheck $csets
+	return
+    }
+
+    typemethof loopcheckon {} {
+	set myloopcheck 1
 	return
     }
 
     # # ## ### ##### ######## #############
@@ -737,13 +744,16 @@
 	    }
 	return
     }
 
-    proc Selfreferentiality {csets} {
+    proc LoopCheck {csets} {
+	variable ::myloopcheck
+	if {!$myloopcheck} return
+
 	log write 4 integrity {Checking changesets for self-references}
 
 	foreach cset $csets {
-	    if {[$cset selfreferential]} {
+	    if {[$cset loopcheck]} {
 		trouble fatal "[$cset str] depends on itself"
 	    }
 	}
 	return
@@ -867,8 +877,15 @@
 	}
 	log write 5 integrity {\[[format %02d [incr n]]\] [expr {$ok ? "Ok    " : "Failed"}] ... $header}
 	return
     }
+
+    # # ## ### ##### ######## #############
+
+    typevariable myloopcheck 0 ; # Boolean flag. Controls whether
+				 # 'integrity changesets' looks for
+				 # changesets with loops or not.
+				 # Default is to not look for them.
 
     # # ## ### ##### ######## #############
     ## Configuration