{"thread":{"id":"43101","subject":"Re: gitk broken or user error?","startedAt":"2006-11-12T17:00:16Z","lastAt":"2006-11-13T22:42:25Z","messageCount":6,"participants":["Seth Falcon","Shawn Pearce","Paul Mackerras"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"297192","messageId":"m2irhkr467.fsf@ziti.local","threadId":"43101","inReplyTo":null,"subject":"gitk broken or user error?","fromName":"Seth Falcon","fromEmail":"sethfalcon@gmail.com","sentAt":"2006-11-12T17:00:16Z","receivedAt":"2006-11-12T17:00:16Z","isPatch":false,"sender":{"key":"sethfalcon@gmail.com","avatar":"https://gravatar.com/avatar/fd62fe73d3013b12fce71d5269ec52eaca3c4cee479efc6eea3603d6f1d8bf8d?d=mp&s=160"},"body":"Hi,\n\nI get the following error when invoking gitk with any command line\nargument, for example, 'gitk --all':\n\n    ziti:~/proj/R-devel seth$ gitk --all\n    Error in startup script: unknown option \"-state\"\n        while executing\n    \".bar.view entryconf 3 -state normal\"\n        invoked from within\n    \"if {$cmdline_files ne {} || $revtreeargs ne {}} {\n        # create a view for the files/dirs specified on the command line\n        set curview 1\n        set selec...\"\n        (file \"/Users/seth/scm/bin/gitk\" line 6298)\n\nI tried a certainly incorrect thing; just commenting out the offending\nlines:\n\ndiff --git a/gitk b/gitk\nindex ab383b3..a6c0a9f 100755\n--- a/gitk\n+++ b/gitk\n@@ -6305,8 +6305,8 @@ if {$cmdline_files ne {} || $revtreeargs\n     set viewargs(1) $revtreeargs\n     set viewperm(1) 0\n     addviewmenu 1\n-    .bar.view entryconf 2 -state normal\n-    .bar.view entryconf 3 -state normal\n+#    .bar.view entryconf 2 -state normal\n+#    .bar.view entryconf 3 -state normal\n }\n \n if {[info exists permviews]} {\n\nAnd now gitk _seems_ to work.  No error message, and I can pass\nargument to gitk like --all (wow, very useful).\n\nI posted about this in October [*1*], but didn't get any response.\nI'd like to be able to use gitk without my must-be-wrong patch.  This\nis on OS X ppc (git version 1.4.4.rc1.g73347) with Tcl & Tk at 8.4.7.\nCan I provide more info?  Have I missed a configuration step?\n\nThanks,\n\n+ seth\n\n\n"},{"id":"294876","messageId":"20061113052007.GA31551@spearce.org","threadId":"43101","inReplyTo":"m2irhkr467.fsf@ziti.local","subject":"Re: gitk broken or user error?","fromName":"Shawn Pearce","fromEmail":"spearce@spearce.org","sentAt":"2006-11-13T05:20:07Z","receivedAt":"2006-11-13T05:20:07Z","isPatch":false,"sender":{"key":"spearce@spearce.org","avatar":"https://avatars.githubusercontent.com/u/34844?v=4"},"body":"Seth Falcon <sethfalcon@gmail.com> wrote:\n> I get the following error when invoking gitk with any command line\n> argument, for example, 'gitk --all':\n> \n>     ziti:~/proj/R-devel seth$ gitk --all\n>     Error in startup script: unknown option \"-state\"\n>         while executing\n>     \".bar.view entryconf 3 -state normal\"\n>         invoked from within\n>     \"if {$cmdline_files ne {} || $revtreeargs ne {}} {\n>         # create a view for the files/dirs specified on the command line\n>         set curview 1\n>         set selec...\"\n>         (file \"/Users/seth/scm/bin/gitk\" line 6298)\n\nYou are not alone on this.  I see the same thing on my Mac and it\nmakes it quite difficult to use gitk.  However the same version of\ngitk does not have this problem on Windows.  Its clearly related\nto platform differences.\n\nOf course Windows is unable to open a gitk window without it\nbeing collapsed down to only the titlebar, and is also unable to\nsucessfully reread the user's ~/.gitk file, but that's another bug...\n\nI really should try to figure out what these problems are, but gitk\nis 6323 lines of Tcl/Tk code which I'm not all too familiar with,\nand I've got my own growing mass of ~2473 lines of Tcl/Tk code in\ngit-gui to worry about right now...\n\n-- \n"},{"id":"297510","messageId":"17752.60467.854884.206737@cargo.ozlabs.ibm.com","threadId":"43101","inReplyTo":"m2irhkr467.fsf@ziti.local","subject":"Re: gitk broken or user error?","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2006-11-13T22:05:39Z","receivedAt":"2006-11-13T22:05:39Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Seth Falcon writes:\n\n> I tried a certainly incorrect thing; just commenting out the offending\n> lines:\n\n[snip]\n> -    .bar.view entryconf 2 -state normal\n> -    .bar.view entryconf 3 -state normal\n> +#    .bar.view entryconf 2 -state normal\n> +#    .bar.view entryconf 3 -state normal\n>  }\n>  \n>  if {[info exists permviews]} {\n> \n> And now gitk _seems_ to work.  No error message, and I can pass\n> argument to gitk like --all (wow, very useful).\n\nThose lines are intended to enable the \"Edit view\" and \"Delete view\"\nentries in the View menu.  Those entries start out disabled and are\nsupposed to be disabled when the \"All files\" view is displayed, and\nenabled when any other view is displayed.\n\nI suspect that under OSX, the menu gets an extra entry, or something,\nthat throws off the numbering.  Instead of commenting out those lines,\ncould you instead try changing the 2 and 3 to \"Edit*\" and \"Delete*\"\ninstead?  If that works I'll do a patch to fix the problem properly.\n\n> I posted about this in October [*1*], but didn't get any response.\n\nI tend to read the git list intermittently (lkml and linuxppc-dev keep\nme pretty much occupied :).  Please cc me on any gitk bug reports.\n\n"},{"id":"293846","messageId":"m27ixzgex4.fsf@ziti.local","threadId":"43101","inReplyTo":"17752.60467.854884.206737@cargo.ozlabs.ibm.com","subject":"Re: gitk broken or user error?","fromName":"Seth Falcon","fromEmail":"sethfalcon@gmail.com","sentAt":"2006-11-13T22:28:07Z","receivedAt":"2006-11-13T22:28:07Z","isPatch":false,"sender":{"key":"sethfalcon@gmail.com","avatar":"https://gravatar.com/avatar/fd62fe73d3013b12fce71d5269ec52eaca3c4cee479efc6eea3603d6f1d8bf8d?d=mp&s=160"},"body":"Paul Mackerras <paulus@samba.org> writes:\n> Those lines are intended to enable the \"Edit view\" and \"Delete view\"\n> entries in the View menu.  Those entries start out disabled and are\n> supposed to be disabled when the \"All files\" view is displayed, and\n> enabled when any other view is displayed.\n>\n> I suspect that under OSX, the menu gets an extra entry, or something,\n> that throws off the numbering.  Instead of commenting out those lines,\n> could you instead try changing the 2 and 3 to \"Edit*\" and \"Delete*\"\n> instead?  If that works I'll do a patch to fix the problem properly.\n\nI tried this patch:\n\ndiff --git a/gitk b/gitk\nindex ab383b3..e7ea4e2 100755\n--- a/gitk\n+++ b/gitk\n@@ -6305,8 +6305,8 @@ if {$cmdline_files ne {} || $revtreeargs\n     set viewargs(1) $revtreeargs\n     set viewperm(1) 0\n     addviewmenu 1\n-    .bar.view entryconf 2 -state normal\n-    .bar.view entryconf 3 -state normal\n+    .bar.view entryconf \"Edit*\" -state normal\n+    .bar.view entryconf \"Delete*\" -state normal\n }\n \n if {[info exists permviews]} {\n\nAnd, yes, this allows gitk to load up and be useful.  So this is much\nbetter than the current behavior.  However, if I try clicking on the\n\"All files\" view in the view menu, I get an error box along these\nlines:\n\n    unknown option \"-state\"\n    unknown option \"-state\"\n        while executing\n    \".bar.view entryconf 3 -state [expr {$n == 0? \"disabled\": \"normal\"}]\"\n        (procedure \"showview\" line 56)\n        invoked from within\n    \"showview 0\"\n        (menu invoke)\n\nPerhaps a similar fix is needed in other parts of the code.  \n\n+ seth\n\n"},{"id":"295751","messageId":"m2y7qfezum.fsf@ziti.local","threadId":"43101","inReplyTo":"m27ixzgex4.fsf@ziti.local","subject":"Re: gitk broken or user error?","fromName":"Seth Falcon","fromEmail":"sethfalcon@gmail.com","sentAt":"2006-11-13T22:38:57Z","receivedAt":"2006-11-13T22:38:57Z","isPatch":false,"sender":{"key":"sethfalcon@gmail.com","avatar":"https://gravatar.com/avatar/fd62fe73d3013b12fce71d5269ec52eaca3c4cee479efc6eea3603d6f1d8bf8d?d=mp&s=160"},"body":"Seth Falcon <sethfalcon@gmail.com> writes:\n> I tried this patch:\n\nAnd then I used grep :-)\n\nThis patch seems to get the view menu items working.  The only strange\nthing I see now is that if I create a new view and then try to delete\nit, it stays around in the menu.\n\n+ seth\n\ndiff --git a/gitk b/gitk\nindex ab383b3..d9df0a3 100755\n--- a/gitk\n+++ b/gitk\n@@ -1632,8 +1632,8 @@ proc showview {n} {\n \n     set curview $n\n     set selectedview $n\n-    .bar.view entryconf 2 -state [expr {$n == 0? \"disabled\": \"normal\"}]\n-    .bar.view entryconf 3 -state [expr {$n == 0? \"disabled\": \"normal\"}]\n+    .bar.view entryconf \"Edit*\" -state [expr {$n == 0? \"disabled\": \"normal\"}]\n+    .bar.view entryconf \"Delete*\" -state [expr {$n == 0? \"disabled\": \"normal\"}]\n \n     if {![info exists viewdata($n)]} {\n        set pending_select $selid\n@@ -6305,8 +6305,8 @@ if {$cmdline_files ne {} || $revtreeargs\n     set viewargs(1) $revtreeargs\n     set viewperm(1) 0\n     addviewmenu 1\n-    .bar.view entryconf 2 -state normal\n-    .bar.view entryconf 3 -state normal\n+    .bar.view entryconf \"Edit*\" -state normal\n+    .bar.view entryconf \"Delete*\" -state normal\n }\n \n"},{"id":"297293","messageId":"17752.62673.685934.152224@cargo.ozlabs.ibm.com","threadId":"43101","inReplyTo":"m27ixzgex4.fsf@ziti.local","subject":"Re: gitk broken or user error?","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2006-11-13T22:42:25Z","receivedAt":"2006-11-13T22:42:25Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Seth Falcon writes:\n\n> Perhaps a similar fix is needed in other parts of the code.  \n\nSure, the change I asked you to test was just to verify what the\nunderlying problem was.\n\n"}]}