Eskil

Check-in [1b678887d0]
Login

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

Overview
Comment:Added -gz flag to compare compressed files.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 1b678887d0fbafa3d7fd674737868097dd298c9b
User & Date: peter 2017-01-12 00:04:02.293
Context
2017-01-24
23:32
Restuctured some table code check-in: cad398ea05 user: peter tags: trunk
2017-01-12
00:04
Added -gz flag to compare compressed files. check-in: 1b678887d0 user: peter tags: trunk
2016-09-04
21:37
Preserve line endings when saving during Edit Mode. check-in: c9caad7929 user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to Changes.



1
2
3
4
5
6
7



2016-09-04
 Preserve line endings when saving during Edit Mode.

2016-08-30
 Bumped revision to 2.7.3

2016-08-21
>
>
>







1
2
3
4
5
6
7
8
9
10
2017-01-12
 Added -gz flag to compare compressed files.

2016-09-04
 Preserve line endings when saving during Edit Mode.

2016-08-30
 Bumped revision to 2.7.3

2016-08-21
Changes to doc/cmdline.txt.
19
20
21
22
23
24
25

26
27
28
29
30
31
32
  -patch      : View patch file.
  -           : Read patch file from standard input, to allow pipes.
  -review     : View revision control tree as a patch.
  -context <n>: Show only differences, with <n> lines of context.
  -foreach    : Open one diff window per file listed.
  -close      : Close windows with no changes.
  -sep <c>    : See char <c> as separator between columns in files.


  -noparse    : Eskil can perform analysis of changed blocks to
  -line       : improve display. See online help for details.
  -smallblock : The default. Do block analysis on small blocks.
  -block      : Full block analysis. This can be slow if there
                are large change blocks.








>







19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
  -patch      : View patch file.
  -           : Read patch file from standard input, to allow pipes.
  -review     : View revision control tree as a patch.
  -context <n>: Show only differences, with <n> lines of context.
  -foreach    : Open one diff window per file listed.
  -close      : Close windows with no changes.
  -sep <c>    : See char <c> as separator between columns in files.
  -gz         : Uncompress files.

  -noparse    : Eskil can perform analysis of changed blocks to
  -line       : improve display. See online help for details.
  -smallblock : The default. Do block analysis on small blocks.
  -block      : Full block analysis. This can be slow if there
                are large change blocks.

Changes to src/eskil.tcl.
1280
1281
1282
1283
1284
1285
1286



