Fossil

Check-in [96064544]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Extended checks for looped changesets.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:960645443b74f566f96d8e8e307aab467362c459
User & Date: aku 2007-11-29 09:13:07
Context
2007-11-29
09:14
Updated commentary regarding cycles at this point, items instead of comments, etc. check-in: af5904e6 user: aku tags: trunk
09:13
Extended checks for looped changesets. check-in: 96064544 user: aku tags: trunk
07:58
Renamed changeset method to describe modified results, and updated the one invoker check-in: 61829b07 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tools/cvs2fossil/lib/c2f_cyclebreaker.tcl.

206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221

222
223
224
225
226
227
228
...
439
440
441
442
443
444
445








446
447
448
449
450
451
452
		# to be not possible, as pass 5 (InitCsets) takes care
		# to transform internal into external dependencies by
		# breaking the relevant changesets apart. So having
		# one indicates big trouble in pass 5. We report them
		# and dump internal structures to make it easier to
		# trace the links causing the problem.
		if {$succ eq $cset} {
		    trouble fatal "Self-referencing changeset [$cset str]"
		    log write 2 cyclebreaker "LOOP changeset [$cset str] __________________"
		    array set nmap [$cset nextmap]
		    foreach r [lsort -dict [array names nmap]] {
			foreach succrev $nmap($r) {
			    log write 2 cyclebreaker \
				"LOOP * rev <$r> --> rev <$succrev> --> cs [project::rev str [project::rev ofitem $succrev]]"
			}
		    }

		}
	    }
	}

	if {$log} {
	    log write 3 cyclebreaker "Has [nsp [llength [$dg arcs]] dependency dependencies]"
	}
................................................................................
	foreach cset $replacements {
	    foreach succ [$cset successors] {
		# The new changesets may have dependencies outside of
		# the chosen set. These are ignored
		if {![$dg node exists $succ]} continue
		$dg arc insert $cset $succ
		if {$succ eq $cset} {








		    trouble internal "Self-referencing changeset [$cset str]"
		}
	    }
	}
	foreach cset $pre {
	    foreach succ [$cset successors] {
		# Note that the arc may already exist in the graph. If







<





|


>







 







>
>
>
>
>
>
>
>







206
207
208
209
210
211
212

213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
...
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
		# to be not possible, as pass 5 (InitCsets) takes care
		# to transform internal into external dependencies by
		# breaking the relevant changesets apart. So having
		# one indicates big trouble in pass 5. We report them
		# and dump internal structures to make it easier to
		# trace the links causing the problem.
		if {$succ eq $cset} {

		    log write 2 cyclebreaker "LOOP changeset [$cset str] __________________"
		    array set nmap [$cset nextmap]
		    foreach r [lsort -dict [array names nmap]] {
			foreach succrev $nmap($r) {
			    log write 2 cyclebreaker \
				"LOOP * <$r> --> <$succrev> --> cs [[project::rev ofitem $succrev] str]"
			}
		    }
		    trouble fatal "Self-referencing changeset [$cset str]"
		}
	    }
	}

	if {$log} {
	    log write 3 cyclebreaker "Has [nsp [llength [$dg arcs]] dependency dependencies]"
	}
................................................................................
	foreach cset $replacements {
	    foreach succ [$cset successors] {
		# The new changesets may have dependencies outside of
		# the chosen set. These are ignored
		if {![$dg node exists $succ]} continue
		$dg arc insert $cset $succ
		if {$succ eq $cset} {
		    log write 2 cyclebreaker "LOOP changeset [$cset str] __________________"
		    array set nmap [$cset nextmap]
		    foreach r [lsort -dict [array names nmap]] {
			foreach succrev $nmap($r) {
			    log write 2 cyclebreaker \
				"LOOP * <$r> --> <$succrev> --> cs [[project::rev ofitem $succrev] str]"
			}
		    }
		    trouble internal "Self-referencing changeset [$cset str]"
		}
	    }
	}
	foreach cset $pre {
	    foreach succ [$cset successors] {
		# Note that the arc may already exist in the graph. If