Eskil

Check-in [dba61b718e]
Login

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

Overview
Comment:Allow multiple pairs of files on the command line to open multiple windows.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: dba61b718efbf12f5732bee3970c7684e824c489c94851063c74d65eb8ccf6d2
User & Date: peter 2019-08-28 14:31:14
Context
2019-09-10
20:10
Bugfix when committing in GIT from -review check-in: a7b1530550 user: peter tags: trunk
2019-08-28
14:31
Allow multiple pairs of files on the command line to open multiple windows. check-in: dba61b718e user: peter tags: trunk
2019-08-21
23:00
Regenerated usage check-in: a74aa3b7ee user: peter tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Changes.




1
2
3
4
5
6
7



2019-07-05
 Ctrl-E to enable Edit Mode.
 Do not ask about overwriting in Edit Mode. Hidden preference to turn it on.
 Added -subst command line, to acces PreProcess Subst function.

2019-06-12
 Better SVN commit, when added directories are included.
>
>
>







1
2
3
4
5
6
7
8
9
10
2019-08-28
 Allow multiple pairs of files on the command line to open multiple windows.

2019-07-05
 Ctrl-E to enable Edit Mode.
 Do not ask about overwriting in Edit Mode. Hidden preference to turn it on.
 Added -subst command line, to acces PreProcess Subst function.

2019-06-12
 Better SVN commit, when added directories are included.

Changes to src/startup.tcl.

730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
...
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
....
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
....
1126
1127
1128
1129
1130
1131
1132














1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148

1149
1150
1151
1152
1153
1154
1155
    docFlag -nodiff "Do not run diff after startup"
    addFlags -server -cvs -svn -debug
    docFlag -server "Set up Eskil to be controllable from the outside"
    docFlag -cvs    "Detect CVS first, if multiple version systems are used"
    docFlag -svn    "Detect SVN first, if multiple version systems are used"
    docFlag -debug  "Start in debug mode"
    addFlags -foreach -close
    docFlag -foreach "Open one diff window per file listed"
    docFlag -close   "Close any window with no changes"
    addFlags -nonewline -nonewline+ -nocdiff
    docFlag -nonewline  "Try to ignore newline changes"
    docFlag -nonewline+ "Try to ignore newline changes, and don't display"
    docFlag -nocdiff    "Disable C version of DiffUtil. For debug"
    addFlags -pluginlist
    addMultFlags -pluginallow
................................................................................
    set nocdiff     [optGet -nocdiff]
    set dodir       [optGet -dir]
    set doclip      [optGet -clip]
    set dofourway   [optGet -fourway]
    set dopatch     [optGet -patch]
    set doreview    [optGet -review]
    set autobrowse  [optGet -browse]
    set foreach     [optGet -foreach]
    set preferedRev "GIT"
    if {[optGet -svn]} {
        set preferedRev "SVN"
    } elseif {[optGet -cvs]} {
        set preferedRev "CVS"
    }