1287
1288
1289
1290
1291
1292
1293
    detectLineEnd $top $::eskil($top,leftFile)  lefttranslation
    # Prepare Separator
    set ::eskil($top,separator) \
            [subst -nocommands -novariables $::eskil($top,separatorview)]
    # Autodetect separator before any plugin processing
    if {$::eskil($top,view) eq "table" && $::eskil($top,separator) eq ""} {
        set ch1 [open $::eskil($top,leftFile)]



        gets $ch1 line1
        close $ch1
        # Any tab, comma or semicolon?
        if {[regsub -all "\t" $line1 "\t" _] >= 2} {
            set ::eskil($top,separator) "\t"
            set ::eskil($top,separatorview) "\\t"
        } elseif {[regsub -all "," $line1 "," _] >= 2} {







>
>
>







1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
    detectLineEnd $top $::eskil($top,leftFile)  lefttranslation
    # Prepare Separator
    set ::eskil($top,separator) \
            [subst -nocommands -novariables $::eskil($top,separatorview)]
    # Autodetect separator before any plugin processing
    if {$::eskil($top,view) eq "table" && $::eskil($top,separator) eq ""} {
        set ch1 [open $::eskil($top,leftFile)]
        if {$::eskil($top,gz)} {
            zlib push gunzip $ch1
        }
        gets $ch1 line1
        close $ch1
        # Any tab, comma or semicolon?
        if {[regsub -all "\t" $line1 "\t" _] >= 2} {
            set ::eskil($top,separator) "\t"
            set ::eskil($top,separatorview) "\\t"
        } elseif {[regsub -all "," $line1 "," _] >= 2} {
1446
1447
1448
1449
1450
1451
1452

1453
1454
1455
1456
1457
1458
1459
    wm title $top "Eskil: [TitleTail $top]"

    # Run diff and parse the result.
    set opts $::Pref(ignore)
    if {$::Pref(nocase)} {lappend opts -nocase}
    if {$::Pref(noempty)} {lappend opts -noempty}
    if {$::Pref(pivot) > 0} {lappend opts -pivot $::Pref(pivot)}

    if {[info exists ::eskil($top,aligns)] && \
            [llength $::eskil($top,aligns)] > 0} {
        lappend opts -align $::eskil($top,aligns)
    }
    set range {}
    if {[info exists ::eskil($top,range)] && \
            [llength $::eskil($top,range)] == 4} {







>







1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
    wm title $top "Eskil: [TitleTail $top]"

    # Run diff and parse the result.
    set opts $::Pref(ignore)
    if {$::Pref(nocase)} {lappend opts -nocase}
    if {$::Pref(noempty)} {lappend opts -noempty}
    if {$::Pref(pivot) > 0} {lappend opts -pivot $::Pref(pivot)}
    if {$::eskil($top,gz)} {lappend opts -gz}
    if {[info exists ::eskil($top,aligns)] && \
            [llength $::eskil($top,aligns)] > 0} {
        lappend opts -align $::eskil($top,aligns)
    }
    set range {}
    if {[info exists ::eskil($top,range)] && \
            [llength $::eskil($top,range)] == 4} {
1514
1515
1516
1517
1518
1519
1520





1521
1522
1523
1524
1525
1526
1527
        collectAncestorInfo $top $dFile1 $dFile2 $opts
    }

    set firstview 1

    set ch1 [open $::eskil($top,leftFile)]
    set ch2 [open $::eskil($top,rightFile)]





    set doingLine1 1
    set doingLine2 1

    if {$::eskil($top,view) eq "table"} {
        # Look for table header line
        set i [lindex $diffres 0]
        lassign $i line1 n1 line2 n2







>
>
>
>
>







1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
        collectAncestorInfo $top $dFile1 $dFile2 $opts
    }

    set firstview 1

    set ch1 [open $::eskil($top,leftFile)]
    set ch2 [open $::eskil($top,rightFile)]
    if {$::eskil($top,gz)} {
        disallowEdit $top
        zlib push gunzip $ch1
        zlib push gunzip $ch2
    }
    set doingLine1 1
    set doingLine2 1

    if {$::eskil($top,view) eq "table"} {
        # Look for table header line
        set i [lindex $diffres 0]
        lassign $i line1 n1 line2 n2
2911
2912
2913
2914
2915
2916
2917

2918
2919
2920
2921
2922
2923
2924
    set ::eskil($top,printFile) ""
    set ::eskil($top,mergeFile) ""
    set ::eskil($top,ancestorFile) ""
    set ::eskil($top,separator) ""
    set ::eskil($top,separatorview) ""
    set ::eskil($top,conflictFile) ""
    set ::eskil($top,limitlines) 0

    set ::eskil($top,maxwidth) 0
    set ::eskil($top,plugin) ""

    # Copy the collected options from command line
    foreach {item val} $::eskil(defaultopts) {
        set ::eskil($top,$item) $val
    }







>







2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
    set ::eskil($top,printFile) ""
    set ::eskil($top,mergeFile) ""
    set ::eskil($top,ancestorFile) ""
    set ::eskil($top,separator) ""
    set ::eskil($top,separatorview) ""
    set ::eskil($top,conflictFile) ""
    set ::eskil($top,limitlines) 0
    set ::eskil($top,gz) 0
    set ::eskil($top,maxwidth) 0
    set ::eskil($top,plugin) ""

    # Copy the collected options from command line
    foreach {item val} $::eskil(defaultopts) {
        set ::eskil($top,$item) $val
    }
Changes to src/startup.tcl.
706
707
708
709
710
711
712


713
714
715
716
717
718
719
    addMultOpt -preprocessright
    docFlag    -preprocess  "TBW <pair>"
    docFlag    -preprocessleft  "TBW <pair>"
    docFlag    -preprocessright "TBW <pair>"
    # These affect opts
    addOptsOpt -limit    limitlines
    docFlag    -limit "Do not process more than <lines> lines"


    addOptsOpt -maxwidth maxwidth
    docFlag    -maxwidth "Limit column width in table mode"
    addOptsOpt -o mergeFile 
    docFlag    -o "Specify merge result output file"
    addFilter  -o [list file join [pwd]]
    addOptsOpt -a ancestorFile
    docFlag    -a "Give ancestor file for three way merge"







>
>







706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
    addMultOpt -preprocessright
    docFlag    -preprocess  "TBW <pair>"
    docFlag    -preprocessleft  "TBW <pair>"
    docFlag    -preprocessright "TBW <pair>"
    # These affect opts
    addOptsOpt -limit    limitlines
    docFlag    -limit "Do not process more than <lines> lines"
    addOptsFlag -gz   gz
    docFlag    -gz    "Uncompress input files with gunzip"
    addOptsOpt -maxwidth maxwidth
    docFlag    -maxwidth "Limit column width in table mode"
    addOptsOpt -o mergeFile 
    docFlag    -o "Specify merge result output file"
    addFilter  -o [list file join [pwd]]
    addOptsOpt -a ancestorFile
    docFlag    -a "Give ancestor file for three way merge"