Skip to contentSkip to conversation

gitk with arguments fails on OSX

DISCUSSION Randal L. Schwartz 4 participants 5 messages Aug 11, 2016

lore
Share & tools
lore
#3 lore raw
In reply to Randal L. Schwartz
Quoted 13 lines · [email protected] (Randal L. Schwartz) writes:
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Johannes" == Johannes Schindelin <[email protected]> writes:

Johannes> Hi,

Quoted 7 lines · Randal L. Schwartz
Quoted 7 lines

Using the native "wish", gitk fails on OSX 10.4 if given any arguments. For example, the failure for "gitk --all" is:

localhost.local:~/MIRROR/git-GIT % gitk --all
Error in startup script: unknown option "-state"
while executing

Quoted 5 lines

Johannes> Known problem:

Johannes> http://thread.gmane.org/gmane.comp.version-control.git/31266/focus=31266

The fix works for me. How about mainlining it?

The changes look sane to me.

Paul? I prefer to be fed gitk changes through you, if you don't mind.

Quoted 44 lines

From: Randal L. Schwartz <[email protected]>
Date: Wed, 29 Nov 2006 07:20:04 -0800
Subject: [PATCH] patch from mailing list

---
 gitk |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
gitk +4 -4
index ab383b3..d9df0a3 100755
@@ -1632,8 +1632,8 @@ proc showview {n} {
 
     set curview $n
     set selectedview $n
-    .bar.view entryconf 2 -state [expr {$n == 0? "disabled": "normal"}]
-    .bar.view entryconf 3 -state [expr {$n == 0? "disabled": "normal"}]
+    .bar.view entryconf "Edit*" -state [expr {$n == 0? "disabled": "normal"}]
+    .bar.view entryconf "Delete*" -state [expr {$n == 0? "disabled": "normal"}]
 
     if {![info exists viewdata($n)]} {
        set pending_select $selid
@@ -6305,8 +6305,8 @@ if {$cmdline_files ne {} || $revtreeargs ne {}} {
     set viewargs(1) $revtreeargs
     set viewperm(1) 0
     addviewmenu 1
-    .bar.view entryconf 2 -state normal
-    .bar.view entryconf 3 -state normal
+    .bar.view entryconf "Edit*" -state normal
+    .bar.view entryconf "Delete*" -state normal
 }
 
 if {[info exists permviews]} {
Signature · 9 lines
1.4.4.1.gf927



-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[email protected]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!
#4 lore raw
In reply to Junio C Hamano
Quoted 4 lines · Junio C Hamano

The changes look sane to me.

Paul? I prefer to be fed gitk changes through you, if you don't mind.

I just pushed a somewhat more comprehensive fix to my gitk.git repo on master.kernel.org. (Actually I had checked it in some time ago locally but forgot to do the push, sorry.)

Regards,

#0 lore raw

Using the native "wish", gitk fails on OSX 10.4 if given any arguments. For example, the failure for "gitk --all" is:

localhost.local:~/MIRROR/git-GIT % gitk --all
Error in startup script: unknown option "-state"
while executing
".bar.view entryconf 3 -state normal"
invoked from within
"if {$cmdline_files ne {} || $revtreeargs ne {}} {
# create a view for the files/dirs specified on the command line set curview 1
set selec..."
(file "/opt/git/bin/gitk" line 6298)

What is -state ? What version of tk does it require?

Signature · 3 lines
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[email protected]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
#2 lore raw
In reply to Johannes Schindelin
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Johannes" == Johannes Schindelin <[email protected]> writes:

Johannes> Hi,

Quoted 7 lines · Randal L. Schwartz
Quoted 7 lines

Using the native "wish", gitk fails on OSX 10.4 if given any arguments. For example, the failure for "gitk --all" is:

localhost.local:~/MIRROR/git-GIT % gitk --all
Error in startup script: unknown option "-state"
while executing

Johannes> Known problem:

Johannes> http://thread.gmane.org/gmane.comp.version-control.git/31266/focus=31266

The fix works for me. How about mainlining it?

From: Randal L. Schwartz <[email protected]>
Date: Wed, 29 Nov 2006 07:20:04 -0800
Subject: [PATCH] patch from mailing list

---
 gitk |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
gitk +4 -4
index ab383b3..d9df0a3 100755
@@ -1632,8 +1632,8 @@ proc showview {n} {
 
     set curview $n
     set selectedview $n
-    .bar.view entryconf 2 -state [expr {$n == 0? "disabled": "normal"}]
-    .bar.view entryconf 3 -state [expr {$n == 0? "disabled": "normal"}]
+    .bar.view entryconf "Edit*" -state [expr {$n == 0? "disabled": "normal"}]
+    .bar.view entryconf "Delete*" -state [expr {$n == 0? "disabled": "normal"}]
 
     if {![info exists viewdata($n)]} {
        set pending_select $selid
@@ -6305,8 +6305,8 @@ if {$cmdline_files ne {} || $revtreeargs ne {}} {
     set viewargs(1) $revtreeargs
     set viewperm(1) 0
     addviewmenu 1
-    .bar.view entryconf 2 -state normal
-    .bar.view entryconf 3 -state normal
+    .bar.view entryconf "Edit*" -state normal
+    .bar.view entryconf "Delete*" -state normal
 }
 
 if {[info exists permviews]} {
Signature · 8 lines
1.4.4.1.gf927



-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[email protected]> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.