Eskil

Check-in [118eb090c6]
Login

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

Overview
Comment:More merge conflict cases handled
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 118eb090c67167413f323d2b065f4b8d3c9b3f06
User & Date: peter.spjuth@gmail.com 2011-04-30 01:10:17.000
Context
2011-04-30
01:14
Updated date and version check-in: b1a5dffb2b user: peter.spjuth@gmail.com tags: trunk
01:10
More merge conflict cases handled check-in: 118eb090c6 user: peter.spjuth@gmail.com tags: trunk
2011-04-29
23:53
Improved three-way merge check-in: 2f126fd631 user: peter.spjuth@gmail.com tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/eskil.tcl.
481
482
483
484
485
486
487


































488
489
490
491
492
493
494
    }

    set apa [compareBlocks $block1 $block2]
    # Fine grained changes means that each line is considered its own
    # chunk. This is used for merging better to avoid the same decision
    # for an entire block.
    set finegrain [expr {$::Pref(finegrainchunks) && $details}]



































    set t1 0
    set t2 0
    foreach c $apa {
        if {$c eq "c"} {
            set textline1 [lindex $block1 $t1]
            set textline2 [lindex $block2 $t2]







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
    }

    set apa [compareBlocks $block1 $block2]
    # Fine grained changes means that each line is considered its own
    # chunk. This is used for merging better to avoid the same decision
    # for an entire block.
    set finegrain [expr {$::Pref(finegrainchunks) && $details}]

    if {$finegrain && $::diff($top,ancestorFile) ne ""} {
        # Avoid fine grain depending on relation to ancestor
        set leftChange 0
        set leftChangeOrAdd 0
        for {set t $line1} {$t < $line1 + $n1} {incr t} {
            if {[info exists ::diff($top,ancestorLeft,$t)]} {
                set leftChangeOrAdd 1
                if {$::diff($top,ancestorLeft,$t) eq "c"} {
                    set leftChange 1
                    break
                }
            }
        }
        set rightChange 0
        set rightChangeOrAdd 0
        for {set t $line2} {$t < $line2 + $n2} {incr t} {
            if {[info exists ::diff($top,ancestorRight,$t)]} {
                set rightChangeOrAdd 1
                if {$::diff($top,ancestorRight,$t) eq "c"} {
                    set rightChange 1
                    break
                }
            }
        }
        # Avoid fine grain if either side has no changes against ancestor
        if {!$leftChangeOrAdd || !$rightChangeOrAdd} {
            set finegrain 0
        }
        # Avoid fine grain if both sides have at most additions
        if {!$leftChange && !$rightChange} {
            set finegrain 0
        }
    }

    set t1 0
    set t2 0
    foreach c $apa {
        if {$c eq "c"} {
            set textline1 [lindex $block1 $t1]
            set textline2 [lindex $block2 $t2]
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
        # Get one update when the screen has been filled.
        # Show the first diff.
        if {$firstview && $::diff($top,mapMax) > 100} {
            set firstview 0
            showDiff $top 0
            update idletasks
        }
        if {0 && [incr t] >= 10} {
	    update idletasks
	    $::widgets($top,wLine2) see end
	    update idletasks
            set t 0
        }
    }

    # If there is a range, just display the range
    if {[llength $range] != 0} {
        lassign $range start1 end1 start2 end2
    } else {
        set end1 0







<
<
<
<
<
<







1399
1400
1401
1402
1403
1404
1405






1406
1407
1408
1409
1410
1411
1412
        # Get one update when the screen has been filled.
        # Show the first diff.
        if {$firstview && $::diff($top,mapMax) > 100} {
            set firstview 0
            showDiff $top 0
            update idletasks
        }






    }

    # If there is a range, just display the range
    if {[llength $range] != 0} {
        lassign $range start1 end1 start2 end2
    } else {
        set end1 0
3721
3722
3723
3724
3725
3726
3727


3728
3729
3730
3731
3732
3733
3734
                package require Tk
                tk appname Eskil
            }
        } elseif {$arg eq "-o"} {
            set nextArg mergeFile
        } elseif {$arg eq "-a"} {
            set nextArg ancestorFile


        } elseif {$arg eq "-fine"} {
            set Pref(finegrainchunks) 1
        } elseif {$arg eq "-r"} {
            set nextArg revision
        } elseif {$arg eq "-debug"} {
            set ::eskil(debug) 1
        } elseif {$arg eq "-svn"} {







>
>







3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
                package require Tk
                tk appname Eskil
            }
        } elseif {$arg eq "-o"} {
            set nextArg mergeFile
        } elseif {$arg eq "-a"} {
            set nextArg ancestorFile
            # Default is no ignore on three-way merge
            set Pref(ignore) " "
        } elseif {$arg eq "-fine"} {
            set Pref(finegrainchunks) 1
        } elseif {$arg eq "-r"} {
            set nextArg revision
        } elseif {$arg eq "-debug"} {
            set ::eskil(debug) 1
        } elseif {$arg eq "-svn"} {
Changes to tests/ancestor.txt.
65
66
67
68
69
70
71

72
73
74
75










50
51
52
Added different
53
54
55

56
57
58
59

















>




>
>
>
>
>
>
>
>
>
>
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
50
51
52
Added different
53
54
55
Left mixed change
56
57
58
59
60
Right mixed change
61
62
63
64
65
Both added multiple
66
67
Changes to tests/left.txt.
67
68
69
70
71
72
73
74

75
76
77












51
52
Added different
xxxxx
53
54
55
56

57
58
59



















<
>
|
<

>
>
>
>
>
>
>
>
>
>
>
>
67
68
69
70
71
72
73

74
75

76
77
78
79
80
81
82
83
84
85
86
87
88
51
52
Added different
xxxxx
53
54
55

Left mixed change
57x

59
60
Right mixed change
61
62
63
64
65
Both added multiple
xx1
xx2
66
67
Changes to tests/merge.txt.
67
68
69
70
71
72
73
74

75
76
77













52
Added different
xxxxx
yyyyy
53
54
55
56

57
58
59




















<
>
|
<

>
>
>
>
>
>
>
>
>
>
>
>
>
67
68
69
70
71
72
73

74
75

76
77
78
79
80
81
82
83
84
85
86
87
88
89
52
Added different
xxxxx
yyyyy
53
54
55

Left mixed change
57x

59
60
Right mixed change
61x
63x
64
65
Both added multiple
xx1
xx2
yy1
yy2
66
67
Changes to tests/right.txt.
64
65
66
67
68
69
70

71
72
73
74











Left: change Right: deleted block
52
Added different
yyyyy
53
54
55

56
57
58
59


















>




>
>
>
>
>
>
>
>
>
>
>
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
Left: change Right: deleted block
52
Added different
yyyyy
53
54
55
Left mixed change
56
57
58
59
60
Right mixed change
61x
63x
64
65
Both added multiple
yy1
yy2
66
67