Fossil SCM

Helper updated to changes in state definition.

aku 2007-12-01 18:35 trunk
Commit 5bbc7d4c57e5622513fe937ae50bc028eae7b21b
--- tools/cvs2fossil/filerevtree
+++ tools/cvs2fossil/filerevtree
@@ -134,21 +134,22 @@
134134
if {[llength $cs]} {
135135
foreach {cs ord cstype} $cs {
136136
append label "\\nCS/${cstype}($cs) @$ord"
137137
}
138138
}
139
- dg node insert $rid
140
- dg node set $rid label $label
141
- dg node set $rid shape [expr {$isdefault ? "diamond" : "box"}]
139
+ set key [list rev $rid]
140
+ dg node insert $key
141
+ dg node set $key label $label
142
+ dg node set $key shape [expr {$isdefault ? "diamond" : "box"}]
142143
}
143144
144145
# Go through the revisions a second time and set up the arcs based on
145146
# the stored successor information.
146147
147
-::vc::fossil::import::cvs::project::rev::PullSuccessorRevisions dep [array names rev]
148
+::vc::fossil::import::cvs::project::rev::rev successors dep [array names rev]
148149
149
-proc Ord {cmd rid} {
150
+proc Ord {cmd rid} {return 0
150151
global rev
151152
set ords {}
152153
foreach {cs ord cstype} [lindex $rev($rid) 4] { lappend ords $ord }
153154
return [$cmd $ords]
154155
}
@@ -155,11 +156,13 @@
155156
156157
foreach {rid children} [array get dep] {
157158
set max [Ord max $rid]
158159
159160
foreach child $children {
160
- set a [dg arc insert $rid $child]
161
+ if {[catch {
162
+ set a [dg arc insert $rid $child]
163
+ }]} continue
161164
162165
if {$max > [Ord min $child]} {
163166
puts "Backward : $rid -> $child"
164167
dg arc set $a color red
165168
}
166169
--- tools/cvs2fossil/filerevtree
+++ tools/cvs2fossil/filerevtree
@@ -134,21 +134,22 @@
134 if {[llength $cs]} {
135 foreach {cs ord cstype} $cs {
136 append label "\\nCS/${cstype}($cs) @$ord"
137 }
138 }
139 dg node insert $rid
140 dg node set $rid label $label
141 dg node set $rid shape [expr {$isdefault ? "diamond" : "box"}]
 
142 }
143
144 # Go through the revisions a second time and set up the arcs based on
145 # the stored successor information.
146
147 ::vc::fossil::import::cvs::project::rev::PullSuccessorRevisions dep [array names rev]
148
149 proc Ord {cmd rid} {
150 global rev
151 set ords {}
152 foreach {cs ord cstype} [lindex $rev($rid) 4] { lappend ords $ord }
153 return [$cmd $ords]
154 }
@@ -155,11 +156,13 @@
155
156 foreach {rid children} [array get dep] {
157 set max [Ord max $rid]
158
159 foreach child $children {
160 set a [dg arc insert $rid $child]
 
 
161
162 if {$max > [Ord min $child]} {
163 puts "Backward : $rid -> $child"
164 dg arc set $a color red
165 }
166
--- tools/cvs2fossil/filerevtree
+++ tools/cvs2fossil/filerevtree
@@ -134,21 +134,22 @@
134 if {[llength $cs]} {
135 foreach {cs ord cstype} $cs {
136 append label "\\nCS/${cstype}($cs) @$ord"
137 }
138 }
139 set key [list rev $rid]
140 dg node insert $key
141 dg node set $key label $label
142 dg node set $key shape [expr {$isdefault ? "diamond" : "box"}]
143 }
144
145 # Go through the revisions a second time and set up the arcs based on
146 # the stored successor information.
147
148 ::vc::fossil::import::cvs::project::rev::rev successors dep [array names rev]
149
150 proc Ord {cmd rid} {return 0
151 global rev
152 set ords {}
153 foreach {cs ord cstype} [lindex $rev($rid) 4] { lappend ords $ord }
154 return [$cmd $ords]
155 }
@@ -155,11 +156,13 @@
156
157 foreach {rid children} [array get dep] {
158 set max [Ord max $rid]
159
160 foreach child $children {
161 if {[catch {
162 set a [dg arc insert $rid $child]
163 }]} continue
164
165 if {$max > [Ord min $child]} {
166 puts "Backward : $rid -> $child"
167 dg arc set $a color red
168 }
169

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button