summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: e2ede2b)
raw | patch | inline | side by side (parent: e2ede2b)
author | Paul Mackerras <paulus@samba.org> | |
Mon, 27 Jun 2005 03:38:29 +0000 (13:38 +1000) | ||
committer | Paul Mackerras <paulus@samba.org> | |
Mon, 27 Jun 2005 03:38:29 +0000 (13:38 +1000) |
I had code in there to put "No commits selected" on the canvas
but it needed some globals.
but it needed some globals.
gitk | patch | blob | history |
index b44144870d5dc9836b225dfdd8553c0effeec43e..fc763ba9c8d2af94003f99abf8f92e2f43698d23 100755 (executable)
--- a/gitk
+++ b/gitk
}
}
-proc decidenext {} {
+proc decidenext {{noread 0}} {
global parents children nchildren ncleft todo
global canv canv2 canv3 mainfont namefont canvx0 canvy linespc
global datemode cdate
- global lineid linehtag linentag linedtag commitinfo
+ global commitinfo
global currentparents oldlevel oldnlines oldtodo
global lineno lthickness
set p [lindex $todo $k]
if {$ncleft($p) == 0} {
if {$datemode} {
+ if {![info exists commitinfo($p)]} {
+ if {$noread} {
+ return {}
+ }
+ readcommit $p
+ }
if {$latest == {} || $cdate($p) > $latest} {
set level $k
set latest $cdate($p)
lappend todo $id
lappend startcommits $id
}
- set level [decidenext]
- if {$id != [lindex $todo $level]} {
+ set level [decidenext 1]
+ if {$level == {} || $id != [lindex $todo $level]} {
return
}
while 1 {
drawslants
drawcommitline $level
if {[updatetodo $level $datemode]} {
- set level [decidenext]
+ set level [decidenext 1]
+ if {$level == {}} break
}
set id [lindex $todo $level]
if {![info exists commitlisted($id)]} {
proc finishcommits {} {
global phase
global startcommits
- global ctext maincursor textcursor
+ global canv mainfont ctext maincursor textcursor
if {$phase != "incrdraw"} {
$canv delete all
$canv create text 3 3 -anchor nw -text "No commits selected" \
-font $mainfont -tags textitems
set phase {}
- return
+ } else {
+ drawslants
+ set level [decidenext]
+ drawrest $level [llength $startcommits]
}
- drawslants
- set level [decidenext]
- drawrest $level [llength $startcommits]
. config -cursor $maincursor
$ctext config -cursor $textcursor
}