This turns out to be slightly simpler and faster, and will make
things a little easier when we do multiple view support.
Signed-off-by: Paul Mackerras <paulus@samba.org>
proc start_rev_list {rlargs} {
global startmsecs nextupdate ncmupdate
global commfd leftover tclencoding datemode
proc start_rev_list {rlargs} {
global startmsecs nextupdate ncmupdate
global commfd leftover tclencoding datemode
set startmsecs [clock clicks -milliseconds]
set nextupdate [expr {$startmsecs + 100}]
set startmsecs [clock clicks -milliseconds]
set nextupdate [expr {$startmsecs + 100}]
fconfigure $commfd -blocking 0 -translation lf
if {$tclencoding != {}} {
fconfigure $commfd -encoding $tclencoding
fconfigure $commfd -blocking 0 -translation lf
if {$tclencoding != {}} {
fconfigure $commfd -encoding $tclencoding
set id [lindex $ids 0]
set olds [lrange $ids 1 end]
set commitlisted($id) 1
set id [lindex $ids 0]
set olds [lrange $ids 1 end]
set commitlisted($id) 1
- updatechildren $id [lrange $ids 1 end]
- lappend commitdata [string range $cmit [expr {$j + 1}] end]
+ updatechildren $id $olds
+ set commitdata($id) [string range $cmit [expr {$j + 1}] end]
set commitrow($id) $commitidx
incr commitidx
lappend displayorder $id
set commitrow($id) $commitidx
incr commitidx
lappend displayorder $id
$comname $comdate $comment]
}
$comname $comdate $comment]
}
-proc getcommit {id {row {}}} {
- global commitdata commitrow commitinfo nparents
+proc getcommit {id} {
+ global commitdata commitinfo nparents
- if {$row eq {}} {
- if {![info exists commitrow($id)]} {return 0}
- set row $commitrow($id)
- }
- if {$row < [llength $commitdata]} {
- parsecommit $id [lindex $commitdata $row] 1
+ if {[info exists commitdata($id)]} {
+ parsecommit $id $commitdata($id) 1
} else {
readcommit $id
if {![info exists commitinfo($id)]} {
} else {
readcommit $id
if {![info exists commitinfo($id)]} {
global displayorder rowidlist
global idrowranges idrangedrawn iddrawn
global commitinfo commitlisted parents numcommits
global displayorder rowidlist
global idrowranges idrangedrawn iddrawn
global commitinfo commitlisted parents numcommits
if {$row >= $numcommits} return
foreach id [lindex $rowidlist $row] {
if {$row >= $numcommits} return
foreach id [lindex $rowidlist $row] {
return
}
if {![info exists commitinfo($id)]} {
return
}
if {![info exists commitinfo($id)]} {
}
assigncolor $id
if {[info exists commitlisted($id)] && [info exists parents($id)]
}
assigncolor $id
if {[info exists commitlisted($id)] && [info exists parents($id)]
set didsel 0
set fldtypes {Headline Author Date Committer CDate Comment}
set l -1
set didsel 0
set fldtypes {Headline Author Date Committer CDate Comment}
set l -1
- foreach d $commitdata {
+ foreach id $displayorder {
+ set d $commitdata($id)
incr l
if {$findtype == "Regexp"} {
set doesmatch [regexp $foundstring $d]
incr l
if {$findtype == "Regexp"} {
set doesmatch [regexp $foundstring $d]
set doesmatch [string match $matchstring $d]
}
if {!$doesmatch} continue
set doesmatch [string match $matchstring $d]
}
if {!$doesmatch} continue
- set id [lindex $displayorder $l]
if {![info exists commitinfo($id)]} {
if {![info exists commitinfo($id)]} {
}
set info $commitinfo($id)
set doesmatch 0
}
set info $commitinfo($id)
set doesmatch 0