................................................................................
        set ::eskil($top,patchFile) ""
        set ::eskil($top,patchData) ""
        set ::eskil($top,reviewFiles) $files
        set ::Pref(toolbar) 1
        after idle [list doDiff $top]
        return $top
    }
    if {$len == 1 || $foreach} {
        set ReturnAfterLoop 0
        set first 1
        foreach file $files {
            if {$first} {
                set first 0
            } else {
                # Create new window for other files
................................................................................
                }
                set ReturnAfterLoop 1
                continue
            }
        }
        if {$ReturnAfterLoop} {return $top}
    } elseif {$len >= 2} {














        set fullname [file join [pwd] [lindex $files 0]]
        set fulldir [file dirname $fullname]
        set ::eskil($top,leftDir) $fulldir
        set ::eskil($top,leftFile) $fullname
        set ::eskil($top,leftLabel) $fullname
        set ::eskil($top,leftOK) 1
        set fullname [file join [pwd] [lindex $files 1]]
        set fulldir [file dirname $fullname]
        set ::eskil($top,rightDir) $fulldir
        set ::eskil($top,rightFile) $fullname
        set ::eskil($top,rightLabel) $fullname
        set ::eskil($top,rightOK) 1
        if {$noautodiff} {
            enableRedo $top
        } else {
            after idle [list doDiff $top]

        }
    }
    if {$autobrowse && (!$::eskil($top,leftOK) || !$::eskil($top,rightOK))} {
        if {!$::eskil($top,leftOK) && !$::eskil($top,rightOK)} {
            openBoth $top 0
        } elseif {!$::eskil($top,leftOK)} {
            openLeft $top







|







 







|







 







|







 







>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
>







730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
...
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
....
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
....
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
    docFlag -nodiff "Do not run diff after startup"
    addFlags -server -cvs -svn -debug
    docFlag -server "Set up Eskil to be controllable from the outside"
    docFlag -cvs    "Detect CVS first, if multiple version systems are used"
    docFlag -svn    "Detect SVN first, if multiple version systems are used"
    docFlag -debug  "Start in debug mode"
    addFlags -foreach -close
    docFlag -foreach  "Open one diff window per file listed"
    docFlag -close   "Close any window with no changes"
    addFlags -nonewline -nonewline+ -nocdiff
    docFlag -nonewline  "Try to ignore newline changes"
    docFlag -nonewline+ "Try to ignore newline changes, and don't display"
    docFlag -nocdiff    "Disable C version of DiffUtil. For debug"
    addFlags -pluginlist
    addMultFlags -pluginallow
................................................................................
    set nocdiff     [optGet -nocdiff]
    set dodir       [optGet -dir]
    set doclip      [optGet -clip]
    set dofourway   [optGet -fourway]
    set dopatch     [optGet -patch]
    set doreview    [optGet -review]
    set autobrowse  [optGet -browse]
    set foreachOpt  [optGet -foreach]
    set preferedRev "GIT"
    if {[optGet -svn]} {
        set preferedRev "SVN"
    } elseif {[optGet -cvs]} {
        set preferedRev "CVS"
    }

................................................................................
        set ::eskil($top,patchFile) ""
        set ::eskil($top,patchData) ""
        set ::eskil($top,reviewFiles) $files
        set ::Pref(toolbar) 1
        after idle [list doDiff $top]
        return $top
    }
    if {$len == 1 || $foreachOpt} {
        set ReturnAfterLoop 0
        set first 1
        foreach file $files {
            if {$first} {
                set first 0
            } else {
                # Create new window for other files
................................................................................
                }
                set ReturnAfterLoop 1
                continue
            }
        }
        if {$ReturnAfterLoop} {return $top}
    } elseif {$len >= 2} {
        if {$len % 2 != 0} {
            puts "I see $len files. It must an even number."
            exit
        }
        set first 1
        foreach {file1 file2} $files {
            if {$first} {
                set first 0
            } else {
                # Create new window for other files
                set top [makeDiffWin $top]
                update
            }

            set fullname [file join [pwd] $file1]
            set fulldir [file dirname $fullname]
            set ::eskil($top,leftDir) $fulldir
            set ::eskil($top,leftFile) $fullname
            set ::eskil($top,leftLabel) $fullname
            set ::eskil($top,leftOK) 1
            set fullname [file join [pwd] $file2]
            set fulldir [file dirname $fullname]
            set ::eskil($top,rightDir) $fulldir
            set ::eskil($top,rightFile) $fullname
            set ::eskil($top,rightLabel) $fullname
            set ::eskil($top,rightOK) 1
            if {$noautodiff} {
                enableRedo $top
            } else {
                after idle [list doDiff $top]
            }
        }
    }
    if {$autobrowse && (!$::eskil($top,leftOK) || !$::eskil($top,rightOK))} {
        if {!$::eskil($top,leftOK) && !$::eskil($top,rightOK)} {
            openBoth $top 0
        } elseif {!$::eskil($top,leftOK)} {
            openLeft $top