aboutsummaryrefslogtreecommitdiff
path: root/gitk
diff options
context:
space:
mode:
authorPaul Mackerras <paulus@samba.org>2007-10-20 21:21:03 +1000
committerPaul Mackerras <paulus@samba.org>2007-10-20 21:21:03 +1000
commit5d7589d4c43e941563dfa2d096e6d6c184191702 (patch)
treefab6e40aa169590dc86331af1f43eb7b2f01d161 /gitk
parent5e85ec4cd0658232fa8ee13e8cd9da21e0e4973e (diff)
downloadgit-5d7589d4c43e941563dfa2d096e6d6c184191702.tar.gz
git-5d7589d4c43e941563dfa2d096e6d6c184191702.tar.xz
gitk: Check that we are running on at least Tcl/Tk 8.4
This checks that we have Tcl/Tk 8.4 or later, and puts up an error message in a window and quits if not. This was prompted by a patch submitted by Steffen Prohaska, but is done a bit differently (this uses package require rather than looking at [info tclversion], and uses show_error to display the error rather than printing it to stderr). Signed-off-by: Paul Mackerras <paulus@samba.org>
Diffstat (limited to 'gitk')
-rwxr-xr-xgitk7
1 files changed, 7 insertions, 0 deletions
diff --git a/gitk b/gitk
index 516e14a8f..06172a434 100755
--- a/gitk
+++ b/gitk
@@ -7838,6 +7838,13 @@ proc tcl_encoding {enc} {
return {}
}
+# First check that Tcl/Tk is recent enough
+if {[catch {package require Tk 8.4} err]} {
+ show_error {} . "Sorry, gitk cannot run with this version of Tcl/Tk.\n\
+ Gitk requires at least Tcl/Tk 8.4."
+ exit 1
+}
+
# defaults...
set datemode 0
set diffopts "-U 5 -p"