Mercurial > hg
comparison contrib/hgk @ 5859:e0f86c1e3ae5
hgk: display branch name in diff header
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Tue, 15 Jan 2008 13:46:32 +0100 |
parents | ab5a455cb67c |
children | 942287cb1f57 |
comparison
equal
deleted
inserted
replaced
5855:a6ccb957fd07 | 5859:e0f86c1e3ae5 |
---|---|
272 set auname {} | 272 set auname {} |
273 set audate {} | 273 set audate {} |
274 set comname {} | 274 set comname {} |
275 set comdate {} | 275 set comdate {} |
276 set rev {} | 276 set rev {} |
277 set branch {} | |
277 if {![info exists nchildren($id)]} { | 278 if {![info exists nchildren($id)]} { |
278 set children($id) {} | 279 set children($id) {} |
279 set nchildren($id) 0 | 280 set nchildren($id) 0 |
280 set ncleft($id) 0 | 281 set ncleft($id) 0 |
281 } | 282 } |
308 set x [expr {[llength $line] - 2}] | 309 set x [expr {[llength $line] - 2}] |
309 set comdate [lindex $line $x] | 310 set comdate [lindex $line $x] |
310 set comname [join [lrange $line 1 [expr {$x - 1}]]] | 311 set comname [join [lrange $line 1 [expr {$x - 1}]]] |
311 } elseif {$tag == "revision"} { | 312 } elseif {$tag == "revision"} { |
312 set rev [lindex $line 1] | 313 set rev [lindex $line 1] |
314 } elseif {$tag == "branch"} { | |
315 set branch [join [lrange $line 1 end]] | |
313 } | 316 } |
314 } | 317 } |
315 } else { | 318 } else { |
316 if {$comment == {}} { | 319 if {$comment == {}} { |
317 set headline [string trim $line] | 320 set headline [string trim $line] |
332 if {$comdate != {}} { | 335 if {$comdate != {}} { |
333 set cdate($id) $comdate | 336 set cdate($id) $comdate |
334 set comdate [clock format $comdate -format "%Y-%m-%d %H:%M:%S"] | 337 set comdate [clock format $comdate -format "%Y-%m-%d %H:%M:%S"] |
335 } | 338 } |
336 set commitinfo($id) [list $headline $auname $audate \ | 339 set commitinfo($id) [list $headline $auname $audate \ |
337 $comname $comdate $comment $rev] | 340 $comname $comdate $comment $rev $branch] |
338 } | 341 } |
339 | 342 |
340 proc readrefs {} { | 343 proc readrefs {} { |
341 global tagids idtags headids idheads tagcontents env curid | 344 global tagids idtags headids idheads tagcontents env curid |
342 | 345 |
2284 set linknum 0 | 2287 set linknum 0 |
2285 $ctext mark set fmark.0 0.0 | 2288 $ctext mark set fmark.0 0.0 |
2286 $ctext mark gravity fmark.0 left | 2289 $ctext mark gravity fmark.0 left |
2287 set info $commitinfo($id) | 2290 set info $commitinfo($id) |
2288 $ctext insert end "Revision: [lindex $info 6]\n" | 2291 $ctext insert end "Revision: [lindex $info 6]\n" |
2292 if {[llength [lindex $info 7]] > 0} { | |
2293 $ctext insert end "Branch: [lindex $info 7]\n" | |
2294 } | |
2289 $ctext insert end "Author: [lindex $info 1] [lindex $info 2]\n" | 2295 $ctext insert end "Author: [lindex $info 1] [lindex $info 2]\n" |
2290 $ctext insert end "Committer: [lindex $info 3] [lindex $info 4]\n" | 2296 $ctext insert end "Committer: [lindex $info 3] [lindex $info 4]\n" |
2291 if {[info exists idtags($id)]} { | 2297 if {[info exists idtags($id)]} { |
2292 $ctext insert end "Tags:" | 2298 $ctext insert end "Tags:" |
2293 foreach tag $idtags($id) { | 2299 foreach tag $idtags($id) { |