{"thread":{"id":"791","subject":"gitk-1.1 out","startedAt":"2005-06-01T10:09:15Z","lastAt":"2005-06-10T09:56:19Z","messageCount":9,"participants":["Paul Mackerras","Ingo Molnar","Sean","Linus Torvalds"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"4357","messageId":"17053.35147.52729.794561@cargo.ozlabs.ibm.com","threadId":"791","inReplyTo":null,"subject":"gitk-1.1 out","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2005-06-01T10:09:15Z","receivedAt":"2005-06-01T10:09:15Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"The latest version of gitk is at:\n\n\thttp://ozlabs.org/~paulus/gitk/gitk-1.1.tar.gz\n\n(yes, a real tarball this time, with a README even. :)\n\nNew features in this version include:\n\n* Commits that are pointed to by a tag in .git/refs/tags are now\n  marked with a little yellow \"luggage label\" shape attached to the\n  circle representing the commit.  The tag name is written on the\n  label.\n\n* Gitk now uses git-rev-list instead of git-rev-tree.  This means it\n  should be faster when looking at just a small range of commits.\n  Instead of using \"gitk HEAD ^ORIG_HEAD\" though, you need to use\n  \"gitk HEAD ORIG_HEAD\"; the arguments are passed to git-rev-list,\n  which takes slightly different arguments from git-rev-tree.\n  Unfortunately gitk still needs to see the whole git-rev-list output\n  before it can start to draw the graph; I plan to address this.\n\n* You can now type a tag name or a SHA1 id in the SHA1 field, and\n  press return or the \"Goto\" button to jump to that commit.\n\nPaul.\n"},{"id":"4360","messageId":"20050601111932.GA29391@elte.hu","threadId":"791","inReplyTo":"17053.35147.52729.794561@cargo.ozlabs.ibm.com","subject":"Re: gitk-1.1 out","fromName":"Ingo Molnar","fromEmail":"mingo@elte.hu","sentAt":"2005-06-01T11:19:32Z","receivedAt":"2005-06-01T11:19:32Z","isPatch":false,"sender":{"key":"mingo@elte.hu","avatar":null},"body":"\n* Paul Mackerras <paulus@samba.org> wrote:\n\n> The latest version of gitk is at:\n> \n> \thttp://ozlabs.org/~paulus/gitk/gitk-1.1.tar.gz\n\nworks very well for me, and all the bugs of the previous version that i \ncould trigger are fixed now.\n\n\tIngo\n"},{"id":"4416","messageId":"3064.10.10.10.24.1117719145.squirrel@linux1","threadId":"791","inReplyTo":"17053.35147.52729.794561@cargo.ozlabs.ibm.com","subject":"Re: gitk-1.1 out","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2005-06-02T13:32:25Z","receivedAt":"2005-06-02T13:32:25Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Wed, June 1, 2005 6:09 am, Paul Mackerras said:\n> The latest version of gitk is at:\n>\n> \thttp://ozlabs.org/~paulus/gitk/gitk-1.1.tar.gz\n>\n> (yes, a real tarball this time, with a README even. :)\n>\n\nHi Paul,\n\nLooks really good!  Thought i'd share some homespun rpms that upgrade\nFedora TCL/Tk to use anti-aliased fonts for gitk.   They make the text\ndisplayed in gitk a little nicer to read.  Only tested on Fedora FC3 and\nthere's no warranty, but they should work for others too.\n\nThe rpms and a couple of screenshots are available from:\nhttp://git.homelinux.com\n\nCheers,\nSean\n\n\n"},{"id":"4700","messageId":"Pine.LNX.4.58.0506080743040.2286@ppc970.osdl.org","threadId":"791","inReplyTo":"17053.35147.52729.794561@cargo.ozlabs.ibm.com","subject":"Re: gitk-1.1 out","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-06-08T14:49:38Z","receivedAt":"2005-06-08T14:49:38Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Wed, 1 Jun 2005, Paul Mackerras wrote:\n> \n> * Commits that are pointed to by a tag in .git/refs/tags are now\n>   marked with a little yellow \"luggage label\" shape attached to the\n>   circle representing the commit.  The tag name is written on the\n>   label.\n\nCan you do the same for things in .git/refs/heads? Possibly using another \ncolor?\n\nI realize that that may sound silly, but a tree that has many branches can \nvalidly be used with gitk with something like this:\n\n\tgitk $(ls .git/refs/heads)\n\nand it results in gitk correctly showing all the different heads, but \nbecause they aren't marked in the output, it's almost impossible to \nunderstand what's up.\n\nYou can try it out with something like Jeff's tree at \n\n\trsync://rsync.kernel.org/pub/scm/linux/kernel/git/jgarzik/netdev-2.6.git/\n\nif you want to, but the reason I noticed was that I was trying it out with\nthe result of \"git cvsimport\" in a tree that had branches. If it had had\nflags for the branches, it would have been an _extremely_ nice\nvisualization tool, as it was it was just \"cool, but I can't tell what\nthose different tips are\" ;)\n\n\t\tLinus\n"},{"id":"4756","messageId":"17063.51611.467615.685723@cargo.ozlabs.ibm.com","threadId":"791","inReplyTo":"Pine.LNX.4.58.0506080743040.2286@ppc970.osdl.org","subject":"Re: gitk-1.1 out","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2005-06-09T04:46:19Z","receivedAt":"2005-06-09T04:46:19Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Linus Torvalds writes:\n\n> Can you do the same for things in .git/refs/heads? Possibly using another \n> color?\n\nSure - the hardest part is going to be deciding on the shape and color\nto use. :)  Perhaps I'll try just using a green rectangle with black\non white text inside and see if that stands out enough.\n\n> I realize that that may sound silly, but a tree that has many branches can \n> validly be used with gitk with something like this:\n> \n> \tgitk $(ls .git/refs/heads)\n\nUm, did I break that when I changed to using git-rev-list instead of\ngit-rev-tree?\n\nPaul.\n"},{"id":"4783","messageId":"17064.15104.847009.390149@cargo.ozlabs.ibm.com","threadId":"791","inReplyTo":"Pine.LNX.4.58.0506080743040.2286@ppc970.osdl.org","subject":"Re: gitk-1.1 out","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2005-06-09T12:50:08Z","receivedAt":"2005-06-09T12:50:08Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Linus Torvalds writes:\n\n> Can you do the same for things in .git/refs/heads? Possibly using another \n> color?\n\nTry this patch against gitk-1.1 and let me know what you think.  I\ndraw the heads as a green rectangle with a black border.\n\nI also added a -t option to gitk which makes it use gitk-rev-tree\ninstead of git-rev-list, so that you can do\n\n\tgitk -t $(ls .git/refs/heads)\n\nPaul.\n---\n\ndiff -urN gitk-1.1/gitk current/gitk\n--- gitk-1.1/gitk\t2005-06-01 18:14:51.000000000 +1000\n+++ current/gitk\t2005-06-09 22:41:56.000000000 +1000\n@@ -10,13 +10,18 @@\n # CVS $Revision: 1.20 $\n \n proc getcommits {rargs} {\n-    global commits commfd phase canv mainfont\n+    global commits commfd phase canv mainfont treemode\n     if {$rargs == {}} {\n \tset rargs HEAD\n     }\n     set commits {}\n     set phase getcommits\n-    if [catch {set commfd [open \"|git-rev-list $rargs\" r]} err] {\n+    if {$treemode} {\n+\tset cmd \"git-rev-tree\"\n+    } else {\n+\tset cmd \"git-rev-list\"\n+    }\n+    if [catch {set commfd [open \"|$cmd $rargs\" r]} err] {\n \tputs stderr \"Error executing git-rev-list: $err\"\n \texit 1\n     }\n@@ -28,7 +33,7 @@\n }\n \n proc getcommitline {commfd}  {\n-    global commits parents cdate nparents children nchildren\n+    global commits parents cdate nparents children nchildren treemode\n     set n [gets $commfd line]\n     if {$n < 0} {\n \tif {![eof $commfd]} return\n@@ -39,8 +44,9 @@\n \t    return\n \t}\n \tif {[string range $err 0 4] == \"usage\"} {\n+\t    set cmd [expr {$treemode? \"tree\": \"list\"}]\n \t    set err \"\\\n-Gitk: error reading commits: bad arguments to git-rev-list.\\n\\\n+Gitk: error reading commits: bad arguments to git-rev-$cmd.\\n\\\n (Note: arguments to gitk are passed to git-rev-list\\\n to allow selection of commits to be displayed.)\"\n \t} else {\n@@ -49,11 +55,19 @@\n \terror_popup $err\n \texit 1\n     }\n-    if {![regexp {^[0-9a-f]{40}$} $line]} {\n-\terror_popup \"Can't parse git-rev-tree output: {$line}\"\n-\texit 1\n+    if {$treemode} {\n+\tif {![regexp {^[0-9]* ([0-9a-f]{40}):} $line match id]} {\n+\t    error_popup \"Can't parse git-rev-tree output: {$line}\"\n+\t    exit 1\n+\t}\n+\tlappend commits $id\n+    } else {\n+\tif {![regexp {^[0-9a-f]{40}$} $line]} {\n+\t    error_popup \"Can't parse git-rev-list output: {$line}\"\n+\t    exit 1\n+\t}\n+\tlappend commits $line\n     }\n-    lappend commits $line\n }\n \n proc readallcommits {} {\n@@ -130,7 +144,7 @@\n }\n \n proc readrefs {} {\n-    global tagids idtags\n+    global tagids idtags headids idheads\n     set tags [glob -nocomplain -types f .git/refs/tags/*]\n     foreach f $tags {\n \tcatch {\n@@ -154,6 +168,20 @@\n \t\t    lappend idtags($obj) $tag\n \t\t}\n \t    }\n+\t    close $fd\n+\t}\n+    }\n+    set heads [glob -nocomplain -types f .git/refs/heads/*]\n+    foreach f $heads {\n+\tcatch {\n+\t    set fd [open $f r]\n+\t    set line [read $fd 40]\n+\t    if {[regexp {^[0-9a-f]{40}} $line id]} {\n+\t\tset head [file tail $f]\n+\t\tset headids($head) $line\n+\t\tlappend idheads($line) $head\n+\t    }\n+\t    close $fd\n \t}\n     }\n }\n@@ -537,6 +565,7 @@\n     global lineid linehtag linentag linedtag commitinfo\n     global nextcolor colormap numcommits\n     global stopped phase redisplaying selectedline idtags idline\n+    global idheads\n \n     allcanvs delete all\n     set start {}\n@@ -616,13 +645,22 @@\n \tif {$nparents($id) > 2} {\n \t    set xt [expr {$xt + ($nparents($id) - 2) * $linespc}]\n \t}\n-\tif {[info exists idtags($id)] && $idtags($id) != {}} {\n+\tset marks {}\n+\tset ntags 0\n+\tif {[info exists idtags($id)]} {\n+\t    set marks $idtags($id)\n+\t    set ntags [llength $marks]\n+\t}\n+\tif {[info exists idheads($id)]} {\n+\t    set marks [concat $marks $idheads($id)]\n+\t}\n+\tif {$marks != {}} {\n \t    set delta [expr {int(0.5 * ($linespc - $lthickness))}]\n \t    set yt [expr $canvy - 0.5 * $linespc]\n \t    set yb [expr $yt + $linespc - 1]\n \t    set xvals {}\n \t    set wvals {}\n-\t    foreach tag $idtags($id) {\n+\t    foreach tag $marks {\n \t\tset wid [font measure $mainfont $tag]\n \t\tlappend xvals $xt\n \t\tlappend wvals $wid\n@@ -631,12 +669,20 @@\n \t    set t [$canv create line $x $canvy [lindex $xvals end] $canvy \\\n \t\t       -width $lthickness -fill black]\n \t    $canv lower $t\n-\t    foreach tag $idtags($id) x $xvals wid $wvals {\n+\t    foreach tag $marks x $xvals wid $wvals {\n \t\tset xl [expr $x + $delta]\n \t\tset xr [expr $x + $delta + $wid + $lthickness]\n-\t\t$canv create polygon $x [expr $yt + $delta] $xl $yt\\\n-\t\t    $xr $yt $xr $yb $xl $yb $x [expr $yb - $delta] \\\n-\t\t    -width 1 -outline black -fill yellow\n+\t\tif {[incr ntags -1] >= 0} {\n+\t\t    # draw a tag\n+\t\t    $canv create polygon $x [expr $yt + $delta] $xl $yt\\\n+\t\t\t$xr $yt $xr $yb $xl $yb $x [expr $yb - $delta] \\\n+\t\t\t-width 1 -outline black -fill yellow\n+\t\t} else {\n+\t\t    # draw a head\n+\t\t    set xl [expr $xl - $delta/2]\n+\t\t    $canv create polygon $x $yt $xr $yt $xr $yb $x $yb \\\n+\t\t\t-width 1 -outline black -fill green\n+\t\t}\n \t\t$canv create text $xl $canvy -anchor w -text $tag \\\n \t\t    -font $mainfont\n \t    }\n@@ -1334,7 +1380,8 @@\n set textfont {Courier 9}\n \n set colors {green red blue magenta darkgrey brown orange}\n-set colorbycommitter false\n+set colorbycommitter 0\n+set treemode 0\n \n catch {source ~/.gitk}\n \n@@ -1350,6 +1397,7 @@\n \t\"^-b\" { set boldnames 1 }\n \t\"^-c\" { set colorbycommitter 1 }\n \t\"^-d\" { set datemode 1 }\n+\t\"^-t\" { set treemode 1 }\n \tdefault {\n \t    lappend revtreeargs $arg\n \t}\n"},{"id":"4786","messageId":"Pine.LNX.4.58.0506090721450.2286@ppc970.osdl.org","threadId":"791","inReplyTo":"17063.51611.467615.685723@cargo.ozlabs.ibm.com","subject":"Re: gitk-1.1 out","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-06-09T14:22:07Z","receivedAt":"2005-06-09T14:22:07Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 9 Jun 2005, Paul Mackerras wrote:\n> \n> > I realize that that may sound silly, but a tree that has many branches can \n> > validly be used with gitk with something like this:\n> > \n> > \tgitk $(ls .git/refs/heads)\n> \n> Um, did I break that when I changed to using git-rev-list instead of\n> git-rev-tree?\n\nNo, I fixed git-rev-list to do multiple heads.\n\n\t\tLinus\n"},{"id":"4788","messageId":"Pine.LNX.4.58.0506090728280.2286@ppc970.osdl.org","threadId":"791","inReplyTo":"17064.15104.847009.390149@cargo.ozlabs.ibm.com","subject":"Re: gitk-1.1 out","fromName":"Linus Torvalds","fromEmail":"torvalds@osdl.org","sentAt":"2005-06-09T14:58:36Z","receivedAt":"2005-06-09T14:58:36Z","isPatch":false,"sender":{"key":"torvalds@linux-foundation.org","avatar":"https://avatars.githubusercontent.com/u/1024025?v=4"},"body":"\n\nOn Thu, 9 Jun 2005, Paul Mackerras wrote:\n> \n> Try this patch against gitk-1.1 and let me know what you think.  I\n> draw the heads as a green rectangle with a black border.\n\nWorks for me. My cvs-import testing \"syslinux\" tree now has the heads of\nthe different branches nicely named.\n\nHowever, I also changed it to allow the \"direct\" kinds of tags which the \ncvs2git thing creates, where the tag file contains just a direct pointer \nto the commit, rather than a pointer to a tag object.\n\nI'm not a TCL weenie, so this is just a very quick hack, and you may want \nto re-do things properly, but something like the appended works for me..\n\n> I also added a -t option to gitk which makes it use gitk-rev-tree\n> instead of git-rev-list, so that you can do\n> \n> \tgitk -t $(ls .git/refs/heads)\n\nNo need, I think yoy may have an old version of git.\n\n\t\tLinus\n\n--- hacky hack hack ---\n--- gitk\t2005-06-09 07:26:50.000000000 -0700\n+++ gitk\t2005-06-09 07:55:00.000000000 -0700\n@@ -151,6 +151,11 @@\n \t    set fd [open $f r]\n \t    set line [read $fd]\n \t    if {[regexp {^[0-9a-f]{40}} $line id]} {\n+\t\tif {[regexp {[^/]*$} $f direct]} {\n+\t\t    set tagids($direct) $id\n+\t\t    lappend idtags($id) $direct\n+\t\t}\n+\n \t\tset contents [split [exec git-cat-file tag $id] \"\\n\"]\n \t\tset obj {}\n \t\tset type {}\n"},{"id":"4821","messageId":"17065.25539.657361.964397@cargo.ozlabs.ibm.com","threadId":"791","inReplyTo":"Pine.LNX.4.58.0506090728280.2286@ppc970.osdl.org","subject":"Re: gitk-1.1 out","fromName":"Paul Mackerras","fromEmail":"paulus@samba.org","sentAt":"2005-06-10T09:56:19Z","receivedAt":"2005-06-10T09:56:19Z","isPatch":false,"sender":{"key":"paulus@samba.org","avatar":"https://avatars.githubusercontent.com/u/1606439?v=4"},"body":"Linus Torvalds writes:\n\n> However, I also changed it to allow the \"direct\" kinds of tags which the \n> cvs2git thing creates, where the tag file contains just a direct pointer \n> to the commit, rather than a pointer to a tag object.\n> \n> I'm not a TCL weenie, so this is just a very quick hack, and you may want \n> to re-do things properly, but something like the appended works for me..\n\nI'll use file tail instead of regexp, but apart from that it looks\nfine.\n\n> > I also added a -t option to gitk which makes it use gitk-rev-tree\n> > instead of git-rev-list, so that you can do\n> > \n> > \tgitk -t $(ls .git/refs/heads)\n> \n> No need, I think yoy may have an old version of git.\n\nAh yes, I did.  I'll take the -t option out then.\n\nPaul.\n"}]}