Eskil

Check-in [7db6e08937]
Login

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

Overview
Comment:Removed Virtual File System handling since DiffUtil handles it.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: 7db6e08937ab636da283b16141f36d90766484dc
User & Date: peter 2004-06-16 15:29:46.000
Context
2004-06-16
17:28
Removed 2nd stage from doc since it is always on now. check-in: e9f162658c user: peter tags: trunk
15:29
Removed Virtual File System handling since DiffUtil handles it. check-in: 7db6e08937 user: peter tags: trunk
2004-05-26
10:41
Release 2.0.3. check-in: 65cfc5ad29 user: peter tags: trunk
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/eskil.tcl.
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
    # Add a dummy if it does not exist.
    proc addBalloon {args} {}
} else {
    namespace import -force psballoon::addBalloon
}

set debug 0
set diffver "Version 2.0.3 2004-05-26"
set thisScript [file join [pwd] [info script]]
set thisDir [file dirname $thisScript]

# Follow any link
set tmplink $thisScript
while {[file type $tmplink] eq "link"} {
    set tmplink [file readlink $tmplink]







|







47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
    # Add a dummy if it does not exist.
    proc addBalloon {args} {}
} else {
    namespace import -force psballoon::addBalloon
}

set debug 0
set diffver "Version 2.0.3+ 2004-05-26"
set thisScript [file join [pwd] [info script]]
set thisDir [file dirname $thisScript]

# Follow any link
set tmplink $thisScript
while {[file type $tmplink] eq "link"} {
    set tmplink [file readlink $tmplink]
79
80
81
82
83
84
85




















86
87
88
89
90
91
92
    # Locate CVS if it is in c:/bin
    if {!$::util(cvsExists) && [file exists "c:/bin/cvs.exe"]} {
        set env(PATH) "$env(PATH);c:\\bin"
        auto_reset
        set ::util(cvsExists) [expr {![string equal [auto_execok cvs] ""]}]
    }
}





















# This function is called when a toplevel is closed.
# If it is the last remaining toplevel, the application quits.
# If top = "all" it means quit.
proc cleanupAndExit {top} {
    # A security thing to make sure we can exit.
    set cont 0







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







79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
    # Locate CVS if it is in c:/bin
    if {!$::util(cvsExists) && [file exists "c:/bin/cvs.exe"]} {
        set env(PATH) "$env(PATH);c:\\bin"
        auto_reset
        set ::util(cvsExists) [expr {![string equal [auto_execok cvs] ""]}]
    }
}

# Debug function to be able to reread the source even when wrapped in a kit.
proc EskilRereadSource {} {
    set this $::thisScript

    # Are we in a Starkit?
    if {[regexp {^(.*eskil)((?:\.[^/]+)?)(/lib/app-eskil.*)$} $this -> \
            pre ext post]} {
        if {$ext ne ".vfs"} {
            # If the unpacked vfs directory is available, read from that
            # instead.
            set src $pre.vfs$post
            if {[file readable $src]} {
                set this $src
            }
        }
    }
    puts "Resourcing $this"
    uplevel \#0 [list source $this]
}

# This function is called when a toplevel is closed.
# If it is the last remaining toplevel, the application quits.
# If top = "all" it means quit.
proc cleanupAndExit {top} {
    # A security thing to make sure we can exit.
    set cont 0
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
        set ::diff($top,cleanup) "RCS"
    } elseif {$::diff($top,mode) eq "CT"} {
        prepareClearCase $top
        set ::diff($top,cleanup) "CT"
    } elseif {[string match "conflict*" $::diff($top,mode)]} {
        prepareConflict $top
        set ::diff($top,cleanup) "conflict"
    } elseif {[lindex [file system $::diff($top,leftFile)] 0] ne "native" || \
            [lindex [file system $::diff($top,rightFile)] 0] ne "native"} {
        # A special case to diff files in a virtual file system
        set ::diff($top,leftLabel)  $::diff($top,leftFile)
        set ::diff($top,rightLabel) $::diff($top,rightFile)
        set ::diff($top,leftFile)  [tmpFile]
        set ::diff($top,rightFile) [tmpFile]
        file copy -force -- $::diff($top,leftLabel)  $::diff($top,leftFile)
        file copy -force -- $::diff($top,rightLabel) $::diff($top,rightFile)
        set ::diff($top,cleanup) "virtual"
    }
}

