diff options
author | Shawn O. Pearce <spearce@spearce.org> | 2007-07-04 16:38:13 -0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2007-07-08 21:12:52 -0400 |
commit | 7618e6b1c1676dfdc2cc4c8af9e259c3e885825f (patch) | |
tree | fb155bcc49cb81bbcf7d4a98861ff2a5432783aa /lib/branch_create.tcl | |
parent | 774173aa5f24023a82ce79f2a71fe3f664b747ad (diff) | |
download | git-7618e6b1c1676dfdc2cc4c8af9e259c3e885825f.tar.gz |
git-gui: Enhance choose_rev to handle hundreds of branches
One of my production repositories has hundreds of remote tracking
branches. Trying to navigate these through a popup menu is just
not possible. The list is far larger than the screen and it does
not scroll fast enough to efficiently select a branch name when
trying to create a branch or delete a branch.
This is major rewrite of the revision chooser mega-widget. We
now use a single listbox for all three major types of named refs
(heads, tracking branches, tags) and a radio button group to pick
which of those namespaces should be shown in the listbox. A filter
field is shown to the right allowing the end-user to key in a glob
specification to filter the list they are viewing. The filter is
always taken as substring, so we assume * both starts and ends the
pattern the user wanted but otherwise treat it as a glob pattern.
This new picker works out really nicely. What used to take me at
least a minute to find and select a branch now takes mere seconds.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'lib/branch_create.tcl')
-rw-r--r-- | lib/branch_create.tcl | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/lib/branch_create.tcl b/lib/branch_create.tcl index 0272d6f024..375f575eaf 100644 --- a/lib/branch_create.tcl +++ b/lib/branch_create.tcl @@ -63,7 +63,7 @@ constructor dialog {} { pack $w.desc -anchor nw -fill x -pady 5 -padx 5 set w_rev [::choose_rev::new $w.rev {Starting Revision}] - pack $w.rev -anchor nw -fill x -pady 5 -padx 5 + pack $w.rev -anchor nw -fill both -expand 1 -pady 5 -padx 5 labelframe $w.options -text {Options} @@ -170,13 +170,7 @@ method _create {} { return } - if {[catch {set new [$w_rev get_commit]}]} { - tk_messageBox \ - -icon error \ - -type ok \ - -title [wm title $w] \ - -parent $w \ - -message "Invalid revision: [$w_rev get]" + if {[catch {set new [$w_rev commit_or_die]}]} { return } |