Mercurial > hg
comparison contrib/hgk @ 24530:2ace3b77aaef
hgk: set distinct fill and outline colour for non-public and obsolete changesets
author | Andrew Shadura <andrew@shadura.me> |
---|---|
date | Sun, 29 Mar 2015 19:12:08 +0200 |
parents | 14873da80bc1 |
children | 18ee81b37928 |
comparison
equal
deleted
inserted
replaced
24529:14873da80bc1 | 24530:2ace3b77aaef |
---|---|
1150 set id [lindex $displist $level] | 1150 set id [lindex $displist $level] |
1151 set lastuse($id) $lineno | 1151 set lastuse($id) $lineno |
1152 set lineid($lineno) $id | 1152 set lineid($lineno) $id |
1153 set idline($id) $lineno | 1153 set idline($id) $lineno |
1154 set shape oval | 1154 set shape oval |
1155 set ofill [expr {[info exists commitlisted($id)]? "blue": "white"}] | 1155 set outline #000080 |
1156 set ofill [expr {[info exists commitlisted($id)]? "#7f7fff": "white"}] | |
1156 if {![info exists commitinfo($id)]} { | 1157 if {![info exists commitinfo($id)]} { |
1157 readcommit $id | 1158 readcommit $id |
1158 if {![info exists commitinfo($id)]} { | 1159 if {![info exists commitinfo($id)]} { |
1159 set commitinfo($id) {"No commit information available"} | 1160 set commitinfo($id) {"No commit information available"} |
1160 set nparents($id) 0 | 1161 set nparents($id) 0 |
1161 } | 1162 } |
1162 } else { | 1163 } else { |
1163 if {[lindex $commitinfo($id) 9] eq "secret"} { | 1164 switch [lindex $commitinfo($id) 9] secret { |
1164 set shape rect | 1165 set shape rect |
1166 } public { | |
1167 set outline black | |
1168 set ofill blue | |
1165 } | 1169 } |
1166 } | 1170 } |
1167 if {[info exists obsolete($id)]} { | 1171 if {[info exists obsolete($id)]} { |
1168 set ofill darkgrey | 1172 set outline darkgrey |
1173 set ofill lightgrey | |
1169 } | 1174 } |
1170 assigncolor $id | 1175 assigncolor $id |
1171 set currentparents {} | 1176 set currentparents {} |
1172 set dupparents {} | 1177 set dupparents {} |
1173 if {[info exists commitlisted($id)] && [info exists parents($id)]} { | 1178 if {[info exists commitlisted($id)] && [info exists parents($id)]} { |
1193 } | 1198 } |
1194 drawlines $id 0 | 1199 drawlines $id 0 |
1195 set orad [expr {$linespc / 3}] | 1200 set orad [expr {$linespc / 3}] |
1196 set t [$canv create $shape [expr $x - $orad] [expr $y1 - $orad] \ | 1201 set t [$canv create $shape [expr $x - $orad] [expr $y1 - $orad] \ |
1197 [expr $x + $orad - 1] [expr $y1 + $orad - 1] \ | 1202 [expr $x + $orad - 1] [expr $y1 + $orad - 1] \ |
1198 -fill $ofill -outline black -width 1] | 1203 -fill $ofill -outline $outline -width 1] |
1199 $canv raise $t | 1204 $canv raise $t |
1200 $canv bind $t <1> {selcanvline {} %x %y} | 1205 $canv bind $t <1> {selcanvline {} %x %y} |
1201 set xt [xcoord [llength $displist] $level $lineno] | 1206 set xt [xcoord [llength $displist] $level $lineno] |
1202 if {[llength $currentparents] > 2} { | 1207 if {[llength $currentparents] > 2} { |
1203 set xt [expr {$xt + ([llength $currentparents] - 2) * $linespc}] | 1208 set xt [expr {$xt + ([llength $currentparents] - 2) * $linespc}] |