##// END OF EJS Templates
hgk: use switch instead of a less efficient if/elseif/if
Andrew Shadura -
r24531:18ee81b3 default
parent child Browse files
Show More
@@ -375,25 +375,25 b' proc parsecommit {id contents listed old'
375 set inhdr 0
375 set inhdr 0
376 } else {
376 } else {
377 set tag [lindex $line 0]
377 set tag [lindex $line 0]
378 if {$tag == "author"} {
378 switch -- $tag "author" {
379 set x [expr {[llength $line] - 2}]
379 set x [expr {[llength $line] - 2}]
380 set audate [lindex $line $x]
380 set audate [lindex $line $x]
381 set auname [join [lrange $line 1 [expr {$x - 1}]]]
381 set auname [join [lrange $line 1 [expr {$x - 1}]]]
382 } elseif {$tag == "committer"} {
382 } "committer" {
383 set x [expr {[llength $line] - 2}]
383 set x [expr {[llength $line] - 2}]
384 set comdate [lindex $line $x]
384 set comdate [lindex $line $x]
385 set comname [join [lrange $line 1 [expr {$x - 1}]]]
385 set comname [join [lrange $line 1 [expr {$x - 1}]]]
386 } elseif {$tag == "revision"} {
386 } "revision" {
387 set rev [lindex $line 1]
387 set rev [lindex $line 1]
388 } elseif {$tag == "branch"} {
388 } "branch" {
389 set branch [join [lrange $line 1 end]]
389 set branch [join [lrange $line 1 end]]
390 } elseif {$tag == "bookmark"} {
390 } "bookmark" {
391 set bookmark [join [lrange $line 1 end]]
391 set bookmark [join [lrange $line 1 end]]
392 } elseif {$tag == "obsolete"} {
392 } "obsolete" {
393 set obsolete($id) ""
393 set obsolete($id) ""
394 } elseif {$tag == "phase"} {
394 } "phase" {
395 set phase [lindex $line 1 end]
395 set phase [lindex $line 1 end]
396 }
396 }
397 }
397 }
398 } else {
398 } else {
399 if {$comment == {}} {
399 if {$comment == {}} {
General Comments 0
You need to be logged in to leave comments. Login now