File Annotation
Not logged in
770a9b576a 2007-11-16       aku: ## -*- tcl -*-
770a9b576a 2007-11-16       aku: # # ## ### ##### ######## ############# #####################
770a9b576a 2007-11-16       aku: ## Copyright (c) 2007 Andreas Kupries.
770a9b576a 2007-11-16       aku: #
770a9b576a 2007-11-16       aku: # This software is licensed as described in the file LICENSE, which
770a9b576a 2007-11-16       aku: # you should have received as part of this distribution.
770a9b576a 2007-11-16       aku: #
770a9b576a 2007-11-16       aku: # This software consists of voluntary contributions made by many
770a9b576a 2007-11-16       aku: # individuals.  For exact contribution history, see the revision
770a9b576a 2007-11-16       aku: # history and logs, available at http://fossil-scm.hwaci.com/fossil
770a9b576a 2007-11-16       aku: # # ## ### ##### ######## ############# #####################
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: ## This file provides a helper package for the passes 6 and 7 which
770a9b576a 2007-11-16       aku: ## contains the common code of the cycle breaking algorithm.
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: # # ## ### ##### ######## ############# #####################
770a9b576a 2007-11-16       aku: ## Requirements
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: package require Tcl 8.4                                   ; # Required runtime.
770a9b576a 2007-11-16       aku: package require snit                                      ; # OO system.
770a9b576a 2007-11-16       aku: package require struct::graph                             ; # Graph handling.
770a9b576a 2007-11-16       aku: package require struct::list                              ; # Higher order list operations.
7f15be9078 2007-11-20       aku: package require vc::tools::dot                            ; # User feedback. DOT export.
770a9b576a 2007-11-16       aku: package require vc::tools::log                            ; # User feedback.
770a9b576a 2007-11-16       aku: package require vc::tools::misc                           ; # Text formatting.
770a9b576a 2007-11-16       aku: package require vc::fossil::import::cvs::project::rev     ; # Project level changesets
770a9b576a 2007-11-16       aku: package require vc::fossil::import::cvs::project::revlink ; # Cycle links.
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: # # ## ### ##### ######## ############# #####################
770a9b576a 2007-11-16       aku: ##
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: snit::type ::vc::fossil::import::cvs::cyclebreaker {
770a9b576a 2007-11-16       aku:     # # ## ### ##### ######## #############
770a9b576a 2007-11-16       aku:     ## Public API
770a9b576a 2007-11-16       aku: 
7f15be9078 2007-11-20       aku:     typemethod dotsto {path} {
7f15be9078 2007-11-20       aku: 	::variable mydotdestination $path
7f15be9078 2007-11-20       aku: 	return
7f15be9078 2007-11-20       aku:     }
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku:     typemethod dot {label changesets} {
7f15be9078 2007-11-20       aku: 	::variable mydotprefix $label
7f15be9078 2007-11-20       aku: 	::variable mydotid     0
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku: 	set dg [Setup $changesets 0]
7f15be9078 2007-11-20       aku: 	Mark $dg
7f15be9078 2007-11-20       aku: 	$dg destroy
7f15be9078 2007-11-20       aku: 	return
7f15be9078 2007-11-20       aku:     }
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku:     typemethod run {label changesets {savecmd {}}} {
7f15be9078 2007-11-20       aku: 	::variable mysave      $savecmd
7f15be9078 2007-11-20       aku: 	::variable myat        0
7f15be9078 2007-11-20       aku: 	::variable mydotprefix $label
7f15be9078 2007-11-20       aku: 	::variable mydotid     0
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	# We create a graph of the revision changesets, using the file
770a9b576a 2007-11-16       aku: 	# level dependencies to construct a first approximation of the
770a9b576a 2007-11-16       aku: 	# dependencies at the project level. Then we look for cycles
770a9b576a 2007-11-16       aku: 	# in that graph and break them.
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	# 1. Create nodes for all relevant changesets and a mapping
770a9b576a 2007-11-16       aku: 	#    from the revisions to their changesets/nodes.
770a9b576a 2007-11-16       aku: 
7f15be9078 2007-11-20       aku: 	set dg [Setup $changesets]
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	# 3. Lastly we iterate the graph topologically. We mark off
770a9b576a 2007-11-16       aku: 	#    the nodes which have no predecessors, in order from
770a9b576a 2007-11-16       aku: 	#    oldest to youngest, saving and removing dependencies. If
770a9b576a 2007-11-16       aku: 	#    we find no nodes without predecessors we have a cycle,
770a9b576a 2007-11-16       aku: 	#    and work on breaking it.
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	log write 3 cyclebreaker {Now sorting the changesets, breaking cycles}
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	InitializeCandidates $dg
770a9b576a 2007-11-16       aku: 	while {1} {
770a9b576a 2007-11-16       aku: 	    while {[WithoutPredecessor $dg n]} {
770a9b576a 2007-11-16       aku: 		SaveAndRemove $dg $n
770a9b576a 2007-11-16       aku: 	    }
770a9b576a 2007-11-16       aku: 	    if {![llength [dg nodes]]} break
770a9b576a 2007-11-16       aku: 	    BreakCycle $dg [FindCycle $dg]
770a9b576a 2007-11-16       aku: 	    InitializeCandidates $dg
770a9b576a 2007-11-16       aku: 	}
770a9b576a 2007-11-16       aku: 
7b3928681e 2007-11-16       aku: 	dg destroy
7b3928681e 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	log write 3 cyclebreaker Done.
770a9b576a 2007-11-16       aku: 	return
770a9b576a 2007-11-16       aku:     }
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku:     # # ## ### ##### ######## #############
770a9b576a 2007-11-16       aku:     ## Internal methods
770a9b576a 2007-11-16       aku: 
7f15be9078 2007-11-20       aku:     proc Setup {changesets {log 1}} {
7f15be9078 2007-11-20       aku: 	if {$log} {
7f15be9078 2007-11-20       aku: 	    log write 3 cyclebreaker "Creating changeset graph, filling with nodes"
7f15be9078 2007-11-20       aku: 	    log write 3 cyclebreaker "Adding [nsp [llength $changesets] node]"
7f15be9078 2007-11-20       aku: 	}
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku: 	set dg [struct::graph dg]
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku: 	foreach cset $changesets {
7f15be9078 2007-11-20       aku: 	    $dg node insert $cset
7f15be9078 2007-11-20       aku: 	    $dg node set    $cset timerange [$cset timerange]
7f15be9078 2007-11-20       aku: 	}
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku: 	# 2. Find for all relevant changeset their revisions and their
7f15be9078 2007-11-20       aku: 	#    dependencies. Map the latter back to changesets and
7f15be9078 2007-11-20       aku: 	#    construct the corresponding arcs.
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku: 	if {$log} {
7f15be9078 2007-11-20       aku: 	    log write 3 cyclebreaker {Setting up node dependencies}
7f15be9078 2007-11-20       aku: 	}
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku: 	foreach cset $changesets {
7f15be9078 2007-11-20       aku: 	    foreach succ [$cset successors] {
7f15be9078 2007-11-20       aku: 		# Changesets may have dependencies outside of the
7f15be9078 2007-11-20       aku: 		# chosen set. These are ignored
7f15be9078 2007-11-20       aku: 		if {![$dg node exists $succ]} continue
7f15be9078 2007-11-20       aku: 		$dg arc insert $cset $succ
7f15be9078 2007-11-20       aku: 	    }
7f15be9078 2007-11-20       aku: 	}
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku: 	return $dg
7f15be9078 2007-11-20       aku:     }
7f15be9078 2007-11-20       aku: 
770a9b576a 2007-11-16       aku:     # Instead of searching the whole graph for the degree-0 nodes in
770a9b576a 2007-11-16       aku:     # each iteration we compute the list once to start, and then only
770a9b576a 2007-11-16       aku:     # update it incrementally based on the outgoing neighbours of the
770a9b576a 2007-11-16       aku:     # node chosen for commit.
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku:     proc InitializeCandidates {dg} {
770a9b576a 2007-11-16       aku: 	# bottom = list (list (node, range min, range max))
7f15be9078 2007-11-20       aku: 	::variable mybottom
770a9b576a 2007-11-16       aku: 	foreach n [$dg nodes] {
770a9b576a 2007-11-16       aku: 	    if {[$dg node degree -in $n]} continue
7f15be9078 2007-11-20       aku: 	    lappend mybottom [linsert [$dg node get $n timerange] 0 $n]
770a9b576a 2007-11-16       aku: 	}
7f15be9078 2007-11-20       aku: 	set mybottom [lsort -index 1 -integer [lsort -index 2 -integer $mybottom]]
770a9b576a 2007-11-16       aku: 	return
770a9b576a 2007-11-16       aku:     }
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku:     proc WithoutPredecessor {dg nv} {
7f15be9078 2007-11-20       aku: 	::variable mybottom
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	upvar 1 $nv n
7f15be9078 2007-11-20       aku: 	if {![llength $mybottom]} { return 0 }
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku: 	set n [lindex [lindex $mybottom 0] 0]
7f15be9078 2007-11-20       aku: 	set mybottom [lrange $mybottom 1 end]
770a9b576a 2007-11-16       aku: 	set changed 0
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	# Update list of nodes without predecessor, based on the
770a9b576a 2007-11-16       aku: 	# outgoing neighbours of the chosen node. This should be
770a9b576a 2007-11-16       aku: 	# faster than iterating of the whole set of nodes, finding all
770a9b576a 2007-11-16       aku: 	# without predecessors, sorting them by time, etc. pp.
770a9b576a 2007-11-16       aku: 	foreach out [$dg nodes -out $n] {
770a9b576a 2007-11-16       aku: 	    if {[$dg node degree -in $out] > 1} continue
770a9b576a 2007-11-16       aku: 	    # Degree-1 neighbour, will have no predecessors after the
770a9b576a 2007-11-16       aku: 	    # removal of n. Put on the list.
7f15be9078 2007-11-20       aku: 	    lappend mybottom [linsert [$dg node get $out timerange] 0 $out]
770a9b576a 2007-11-16       aku: 	    set changed 1
770a9b576a 2007-11-16       aku: 	}
770a9b576a 2007-11-16       aku: 	if {$changed} {
7f15be9078 2007-11-20       aku: 	    set mybottom [lsort -index 1 -integer [lsort -index 2 -integer $mybottom]]
770a9b576a 2007-11-16       aku: 	}
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	# We do not delete the node immediately, to allow the Save
770a9b576a 2007-11-16       aku: 	# procedure to save the dependencies as well (encoded in the
770a9b576a 2007-11-16       aku: 	# arcs).
770a9b576a 2007-11-16       aku: 	return 1
770a9b576a 2007-11-16       aku:     }
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku:     proc SaveAndRemove {dg n} {
7f15be9078 2007-11-20       aku: 	::variable myat
7f15be9078 2007-11-20       aku: 	::variable mysave
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	# Give the user of the cycle breaker the opportunity to work
770a9b576a 2007-11-16       aku: 	# with the changeset before it is removed from the graph.
770a9b576a 2007-11-16       aku: 
7f15be9078 2007-11-20       aku: 	if {[llength $mysave]} {
7f15be9078 2007-11-20       aku: 	    uplevel #0 [linsert $mysave end $myat $n]
770a9b576a 2007-11-16       aku: 	}
770a9b576a 2007-11-16       aku: 
7f15be9078 2007-11-20       aku: 	incr myat
770a9b576a 2007-11-16       aku: 	$dg node delete $n
770a9b576a 2007-11-16       aku: 	return
770a9b576a 2007-11-16       aku:     }
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku:     proc FindCycle {dg} {
770a9b576a 2007-11-16       aku: 	# This procedure is run if and only the graph is not empty and
770a9b576a 2007-11-16       aku: 	# all nodes have predecessors. This means that each node is
770a9b576a 2007-11-16       aku: 	# either part of a cycle or (indirectly) depending on a node
770a9b576a 2007-11-16       aku: 	# in a cycle. We can start at an arbitrary node, follow its
770a9b576a 2007-11-16       aku: 	# incoming edges to its predecessors until we see a node a
770a9b576a 2007-11-16       aku: 	# second time. That node closes the cycle and the beginning is
770a9b576a 2007-11-16       aku: 	# its first occurence. Note that we can choose an arbitrary
770a9b576a 2007-11-16       aku: 	# predecessor of each node as well, we do not have to search.
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	# We record for each node the index of the first appearance in
770a9b576a 2007-11-16       aku: 	# the path, making it easy at the end to cut the cycle from
770a9b576a 2007-11-16       aku: 	# it.
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	# Choose arbitrary node to start our search at.
770a9b576a 2007-11-16       aku: 	set start [lindex [$dg nodes] 0]
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	# Initialize state, path of seen nodes, and when seen.
770a9b576a 2007-11-16       aku: 	set       path {}
770a9b576a 2007-11-16       aku: 	array set seen {}
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	while {1} {
770a9b576a 2007-11-16       aku: 	    # Stop searching when we have seen the current node
770a9b576a 2007-11-16       aku: 	    # already, the circle has been closed.
770a9b576a 2007-11-16       aku: 	    if {[info exists seen($start)]} break
770a9b576a 2007-11-16       aku: 	    lappend path $start
770a9b576a 2007-11-16       aku: 	    set seen($start) [expr {[llength $path]-1}]
770a9b576a 2007-11-16       aku: 	    # Choose arbitrary predecessor
770a9b576a 2007-11-16       aku: 	    set start [lindex [$dg nodes -in $start] 0]
770a9b576a 2007-11-16       aku: 	}
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	return [struct::list reverse [lrange $path $seen($start) end]]
770a9b576a 2007-11-16       aku:     }
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku:     proc ID {cset} { return "<[$cset id]>" }
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku:     proc BreakCycle {dg cycle} {
770a9b576a 2007-11-16       aku: 	# The cycle we have gotten is broken by breaking apart one or
770a9b576a 2007-11-16       aku: 	# more of the changesets in the cycle. This causes us to
770a9b576a 2007-11-16       aku: 	# create one or more changesets which are to be committed,
770a9b576a 2007-11-16       aku: 	# added to the graph, etc. pp.
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	set cprint [join [struct::list map $cycle [myproc ID]] { }]
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	lappend cycle [lindex $cycle 0] [lindex $cycle 1]
770a9b576a 2007-11-16       aku: 	set bestlink {}
770a9b576a 2007-11-16       aku: 	set bestnode {}
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	foreach \
770a9b576a 2007-11-16       aku: 	    prev [lrange $cycle 0 end-2] \
770a9b576a 2007-11-16       aku: 	    cset [lrange $cycle 1 end-1] \
770a9b576a 2007-11-16       aku: 	    next [lrange $cycle 2 end] {
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 		# Each triple PREV -> CSET -> NEXT of changesets, a
770a9b576a 2007-11-16       aku: 		# 'link' in the cycle, is analysed and the best
770a9b576a 2007-11-16       aku: 		# location where to at least weaken the cycle is
770a9b576a 2007-11-16       aku: 		# chosen for further processing.
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 		set link [project::revlink %AUTO% $prev $cset $next]
770a9b576a 2007-11-16       aku: 		if {$bestlink eq ""} {
770a9b576a 2007-11-16       aku: 		    set bestlink $link
770a9b576a 2007-11-16       aku: 		    set bestnode $cset
770a9b576a 2007-11-16       aku: 		} elseif {[$link betterthan $bestlink]} {
770a9b576a 2007-11-16       aku: 		    $bestlink destroy
770a9b576a 2007-11-16       aku: 		    set bestlink $link
770a9b576a 2007-11-16       aku: 		    set bestnode $cset
770a9b576a 2007-11-16       aku: 		} else {
770a9b576a 2007-11-16       aku: 		    $link destroy
770a9b576a 2007-11-16       aku: 		}
770a9b576a 2007-11-16       aku: 	    }
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	log write 5 breakrcycle "Breaking cycle ($cprint) by splitting changeset <[$bestnode id]>"
7f15be9078 2007-11-20       aku: 	set ID [$bestnode id]
7f15be9078 2007-11-20       aku: 	Mark $dg -${ID}-before
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	set newcsets [$bestlink break]
770a9b576a 2007-11-16       aku: 	$bestlink destroy
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku:         # At this point the old changeset (BESTNODE) is gone
770a9b576a 2007-11-16       aku:         # already. We remove it from the graph as well and then enter
770a9b576a 2007-11-16       aku:         # the fragments generated for it.
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku: 	# NOTE. We have to get the list of incoming neighbours and
7f15be9078 2007-11-20       aku: 	# recompute their successors after the new nodes have been
7f15be9078 2007-11-20       aku: 	# inserted. Their outgoing arcs will now go to one or both of
7f15be9078 2007-11-20       aku: 	# the new nodes, and not redoing them may cause us to forget
7f15be9078 2007-11-20       aku: 	# circles, leaving them in, unbroken.
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku: 	set pre [$dg nodes -in $bestnode]
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku:         $dg node delete $bestnode
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	foreach cset $newcsets {
770a9b576a 2007-11-16       aku: 	    $dg node insert $cset
770a9b576a 2007-11-16       aku: 	    $dg node set    $cset timerange [$cset timerange]
770a9b576a 2007-11-16       aku: 	}
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: 	foreach cset $newcsets {
770a9b576a 2007-11-16       aku: 	    foreach succ [$cset successors] {
770a9b576a 2007-11-16       aku: 		# The new changesets may have dependencies outside of
770a9b576a 2007-11-16       aku: 		# the chosen set. These are ignored
770a9b576a 2007-11-16       aku: 		if {![$dg node exists $succ]} continue
770a9b576a 2007-11-16       aku: 		$dg arc insert $cset $succ
770a9b576a 2007-11-16       aku: 	    }
770a9b576a 2007-11-16       aku: 	}
7f15be9078 2007-11-20       aku: 	foreach cset $pre {
7f15be9078 2007-11-20       aku: 	    foreach succ [$cset successors] {
7f15be9078 2007-11-20       aku: 		# Note that the arc may already exist in the graph. If
7f15be9078 2007-11-20       aku: 		# so ignore it. The new changesets may have
7f15be9078 2007-11-20       aku: 		# dependencies outside of the chosen set. These are
7f15be9078 2007-11-20       aku: 		# ignored
7f15be9078 2007-11-20       aku: 		if {![$dg node exists $succ]} continue
7f15be9078 2007-11-20       aku: 		if {[HasArc $dg $cset $succ]} continue;# TODO should be graph method.
7f15be9078 2007-11-20       aku: 		$dg arc insert $cset $succ
7f15be9078 2007-11-20       aku: 	    }
7f15be9078 2007-11-20       aku: 	}
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku: 	Mark $dg -${ID}-after
7f15be9078 2007-11-20       aku: 	return
7f15be9078 2007-11-20       aku:     }
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku:     # TODO: This should be a graph method.
7f15be9078 2007-11-20       aku:     proc HasArc {dg a b} {
7f15be9078 2007-11-20       aku: 	#8.5: return [expr {$b in [$dg nodes -out $a]}]
7f15be9078 2007-11-20       aku: 	if {[lsearch -exact [$dg nodes -out $a] $b] < 0} { return 0 }
7f15be9078 2007-11-20       aku: 	return 1
7f15be9078 2007-11-20       aku:     }
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku:     proc Mark {dg {suffix {}}} {
7f15be9078 2007-11-20       aku: 	::variable mydotdestination
7f15be9078 2007-11-20       aku: 	if {$mydotdestination eq ""} return
7f15be9078 2007-11-20       aku: 	::variable mydotprefix
7f15be9078 2007-11-20       aku: 	::variable mydotid
7f15be9078 2007-11-20       aku: 	set fname $mydotdestination/${mydotprefix}${mydotid}${suffix}.dot
7f15be9078 2007-11-20       aku: 	file mkdir [file dirname $fname]
7f15be9078 2007-11-20       aku: 	dot write $dg $mydotprefix$suffix $fname
7f15be9078 2007-11-20       aku: 	incr mydotid
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku: 	log write 5 cyclebreaker ".dot export $fname"
770a9b576a 2007-11-16       aku: 	return
770a9b576a 2007-11-16       aku:     }
770a9b576a 2007-11-16       aku: 
7f15be9078 2007-11-20       aku:     typevariable myat         0 ; # Counter for commit ids for the changesets.
7f15be9078 2007-11-20       aku:     typevariable mybottom    {} ; # List of candidate nodes for committing.
7f15be9078 2007-11-20       aku:     typevariable mysave      {} ; # The command to call for each processed node
7f15be9078 2007-11-20       aku: 
7f15be9078 2007-11-20       aku:     typevariable mydotdestination {} ; # Destination directory for .dot files.
7f15be9078 2007-11-20       aku:     typevariable mydotprefix {} ; # Prefix for dot files when exporting the graphs.
7f15be9078 2007-11-20       aku:     typevariable mydotid      0 ; # Counter for dot file name generation.
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku:     # # ## ### ##### ######## #############
770a9b576a 2007-11-16       aku:     ## Configuration
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku:     pragma -hasinstances   no ; # singleton
770a9b576a 2007-11-16       aku:     pragma -hastypeinfo    no ; # no introspection
770a9b576a 2007-11-16       aku:     pragma -hastypedestroy no ; # immortal
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku:     # # ## ### ##### ######## #############
770a9b576a 2007-11-16       aku: }
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: namespace eval ::vc::fossil::import::cvs {
770a9b576a 2007-11-16       aku:     namespace export cyclebreaker
770a9b576a 2007-11-16       aku:     namespace eval cyclebreaker {
770a9b576a 2007-11-16       aku: 	namespace eval project {
770a9b576a 2007-11-16       aku: 	    namespace import ::vc::fossil::import::cvs::project::rev
770a9b576a 2007-11-16       aku: 	    namespace import ::vc::fossil::import::cvs::project::revlink
770a9b576a 2007-11-16       aku: 	}
770a9b576a 2007-11-16       aku: 	namespace import ::vc::tools::misc::*
770a9b576a 2007-11-16       aku: 	namespace import ::vc::tools::log
7f15be9078 2007-11-20       aku: 	namespace import ::vc::tools::dot
770a9b576a 2007-11-16       aku: 	log register cyclebreaker
770a9b576a 2007-11-16       aku:     }
770a9b576a 2007-11-16       aku: }
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: # # ## ### ##### ######## ############# #####################
770a9b576a 2007-11-16       aku: ## Ready
770a9b576a 2007-11-16       aku: 
770a9b576a 2007-11-16       aku: package provide vc::fossil::import::cvs::cyclebreaker 1.0
770a9b576a 2007-11-16       aku: return