Eskil

Diff
Login

Differences From Artifact [83a78be818]:

To Artifact [b430445242]:


905
906
907
908
909
910
911
912




913


914
915

916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931

932
933
934
935
936
937
938
905
906
907
908
909
910
911

912
913
914
915
916
917
918
919

920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935

936
937
938
939
940
941
942
943







-
+
+
+
+

+
+

-
+















-
+







    set rightName ""
    set leftName ""
    while {[gets $ch line] != -1} {
        if {[string match <<<<<<* $line]} {
            set state right
            regexp {<*\s*(.*)} $line -> rightName
            set start2 $rightLine
        } elseif {[string match ======* $line] && $state eq "right"} {
        } elseif {[string match ======* $line] && $state in "right ancestor"} {
            if {$state eq "right"} {
                set end2 [expr {$rightLine - 1}]
            }
            set state left
            set start1 $leftLine
        } elseif {[string match ||||||* $line] && $state eq "right"} {
            set end2 [expr {$rightLine - 1}]
            set start1 $leftLine
            set state ancestor
        } elseif {[string match >>>>>>* $line] && $state eq "left"} {
            set state both
            regexp {>*\s*(.*)} $line -> leftName
            set end1 [expr {$leftLine - 1}]
            lappend ::eskil($top,conflictDiff) [list \
                    $start1 [expr {$end1 - $start1 + 1}] \
                    $start2 [expr {$end2 - $start2 + 1}]]
        } elseif {$state eq "both"} {
            puts $ch1 $line
            puts $ch2 $line
            incr leftLine
            incr rightLine
        } elseif {$state eq "left"} {
            puts $ch1 $line
            incr leftLine
        } else {
        } elseif {$state eq "right"} {
            puts $ch2 $line
            incr rightLine
        }
    }
    close $ch
    close $ch1
    close $ch2