summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6c87d60)
raw | patch | inline | side by side (parent: 6c87d60)
author | Paul Mackerras <paulus@samba.org> | |
Mon, 13 Aug 2007 04:52:00 +0000 (14:52 +1000) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Mon, 13 Aug 2007 04:52:00 +0000 (14:52 +1000) |
In fixing the "can't unset idinlist" error, I moved the setting of
idinlist into the loop that splits the parents into "new" parents
(i.e. those of which this is the first child) and "old" parents.
Unfortunately this is incorrect in the case where we hit the break
statement a few lines further down, since when we come back in,
we'll see idinlist($p) set for some parents that aren't in the list.
This fixes it by moving the loop that sets up newolds and oldolds
further down.
Signed-off-by: Paul Mackerras <paulus@samba.org>
idinlist into the loop that splits the parents into "new" parents
(i.e. those of which this is the first child) and "old" parents.
Unfortunately this is incorrect in the case where we hit the break
statement a few lines further down, since when we come back in,
we'll see idinlist($p) set for some parents that aren't in the list.
This fixes it by moving the loop that sets up newolds and oldolds
further down.
Signed-off-by: Paul Mackerras <paulus@samba.org>
gitk | patch | blob | history |
index 769c79ab07520d5bcdad9493ab383553d2031988..666a545751780a0d1e0a4c2136a28682e1e6eb8c 100755 (executable)
--- a/gitk
+++ b/gitk
set offs [lindex $rowoffsets $row]
while {$row < $endrow} {
set id [lindex $displayorder $row]
- set oldolds {}
- set newolds {}
+ set nev [expr {[llength $idlist] - $maxwidth + 1}]
foreach p [lindex $parentlist $row] {
- if {![info exists idinlist($p)]} {
- lappend newolds $p
- } elseif {!$idinlist($p)} {
- lappend oldolds $p
+ if {![info exists idinlist($p)] || !$idinlist($p)} {
+ incr nev
}
- set idinlist($p) 1
}
- set nev [expr {[llength $idlist] + [llength $newolds]
- + [llength $oldolds] - $maxwidth + 1}]
if {$nev > 0} {
if {!$last &&
$row + $uparrowlen + $mingaplen >= $commitidx($curview)} break
if {[incr nev -1] <= 0} break
continue
}
- set rowchk($id) [expr {$row + $r}]
+ set rowchk($i) [expr {$row + $r}]
}
}
lset rowidlist $row $idlist
lset rowoffsets $row $offs
}
+ set oldolds {}
+ set newolds {}
+ foreach p [lindex $parentlist $row] {
+ if {![info exists idinlist($p)]} {
+ lappend newolds $p
+ } elseif {!$idinlist($p)} {
+ lappend oldolds $p
+ }
+ set idinlist($p) 1
+ }
set col [lsearch -exact $idlist $id]
if {$col < 0} {
set col [llength $idlist]