Fossil

Check-in [5bbc7d4c]
Login

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

Overview
Comment:Helper updated to changes in state definition.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:5bbc7d4c57e5622513fe937ae50bc028eae7b21b
User & Date: aku 2007-12-01 18:35:07
Context
2007-12-01
18:36
Bugfix. Handle free-floating branches (their root revision was removed as unnecessary). check-in: 79c227a9 user: aku tags: trunk
18:35
Helper updated to changes in state definition. check-in: 5bbc7d4c user: aku tags: trunk
2007-11-30
15:21
Updated helper app to changed state definition (csrevision -> csitem). check-in: fc635d59 user: aku tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to tools/cvs2fossil/filerevtree.

132
133
134
135
136
137
138

139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159

160

161
162
163
164
165
166
167
    set label  "$rid = <$revnr> @ $lod / [clock format $date]"
    set cs [lindex $rev($rid) 4]
    if {[llength $cs]} {
	foreach {cs ord cstype} $cs {
	    append label "\\nCS/${cstype}($cs) @$ord"
	}
    }

    dg node insert $rid
    dg node set    $rid label $label
    dg node set    $rid shape [expr {$isdefault ? "diamond" : "box"}]
}

# Go through the revisions a second time and set up the arcs based on
# the stored successor information.

::vc::fossil::import::cvs::project::rev::PullSuccessorRevisions dep [array names rev]

proc Ord {cmd rid} {
    global rev
    set ords {}
    foreach {cs ord cstype} [lindex $rev($rid) 4] { lappend ords $ord }
    return [$cmd $ords]
}

foreach {rid children} [array get dep] {
    set max [Ord max $rid]

    foreach child $children {

	set a [dg arc insert $rid $child]


	if {$max > [Ord min $child]} {
	    puts "Backward : $rid -> $child"
	    dg arc set $a color red
	}
    }
}







>
|
|
|





|

|










>
|
>







132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
    set label  "$rid = <$revnr> @ $lod / [clock format $date]"
    set cs [lindex $rev($rid) 4]
    if {[llength $cs]} {
	foreach {cs ord cstype} $cs {
	    append label "\\nCS/${cstype}($cs) @$ord"
	}
    }
    set key [list rev $rid]
    dg node insert $key
    dg node set    $key label $label
    dg node set    $key shape [expr {$isdefault ? "diamond" : "box"}]
}

# Go through the revisions a second time and set up the arcs based on
# the stored successor information.

::vc::fossil::import::cvs::project::rev::rev successors dep [array names rev]

proc Ord {cmd rid} {return 0
    global rev
    set ords {}
    foreach {cs ord cstype} [lindex $rev($rid) 4] { lappend ords $ord }
    return [$cmd $ords]
}

foreach {rid children} [array get dep] {
    set max [Ord max $rid]

    foreach child $children {
	if {[catch {
	    set a [dg arc insert $rid $child]
	}]} continue

	if {$max > [Ord min $child]} {
	    puts "Backward : $rid -> $child"
	    dg arc set $a color red
	}
    }
}