# Clean up after a diff
proc cleanupFiles {top} {
    switch $::diff($top,cleanup) {
        "RCS" - "CT" {cleanupRCS      $top}
        "conflict"   {cleanupConflict $top}
        "virtual" {
            clearTmp $::diff($top,rightFile) $::diff($top,leftFile)
            set ::diff($top,leftFile)  $::diff($top,leftLabel)
            set ::diff($top,rightFile) $::diff($top,rightLabel)
        }
    }
}

# Main diff function.
proc doDiff {top} {
    global Pref
    global doingLine1 doingLine2







<
<
<
<
<
<
<
<
<
<








<
<
<
<
<







1226
1227
1228
1229
1230
1231
1232










1233
1234
1235
1236
1237
1238
1239
1240





1241
1242
1243
1244
1245
1246
1247
        set ::diff($top,cleanup) "RCS"
    } elseif {$::diff($top,mode) eq "CT"} {
        prepareClearCase $top
        set ::diff($top,cleanup) "CT"
    } elseif {[string match "conflict*" $::diff($top,mode)]} {
        prepareConflict $top
        set ::diff($top,cleanup) "conflict"










    }
}

# Clean up after a diff
proc cleanupFiles {top} {
    switch $::diff($top,cleanup) {
        "RCS" - "CT" {cleanupRCS      $top}
        "conflict"   {cleanupConflict $top}





    }
}

# Main diff function.
proc doDiff {top} {
    global Pref
    global doingLine1 doingLine2
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
                -onvalue char -offvalue none -command \
                "$top.ft1.tt configure -wrap \$wrapstate ;\
                $top.ft2.tt configure -wrap \$wrapstate"
        $top.md.m add command -label "Date Filter" \
                -command {set ::diff(filter) {^Date}}
        $top.md.m add separator
        $top.md.m add command -label "Reread Source" -underline 0 \
                -command {source $thisScript}
        $top.md.m add separator
        $top.md.m add command -label "Redraw Window" \
                -command [list makeDiffWin $top]
        $top.md.m add separator
        $top.md.m add command -label "Normal Cursor" \
                -command [list normalCursor $top]
        $top.md.m add separator







|







3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
                -onvalue char -offvalue none -command \
                "$top.ft1.tt configure -wrap \$wrapstate ;\
                $top.ft2.tt configure -wrap \$wrapstate"
        $top.md.m add command -label "Date Filter" \
                -command {set ::diff(filter) {^Date}}
        $top.md.m add separator
        $top.md.m add command -label "Reread Source" -underline 0 \
                -command {EskilRereadSource}
        $top.md.m add separator
        $top.md.m add command -label "Redraw Window" \
                -command [list makeDiffWin $top]
        $top.md.m add separator
        $top.md.m add command -label "Normal Cursor" \
                -command [list normalCursor $top]
        $top.md.m add separator
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
        menu $top.md.m
        if {$::tcl_platform(platform) eq "windows"} {
            $top.md.m add checkbutton -label "Console" -variable consolestate \
                    -onvalue show -offvalue hide -command {console $consolestate}
            $top.md.m add separator
        }
        $top.md.m add command -label "Reread Source" -underline 0 \
                -command {source $thisScript}
        $top.md.m add separator
        $top.md.m add command -label "Redraw Window" -command {makeDirDiffWin 1}
        pack $top.md -in $top.fm -side left -padx 20 -anchor n
    }

    button $top.bu -text "Up Both" -command upDir -underline 0 -padx 10
    bind $top <Alt-u> "$top.bu invoke"







|







3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
        menu $top.md.m
        if {$::tcl_platform(platform) eq "windows"} {
            $top.md.m add checkbutton -label "Console" -variable consolestate \
                    -onvalue show -offvalue hide -command {console $consolestate}
            $top.md.m add separator
        }
        $top.md.m add command -label "Reread Source" -underline 0 \
                -command {EskilRereadSource}
        $top.md.m add separator
        $top.md.m add command -label "Redraw Window" -command {makeDirDiffWin 1}
        pack $top.md -in $top.fm -side left -padx 20 -anchor n
    }

    button $top.bu -text "Up Both" -command upDir -underline 0 -padx 10
    bind $top <Alt-u> "$top.bu invoke"