Skip to content

Commit 82d316c

Browse files
committed
gitk: Make TclTk 8.6 the minimum, allow 8.7
gitk runs under wish so naturally has Tcl and Tk available and of the same version. gitk sets a requirement on Tk version >= 8.4: this is very outdated, and the earliest Tcl currently shipping on any supported OS is 8.6. As 8.7 is in alpha test and is generally compatible with 8.6, we should allow 8.7. Tcl 9.0 has planned compatibility breaking changes so is not yet supported. Let's change the requirements to 8.6-8.7, but not 9.0. Place this at the top of file so the requirements are obvious. Signed-off-by: Mark Levedahl <[email protected]>
1 parent 51c543c commit 82d316c

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

gitk

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,15 @@ exec wish "$0" -- "$@"
77
# and distributed under the terms of the GNU General Public Licence,
88
# either version 2, or (at your option) any later version.
99

10-
package require Tk
10+
if {[catch {package require Tcl 8.6-8.8} err]} {
11+
catch {wm withdraw .}
12+
tk_messageBox \
13+
-icon error \
14+
-type ok \
15+
-title "gitk: fatal error" \
16+
-message $err
17+
exit 1
18+
}
1119

1220
set MIN_GIT_VERSION 2.20
1321
regexp {^git version ([\d.]*\d)} [exec git version] _ git_version
@@ -12509,13 +12517,6 @@ namespace import ::msgcat::mc
1250912517
## And eventually load the actual message catalog
1251012518
::msgcat::mcload $gitk_msgsdir
1251112519
12512-
# First check that Tcl/Tk is recent enough
12513-
if {[catch {package require Tk 8.4} err]} {
12514-
show_error {} . [mc "Sorry, gitk cannot run with this version of Tcl/Tk.\n\
12515-
Gitk requires at least Tcl/Tk 8.4."]
12516-
exit 1
12517-
}
12518-
1251912520
# on OSX bring the current Wish process window to front
1252012521
if {[tk windowingsystem] eq "aqua"} {
1252112522
safe_exec [list osascript -e [format {

0 commit comments

Comments
 (0)