* gitk broken or user error?
@ 2006-11-12 17:00 Seth Falcon
2006-11-13 5:20 ` Shawn Pearce
2006-11-13 22:05 ` Paul Mackerras
0 siblings, 2 replies; 6+ messages in thread
From: Seth Falcon @ 2006-11-12 17:00 UTC (permalink / raw)
To: git
Hi,
I get the following error when invoking gitk with any command line
argument, for example, 'gitk --all':
ziti:~/proj/R-devel seth$ 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 "/Users/seth/scm/bin/gitk" line 6298)
I tried a certainly incorrect thing; just commenting out the offending
lines:
diff --git a/gitk b/gitk
index ab383b3..a6c0a9f 100755
--- a/gitk
+++ b/gitk
@@ -6305,8 +6305,8 @@ if {$cmdline_files ne {} || $revtreeargs
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 2 -state normal
+# .bar.view entryconf 3 -state normal
}
if {[info exists permviews]} {
And now gitk _seems_ to work. No error message, and I can pass
argument to gitk like --all (wow, very useful).
I posted about this in October [*1*], but didn't get any response.
I'd like to be able to use gitk without my must-be-wrong patch. This
is on OS X ppc (git version 1.4.4.rc1.g73347) with Tcl & Tk at 8.4.7.
Can I provide more info? Have I missed a configuration step?
Thanks,
+ seth
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: gitk broken or user error?
2006-11-12 17:00 gitk broken or user error? Seth Falcon
@ 2006-11-13 5:20 ` Shawn Pearce
2006-11-13 22:05 ` Paul Mackerras
1 sibling, 0 replies; 6+ messages in thread
From: Shawn Pearce @ 2006-11-13 5:20 UTC (permalink / raw)
To: Seth Falcon; +Cc: git
Seth Falcon <sethfalcon@gmail.com> wrote:
> I get the following error when invoking gitk with any command line
> argument, for example, 'gitk --all':
>
> ziti:~/proj/R-devel seth$ 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 "/Users/seth/scm/bin/gitk" line 6298)
You are not alone on this. I see the same thing on my Mac and it
makes it quite difficult to use gitk. However the same version of
gitk does not have this problem on Windows. Its clearly related
to platform differences.
Of course Windows is unable to open a gitk window without it
being collapsed down to only the titlebar, and is also unable to
sucessfully reread the user's ~/.gitk file, but that's another bug...
I really should try to figure out what these problems are, but gitk
is 6323 lines of Tcl/Tk code which I'm not all too familiar with,
and I've got my own growing mass of ~2473 lines of Tcl/Tk code in
git-gui to worry about right now...
--
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gitk broken or user error?
2006-11-12 17:00 gitk broken or user error? Seth Falcon
2006-11-13 5:20 ` Shawn Pearce
@ 2006-11-13 22:05 ` Paul Mackerras
2006-11-13 22:28 ` Seth Falcon
1 sibling, 1 reply; 6+ messages in thread
From: Paul Mackerras @ 2006-11-13 22:05 UTC (permalink / raw)
To: Seth Falcon; +Cc: git
Seth Falcon writes:
> I tried a certainly incorrect thing; just commenting out the offending
> lines:
[snip]
> - .bar.view entryconf 2 -state normal
> - .bar.view entryconf 3 -state normal
> +# .bar.view entryconf 2 -state normal
> +# .bar.view entryconf 3 -state normal
> }
>
> if {[info exists permviews]} {
>
> And now gitk _seems_ to work. No error message, and I can pass
> argument to gitk like --all (wow, very useful).
Those lines are intended to enable the "Edit view" and "Delete view"
entries in the View menu. Those entries start out disabled and are
supposed to be disabled when the "All files" view is displayed, and
enabled when any other view is displayed.
I suspect that under OSX, the menu gets an extra entry, or something,
that throws off the numbering. Instead of commenting out those lines,
could you instead try changing the 2 and 3 to "Edit*" and "Delete*"
instead? If that works I'll do a patch to fix the problem properly.
> I posted about this in October [*1*], but didn't get any response.
I tend to read the git list intermittently (lkml and linuxppc-dev keep
me pretty much occupied :). Please cc me on any gitk bug reports.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: gitk broken or user error?
2006-11-13 22:05 ` Paul Mackerras
@ 2006-11-13 22:28 ` Seth Falcon
2006-11-13 22:38 ` Seth Falcon
2006-11-13 22:42 ` Paul Mackerras
0 siblings, 2 replies; 6+ messages in thread
From: Seth Falcon @ 2006-11-13 22:28 UTC (permalink / raw)
To: Paul Mackerras; +Cc: git
Paul Mackerras <paulus@samba.org> writes:
> Those lines are intended to enable the "Edit view" and "Delete view"
> entries in the View menu. Those entries start out disabled and are
> supposed to be disabled when the "All files" view is displayed, and
> enabled when any other view is displayed.
>
> I suspect that under OSX, the menu gets an extra entry, or something,
> that throws off the numbering. Instead of commenting out those lines,
> could you instead try changing the 2 and 3 to "Edit*" and "Delete*"
> instead? If that works I'll do a patch to fix the problem properly.
I tried this patch:
diff --git a/gitk b/gitk
index ab383b3..e7ea4e2 100755
--- a/gitk
+++ b/gitk
@@ -6305,8 +6305,8 @@ if {$cmdline_files ne {} || $revtreeargs
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]} {
And, yes, this allows gitk to load up and be useful. So this is much
better than the current behavior. However, if I try clicking on the
"All files" view in the view menu, I get an error box along these
lines:
unknown option "-state"
unknown option "-state"
while executing
".bar.view entryconf 3 -state [expr {$n == 0? "disabled": "normal"}]"
(procedure "showview" line 56)
invoked from within
"showview 0"
(menu invoke)
Perhaps a similar fix is needed in other parts of the code.
+ seth
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: gitk broken or user error?
2006-11-13 22:28 ` Seth Falcon
@ 2006-11-13 22:38 ` Seth Falcon
2006-11-13 22:42 ` Paul Mackerras
1 sibling, 0 replies; 6+ messages in thread
From: Seth Falcon @ 2006-11-13 22:38 UTC (permalink / raw)
To: Paul Mackerras; +Cc: git
Seth Falcon <sethfalcon@gmail.com> writes:
> I tried this patch:
And then I used grep :-)
This patch seems to get the view menu items working. The only strange
thing I see now is that if I create a new view and then try to delete
it, it stays around in the menu.
+ seth
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
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
}
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: gitk broken or user error?
2006-11-13 22:28 ` Seth Falcon
2006-11-13 22:38 ` Seth Falcon
@ 2006-11-13 22:42 ` Paul Mackerras
1 sibling, 0 replies; 6+ messages in thread
From: Paul Mackerras @ 2006-11-13 22:42 UTC (permalink / raw)
To: Seth Falcon; +Cc: git
Seth Falcon writes:
> Perhaps a similar fix is needed in other parts of the code.
Sure, the change I asked you to test was just to verify what the
underlying problem was.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2006-11-13 22:43 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-12 17:00 gitk broken or user error? Seth Falcon
2006-11-13 5:20 ` Shawn Pearce
2006-11-13 22:05 ` Paul Mackerras
2006-11-13 22:28 ` Seth Falcon
2006-11-13 22:38 ` Seth Falcon
2006-11-13 22:42 ` Paul Mackerras
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox