- if {$all_heads ne {}} {
- set c_head $current_branch
- radiobutton $w.head_r \
- -text {Local Branch:} \
- -value head \
- -variable @revtype
- eval tk_optionMenu $w.head_m @c_head $all_heads
- grid $w.head_r $w.head_m -sticky w
- if {$revtype eq {}} {
- set revtype head
- }
- trace add variable @c_head write [cb _select head]
- }
-
- set trck_list [all_tracking_branches]
- if {$trck_list ne {}} {
- set nam [list]
- foreach spec $trck_list {
- set txt [lindex $spec 0]
- regsub ^refs/(heads/|remotes/)? $txt {} txt
- set trck_spec($txt) $spec
- lappend nam $txt
- }
- set nam [lsort -unique $nam]
-
- radiobutton $w.trck_r \
- -text {Tracking Branch:} \
- -value trck \
- -variable @revtype
- eval tk_optionMenu $w.trck_m @c_trck $nam
- grid $w.trck_r $w.trck_m -sticky w
-
- set c_trck [lindex $nam 0]
- if {$revtype eq {}} {
- set revtype trck
- }
- trace add variable @c_trck write [cb _select trck]
- unset nam spec txt
- }
-
- set all_tags [load_all_tags]
- if {$all_tags ne {}} {
- set c_tag [lindex $all_tags 0]
- radiobutton $w.tag_r \
- -text {Tag:} \
- -value tag \
- -variable @revtype
- eval tk_optionMenu $w.tag_m @c_tag $all_tags
- grid $w.tag_r $w.tag_m -sticky w
- if {$revtype eq {}} {
- set revtype tag
- }
- trace add variable @c_tag write [cb _select tag]
- }
-