+ }
+ }
+}
+
+proc finishcommits {} {
+ global phase
+ global startcommits
+
+ if {$phase != "incrdraw"} {
+ $canv delete all
+ $canv create text 3 3 -anchor nw -text "No commits selected" \
+ -font $mainfont -tags textitems
+ set phase {}
+ return
+ }
+ drawslants
+ set level [decidenext]
+ drawrest $level [llength $startcommits]
+}
+
+proc drawgraph {} {
+ global nextupdate startmsecs startcommits todo
+
+ if {$startcommits == {}} return
+ set startmsecs [clock clicks -milliseconds]
+ set nextupdate [expr $startmsecs + 100]
+ initgraph
+ set todo [lindex $startcommits 0]
+ drawrest 0 1
+}
+
+proc drawrest {level startix} {
+ global phase stopped redisplaying selectedline
+ global datemode currentparents todo
+ global numcommits
+ global nextupdate startmsecs startcommits idline
+
+ set phase drawgraph
+ set startid [lindex $startcommits $startix]
+ set startline -1
+ if {$startid != {}} {
+ set startline $idline($startid)
+ }
+ while 1 {
+ if {$stopped} break
+ drawcommitline $level
+ set hard [updatetodo $level $datemode]
+ if {$numcommits == $startline} {
+ lappend todo $startid
+ set hard 1
+ incr startix
+ set startid [lindex $startcommits $startix]
+ set startline -1
+ if {$startid != {}} {
+ set startline $idline($startid)