Fossil SCM
Changesets, extended human readable representation, and tweaking of log output.
Commit
911d56a8c8b9bac7f22ba3baacf3125d00e53f4c
Parent
2e07cd71649eebb…
1 file changed
+19
-3
+19
-3
| --- tools/cvs2fossil/lib/c2f_prev.tcl | ||
| +++ tools/cvs2fossil/lib/c2f_prev.tcl | ||
| @@ -50,11 +50,26 @@ | ||
| 50 | 50 | set myidmap($myid) $self |
| 51 | 51 | foreach r $revisions { lappend myrevmap($r) $self } |
| 52 | 52 | return |
| 53 | 53 | } |
| 54 | 54 | |
| 55 | - method str {} { return "<$mytype ${myid}>" } | |
| 55 | + method str {} { | |
| 56 | + set str "<" | |
| 57 | + set detail "" | |
| 58 | + if {$mytype eq "sym"} { | |
| 59 | + struct::list assign [state run { | |
| 60 | + SELECT T.name, S.name | |
| 61 | + FROM symtype T, symbol S | |
| 62 | + WHERE S.sid = $mysrcid | |
| 63 | + AND T.tid = S.type | |
| 64 | + }] stype detail | |
| 65 | + append str $stype " " | |
| 66 | + set detail " '$detail'" | |
| 67 | + } | |
| 68 | + append str "$mytype ${myid}${detail}>" | |
| 69 | + return $str | |
| 70 | + } | |
| 56 | 71 | |
| 57 | 72 | method id {} { return $myid } |
| 58 | 73 | method revisions {} { return $myrevisions } |
| 59 | 74 | method data {} { return [list $myproject $mytype $mysrcid] } |
| 60 | 75 | |
| @@ -63,10 +78,11 @@ | ||
| 63 | 78 | |
| 64 | 79 | method setpos {p} { set mypos $p ; return } |
| 65 | 80 | method pos {} { return $mypos } |
| 66 | 81 | |
| 67 | 82 | method isbranch {} { |
| 83 | + error NOT-USED | |
| 68 | 84 | return [expr {($mytype eq "sym") && |
| 69 | 85 | ($mybranchcode == [state one { |
| 70 | 86 | SELECT type FROM symbol WHERE sid = $mysrcid |
| 71 | 87 | }])}] |
| 72 | 88 | } |
| @@ -157,11 +173,11 @@ | ||
| 157 | 173 | |
| 158 | 174 | array set dependencies {} |
| 159 | 175 | PullInternalSuccessorRevisions dependencies $myrevisions |
| 160 | 176 | if {![array size dependencies]} {return 0} ; # Nothing to break. |
| 161 | 177 | |
| 162 | - log write 6 csets ...[$self str]....................................................... | |
| 178 | + log write 5 csets ...[$self str]....................................................... | |
| 163 | 179 | |
| 164 | 180 | # We have internal dependencies to break. We now iterate over |
| 165 | 181 | # all positions in the list (which is chronological, at least |
| 166 | 182 | # as far as the timestamps are correct and unique) and |
| 167 | 183 | # determine the best position for the break, by trying to |
| @@ -773,11 +789,11 @@ | ||
| 773 | 789 | unset depc($dep) |
| 774 | 790 | |
| 775 | 791 | if {!$six} continue |
| 776 | 792 | |
| 777 | 793 | struct::list assign $dep parent child |
| 778 | - log write 6 csets "Broke dependency [PD $parent] --> [PD $child]" | |
| 794 | + log write 5 csets "Broke dependency [PD $parent] --> [PD $child]" | |
| 779 | 795 | } |
| 780 | 796 | |
| 781 | 797 | return |
| 782 | 798 | } |
| 783 | 799 | |
| 784 | 800 |
| --- tools/cvs2fossil/lib/c2f_prev.tcl | |
| +++ tools/cvs2fossil/lib/c2f_prev.tcl | |
| @@ -50,11 +50,26 @@ | |
| 50 | set myidmap($myid) $self |
| 51 | foreach r $revisions { lappend myrevmap($r) $self } |
| 52 | return |
| 53 | } |
| 54 | |
| 55 | method str {} { return "<$mytype ${myid}>" } |
| 56 | |
| 57 | method id {} { return $myid } |
| 58 | method revisions {} { return $myrevisions } |
| 59 | method data {} { return [list $myproject $mytype $mysrcid] } |
| 60 | |
| @@ -63,10 +78,11 @@ | |
| 63 | |
| 64 | method setpos {p} { set mypos $p ; return } |
| 65 | method pos {} { return $mypos } |
| 66 | |
| 67 | method isbranch {} { |
| 68 | return [expr {($mytype eq "sym") && |
| 69 | ($mybranchcode == [state one { |
| 70 | SELECT type FROM symbol WHERE sid = $mysrcid |
| 71 | }])}] |
| 72 | } |
| @@ -157,11 +173,11 @@ | |
| 157 | |
| 158 | array set dependencies {} |
| 159 | PullInternalSuccessorRevisions dependencies $myrevisions |
| 160 | if {![array size dependencies]} {return 0} ; # Nothing to break. |
| 161 | |
| 162 | log write 6 csets ...[$self str]....................................................... |
| 163 | |
| 164 | # We have internal dependencies to break. We now iterate over |
| 165 | # all positions in the list (which is chronological, at least |
| 166 | # as far as the timestamps are correct and unique) and |
| 167 | # determine the best position for the break, by trying to |
| @@ -773,11 +789,11 @@ | |
| 773 | unset depc($dep) |
| 774 | |
| 775 | if {!$six} continue |
| 776 | |
| 777 | struct::list assign $dep parent child |
| 778 | log write 6 csets "Broke dependency [PD $parent] --> [PD $child]" |
| 779 | } |
| 780 | |
| 781 | return |
| 782 | } |
| 783 | |
| 784 |
| --- tools/cvs2fossil/lib/c2f_prev.tcl | |
| +++ tools/cvs2fossil/lib/c2f_prev.tcl | |
| @@ -50,11 +50,26 @@ | |
| 50 | set myidmap($myid) $self |
| 51 | foreach r $revisions { lappend myrevmap($r) $self } |
| 52 | return |
| 53 | } |
| 54 | |
| 55 | method str {} { |
| 56 | set str "<" |
| 57 | set detail "" |
| 58 | if {$mytype eq "sym"} { |
| 59 | struct::list assign [state run { |
| 60 | SELECT T.name, S.name |
| 61 | FROM symtype T, symbol S |
| 62 | WHERE S.sid = $mysrcid |
| 63 | AND T.tid = S.type |
| 64 | }] stype detail |
| 65 | append str $stype " " |
| 66 | set detail " '$detail'" |
| 67 | } |
| 68 | append str "$mytype ${myid}${detail}>" |
| 69 | return $str |
| 70 | } |
| 71 | |
| 72 | method id {} { return $myid } |
| 73 | method revisions {} { return $myrevisions } |
| 74 | method data {} { return [list $myproject $mytype $mysrcid] } |
| 75 | |
| @@ -63,10 +78,11 @@ | |
| 78 | |
| 79 | method setpos {p} { set mypos $p ; return } |
| 80 | method pos {} { return $mypos } |
| 81 | |
| 82 | method isbranch {} { |
| 83 | error NOT-USED |
| 84 | return [expr {($mytype eq "sym") && |
| 85 | ($mybranchcode == [state one { |
| 86 | SELECT type FROM symbol WHERE sid = $mysrcid |
| 87 | }])}] |
| 88 | } |
| @@ -157,11 +173,11 @@ | |
| 173 | |
| 174 | array set dependencies {} |
| 175 | PullInternalSuccessorRevisions dependencies $myrevisions |
| 176 | if {![array size dependencies]} {return 0} ; # Nothing to break. |
| 177 | |
| 178 | log write 5 csets ...[$self str]....................................................... |
| 179 | |
| 180 | # We have internal dependencies to break. We now iterate over |
| 181 | # all positions in the list (which is chronological, at least |
| 182 | # as far as the timestamps are correct and unique) and |
| 183 | # determine the best position for the break, by trying to |
| @@ -773,11 +789,11 @@ | |
| 789 | unset depc($dep) |
| 790 | |
| 791 | if {!$six} continue |
| 792 | |
| 793 | struct::list assign $dep parent child |
| 794 | log write 5 csets "Broke dependency [PD $parent] --> [PD $child]" |
| 795 | } |
| 796 | |
| 797 | return |
| 798 | } |
| 799 | |
| 800 |