git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: gitk broken or user error?

From
Seth Falcon <sethfalcon@gmail.com>
Date
Nov 13, 2006, 22:28 UTC
Message-ID
<m27ixzgex4.fsf@ziti.local>
In-Reply-To
<17752.60467.854884.206737@cargo.ozlabs.ibm.com>
Paul Mackerras <paulus@samba.org> writes:
Show 9 quoted lines
> 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
Previous: Paul MackerrasNext: Seth Falcon
Message 4 of 6 in “gitk broken or user error?”
  1. Seth FalconNov 12, 2006
  2. Shawn PearceNov 13, 2006
  3. Paul MackerrasNov 13, 2006
  4. Seth FalconNov 13, 2006
  5. Seth FalconNov 13, 2006
  6. Paul MackerrasNov 13, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.