Fossil SCM
Helper updated to changes in state definition.
Commit
5bbc7d4c57e5622513fe937ae50bc028eae7b21b
Parent
fc635d597718b33…
1 file changed
+9
-6
+9
-6
| --- tools/cvs2fossil/filerevtree | ||
| +++ tools/cvs2fossil/filerevtree | ||
| @@ -134,21 +134,22 @@ | ||
| 134 | 134 | if {[llength $cs]} { |
| 135 | 135 | foreach {cs ord cstype} $cs { |
| 136 | 136 | append label "\\nCS/${cstype}($cs) @$ord" |
| 137 | 137 | } |
| 138 | 138 | } |
| 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"}] | |
| 142 | 143 | } |
| 143 | 144 | |
| 144 | 145 | # Go through the revisions a second time and set up the arcs based on |
| 145 | 146 | # the stored successor information. |
| 146 | 147 | |
| 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] | |
| 148 | 149 | |
| 149 | -proc Ord {cmd rid} { | |
| 150 | +proc Ord {cmd rid} {return 0 | |
| 150 | 151 | global rev |
| 151 | 152 | set ords {} |
| 152 | 153 | foreach {cs ord cstype} [lindex $rev($rid) 4] { lappend ords $ord } |
| 153 | 154 | return [$cmd $ords] |
| 154 | 155 | } |
| @@ -155,11 +156,13 @@ | ||
| 155 | 156 | |
| 156 | 157 | foreach {rid children} [array get dep] { |
| 157 | 158 | set max [Ord max $rid] |
| 158 | 159 | |
| 159 | 160 | foreach child $children { |
| 160 | - set a [dg arc insert $rid $child] | |
| 161 | + if {[catch { | |
| 162 | + set a [dg arc insert $rid $child] | |
| 163 | + }]} continue | |
| 161 | 164 | |
| 162 | 165 | if {$max > [Ord min $child]} { |
| 163 | 166 | puts "Backward : $rid -> $child" |
| 164 | 167 | dg arc set $a color red |
| 165 | 168 | } |
| 166 | 169 |
| --- 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 |