##// END OF EJS Templates
hgk: Display branch name for each head (issue 740)...
Michael Sommerville -
r7039:aafe12bd default
parent child Browse files
Show More
@@ -370,6 +370,25 b' proc readrefs {} {'
370 lappend tagids($direct) $tag
370 lappend tagids($direct) $tag
371 lappend idtags($tag) $direct
371 lappend idtags($tag) $direct
372 }
372 }
373
374 set status [catch {exec $env(HG) --config ui.report_untrusted=false heads} heads]
375 if { $status != 0 } {
376 puts $::errorInfo
377 if { ![string equal $::errorCode NONE] } {
378 exit 2
379 }
380 }
381 regsub -all "\r\n" $heads "\n" heads
382
383 set lines [split $heads "\n"]
384 foreach f $lines {
385 set match ""
386 regexp {changeset:\s+(\S+):(\S+)$} $f match id sha
387 if {$match != ""} {
388 lappend idheads($sha) $id
389 }
390 }
391
373 }
392 }
374
393
375 proc readotherrefs {base dname excl} {
394 proc readotherrefs {base dname excl} {
@@ -1045,7 +1064,7 b' proc drawcommitline {level} {'
1045 }
1064 }
1046
1065
1047 proc drawtags {id x xt y1} {
1066 proc drawtags {id x xt y1} {
1048 global idtags idheads idotherrefs
1067 global idtags idheads idotherrefs commitinfo
1049 global linespc lthickness
1068 global linespc lthickness
1050 global canv mainfont idline rowtextx
1069 global canv mainfont idline rowtextx
1051
1070
@@ -1057,8 +1076,11 b' proc drawtags {id x xt y1} {'
1057 set ntags [llength $marks]
1076 set ntags [llength $marks]
1058 }
1077 }
1059 if {[info exists idheads($id)]} {
1078 if {[info exists idheads($id)]} {
1060 set marks [concat $marks $idheads($id)]
1079 set headmark [lindex $commitinfo($id) 7]
1061 set nheads [llength $idheads($id)]
1080 if {$headmark ne "default"} {
1081 lappend marks $headmark
1082 set nheads 1
1083 }
1062 }
1084 }
1063 if {[info exists idotherrefs($id)]} {
1085 if {[info exists idotherrefs($id)]} {
1064 set marks [concat $marks $idotherrefs($id)]
1086 set marks [concat $marks $idotherrefs($id)]
General Comments 0
You need to be logged in to leave comments. Login now