Skip to content

Commit

Permalink
gitk: Check that we are running on at least Tcl/Tk 8.4
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Paul Mackerras committed Oct 20, 2007
1 parent 5e85ec4 commit 5d7589d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions gitk
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 5d7589d

Please sign in to comment.