gitk with arguments fails on OSX

3 messages, 2 authors, 2016-08-11 · open the first message on its own page

gitk with arguments fails on OSX

From: Randal L. Schwartz <hidden>
Date: 2016-08-11 20:22:25

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?

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

Re: gitk with arguments fails on OSX

From: Johannes Schindelin <hidden>
Date: 2016-08-11 19:19:20

Hi,

On Wed, 29 Nov 2006, Randal L. Schwartz wrote:
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
Known problem:

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

Hth,
Dscho

Re: gitk with arguments fails on OSX

From: Randal L. Schwartz <hidden>
Date: 2016-08-11 20:47:41

quoted
quoted
quoted
quoted
"Johannes" == Johannes Schindelin [off-list ref] writes:
Johannes> Hi,
Johannes> On Wed, 29 Nov 2006, Randal L. Schwartz wrote:
quoted
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 <redacted>
Date: Wed, 29 Nov 2006 07:20:04 -0800
Subject: [PATCH] patch from mailing list

---
 gitk |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/gitk b/gitk
index ab383b3..d9df0a3 100755
--- a/gitk
+++ b/gitk
@@ -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]} {
-- 
1.4.4.1.gf927



-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help