invalid command name "listrefs"

Subsystems: the rest

2 messages, 2 authors, 2016-06-15 · open the first message on its own page

invalid command name "listrefs"

From: Junio C Hamano <hidden>
Date: 2016-06-15 22:42:29

Starting gitk, "File->Reread references" results in an error
dialog.

This patch resurrects the procedure from an older version, and it
seems to work for me, but with the updated code it might be that
you wanted to use a different mechanism to implement rereadrefs
procedure -- I dunno.

-- >8 --
gitk: rereadrefs wants listrefs 

The listrefs procedure was removed during the course of
development, but there is still a user of it, so resurrect it.

Signed-off-by: Junio C Hamano <redacted>
---
diff --git a/gitk b/gitk
index 9be10a4..ba4644f 100755
--- a/gitk
+++ b/gitk
@@ -5196,6 +5196,24 @@ proc rereadrefs {} {
     }
 }
 
+proc listrefs {id} {
+    global idtags idheads idotherrefs
+
+    set x {}
+    if {[info exists idtags($id)]} {
+	set x $idtags($id)
+    }
+    set y {}
+    if {[info exists idheads($id)]} {
+	set y $idheads($id)
+    }
+    set z {}
+    if {[info exists idotherrefs($id)]} {
+	set z $idotherrefs($id)
+    }
+    return [list $x $y $z]
+}
+
 proc showtag {tag isnew} {
     global ctext tagcontents tagids linknum
 

Re: invalid command name "listrefs"

From: Paul Mackerras <hidden>
Date: 2016-06-15 22:42:29

Junio,
Starting gitk, "File->Reread references" results in an error
dialog.

This patch resurrects the procedure from an older version, and it
seems to work for me, but with the updated code it might be that
you wanted to use a different mechanism to implement rereadrefs
procedure -- I dunno.
Thanks for pointing that out.  I had removed listrefs in the course of
doing some changes that I later dropped; not reinstating listrefs at
that point was just an oversight.

Paul.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help