# [PATCH] gitk: add check for required tcl version >= 8.4

2 messages from 2007-09-29 to 2007-10-20. Participants: Junio C Hamano, Paul Mackerras.
Thread: https://gitlist.dev/t/10067

## Junio C Hamano, 2007-09-29 09:32

Subject: [PATCH] gitk: add check for required tcl version >= 8.4
Message-ID: <7vlkaplsu1.fsf@gitster.siamese.dyndns.org>
URL: https://gitlist.dev/e/7vlkaplsu1.fsf%40gitster.siamese.dyndns.org

```
From: Steffen Prohaska <prohaska@zib.de>
Date: Fri, 28 Sep 2007 22:57:22 +0200

gitk requires tcl version >= 8.4 to work flawlessly. So let's
check the tcl version and quit if it's too low.

Signed-off-by: Steffen Prohaska <prohaska@zib.de>
---

 * I do not have a ready access to older tcl/tk myself, so I
   cannot judge if this is sensible or not.  Just forwarding in
   case you missed it.

 gitk |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/gitk b/gitk
index 300fdce..6ea6489 100755
--- a/gitk
+++ b/gitk
@@ -7,6 +7,11 @@ exec wish "$0" -- "$@"
 # and distributed under the terms of the GNU General Public Licence,
 # either version 2, or (at your option) any later version.
 
+if {[info tclversion] < 8.4} {
+   puts stderr "Sorry, gitk requires tcl version >= 8.4."
+   exit 1 
+}
+
 proc gitdir {} {
     global env
     if {[info exists env(GIT_DIR)]} {
-- 
1.5.3.2.111.g5166

```

## Paul Mackerras, 2007-10-20 11:19

Subject: Re: [PATCH] gitk: add check for required tcl version >= 8.4
Message-ID: <18201.58415.361214.601377@cargo.ozlabs.ibm.com>
URL: https://gitlist.dev/e/18201.58415.361214.601377%40cargo.ozlabs.ibm.com
In-Reply-To: <7vlkaplsu1.fsf@gitster.siamese.dyndns.org>

```
Junio C Hamano writes:

> From: Steffen Prohaska <prohaska@zib.de>
> Date: Fri, 28 Sep 2007 22:57:22 +0200
> 
> gitk requires tcl version >= 8.4 to work flawlessly. So let's
> check the tcl version and quit if it's too low.
> 
> Signed-off-by: Steffen Prohaska <prohaska@zib.de>
> ---
> 
>  * I do not have a ready access to older tcl/tk myself, so I
>    cannot judge if this is sensible or not.  Just forwarding in
>    case you missed it.

Thanks for the patch.  I have put in something similar using the
package require command, and using show_error to display the error in
a window.

Paul.

```
