Linus Torvalds <torvalds@xxxxxxxxxxxxxxxxxxxx> writes: >> and have the commits colored appropriately. That would be cool, but it >> might need more tcl/tk knowledge than I actually possess). > > Ok, that turned out to be the case. > > Here's an updated patch to gitk, which at least *parses* the > "--left-right" data properly, it just doesn't use it. This on top of yours makes it use it. gitk | 31 ++++++++++++++++++++++++++----- 1 files changed, 26 insertions(+), 5 deletions(-) diff --git a/gitk b/gitk index 0bf00ee..a6e762d 100755 --- a/gitk +++ b/gitk @@ -74,7 +74,7 @@ proc getcommits {} { proc getcommitlines {fd view} { global commitlisted nextupdate global leftover commfd - global displayorder commitidx commitrow commitdata + global displayorder commitidx commitrow commitdata commitside global parentlist childlist children curview hlview global vparentlist vchildlist vdisporder vcmitlisted @@ -178,6 +178,7 @@ proc getcommitlines {fd view} { } set commitdata($id) [string range $cmit [expr {$j + 1}] end] set commitrow($view,$id) $commitidx($view) + set commitside($id) $leftright incr commitidx($view) if {$view == $curview} { lappend parentlist $olds @@ -2986,7 +2987,7 @@ proc drawlines {id} { proc drawcmittext {id row col rmx} { global linespc canv canv2 canv3 canvy0 fgcolor - global commitlisted commitinfo rowidlist + global commitlisted commitinfo commitside rowidlist global rowtextx idpos idtags idheads idotherrefs global linehtag linentag linedtag global mainfont canvxmax boldrows boldnamerows fgcolor @@ -2995,9 +2996,29 @@ proc drawcmittext {id row col rmx} { set x [xc $row $col] set y [yc $row] set orad [expr {$linespc / 3}] - set t [$canv create oval [expr {$x - $orad}] [expr {$y - $orad}] \ - [expr {$x + $orad - 1}] [expr {$y + $orad - 1}] \ - -fill $ofill -outline $fgcolor -width 1 -tags circle] + + if {[info exists commitside($id)]} { + set leftright $commitside($id) + } else { + set leftright 0 + } + if {$leftright == 0} { + set t [$canv create oval [expr {$x - $orad}] [expr {$y - $orad}] \ + [expr {$x + $orad - 1}] [expr {$y + $orad - 1}] \ + -fill $ofill -outline $fgcolor -width 1 -tags circle] + } elseif {$leftright < 0} { + set t [$canv create polygon \ + [expr {$x - $orad}] $y \ + [expr {$x + $orad - 1}] [expr {$y - $orad}] \ + [expr {$x + $orad - 1}] [expr {$y + $orad - 1}] \ + -fill $ofill -outline $fgcolor -width 1 -tags circle] + } else { + set t [$canv create polygon \ + [expr {$x + $orad - 1}] $y \ + [expr {$x - $orad}] [expr {$y - $orad}] \ + [expr {$x - $orad}] [expr {$y + $orad - 1}] \ + -fill $ofill -outline $fgcolor -width 1 -tags circle] + } $canv raise $t $canv bind $t <1> {selcanvline {} %x %y} set xt [xc $row [llength [lindex $rowidlist $row]]] - To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html