493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
|
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
|
-
+
-
-
-
-
-
-
-
|
fillMergeWindow $top
}
# Compare each file against an ancestor file for three-way merge
proc collectAncestorInfo {top dFile1 dFile2 opts} {
if {![info exists ::eskil($top,mergetranslation)]} {
# Try to autodetect line endings in ancestor file
set ch [open $::eskil($top,ancestorFile) rb]
detectLineEnd $top $::eskil($top,ancestorFile) mergetranslation lf
set data [read $ch 10000]
close $ch
if {[string first \r\n $data] >= 0} {
set ::eskil($top,mergetranslation) crlf
} else {
set ::eskil($top,mergetranslation) lf
}
}
array unset ::eskil $top,ancestorLeft,*
array unset ::eskil $top,ancestorRight,*
set differrA1 [catch {DiffUtil::diffFiles {*}$opts \
$::eskil($top,ancestorFile) $dFile1} diffresA1]
set differrA2 [catch {DiffUtil::diffFiles {*}$opts \
$::eskil($top,ancestorFile) $dFile2} diffresA2]
|