X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=blobdiff_plain;f=git-gui.sh;h=0096f4913aa03bada1cfde879478926c5fe9ec06;hb=f8186e92e3399ddd742f2397e802467cabf2849f;hp=3237f3d59627d60e3d5ac18ee588a61b0ce87576;hpb=fe813d4e80426971ce17f6ea03f97bc1e26383a1;p=git.git diff --git a/git-gui.sh b/git-gui.sh index 3237f3d59..0096f4913 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -1,6 +1,12 @@ #!/bin/sh # Tcl ignores the next line -*- tcl -*- \ -exec wish "$0" -- "$@" + if test "z$*" = zversion \ + || test "z$*" = z--version; \ + then \ + echo 'git-gui version @@GITGUI_VERSION@@'; \ + exit; \ + fi; \ + exec wish "$0" -- "$@" set appvers {@@GITGUI_VERSION@@} set copyright { @@ -302,11 +308,6 @@ proc tk_optionMenu {w varName args} { ## ## version check -if {{--version} eq $argv || {version} eq $argv} { - puts "git-gui version $appvers" - exit -} - set req_maj 1 set req_min 5 @@ -1064,15 +1065,17 @@ proc do_gitk {revs} { # lets us bypass using shell process on Windows systems. # set cmd [list [info nameofexecutable]] - lappend cmd [gitexec gitk] + set exe [gitexec gitk] + lappend cmd $exe if {$revs ne {}} { append cmd { } append cmd $revs } - if {[catch {eval exec $cmd &} err]} { - error_popup "Failed to start gitk:\n\n$err" + if {! [file exists $exe]} { + error_popup "Unable to start gitk:\n\n$exe does not exist" } else { + eval exec $cmd & set ui_status_value $starting_gitk_msg after 10000 { if {$ui_status_value eq $starting_gitk_msg} { @@ -1556,7 +1559,8 @@ if {[is_enabled transport]} { menu .mbar.push .mbar.push add command -label {Push...} \ - -command do_push_anywhere + -command do_push_anywhere \ + -accelerator $M1T-P .mbar.push add command -label {Delete...} \ -command remote_branch_delete::dialog } @@ -1580,8 +1584,7 @@ if {[is_MacOSX]} { # -- Tools Menu # - if {[file exists /usr/local/miga/lib/gui-miga] - && [file exists .pvcsrc]} { + if {[is_Cygwin] && [file exists /usr/local/miga/lib/gui-miga]} { proc do_miga {} { global ui_status_value if {![lock_index update]} return @@ -1847,6 +1850,10 @@ pack .vpane.lower.commarea.buttons.commit -side top -fill x lappend disable_on_lock \ {.vpane.lower.commarea.buttons.commit conf -state} +button .vpane.lower.commarea.buttons.push -text {Push} \ + -command do_push_anywhere +pack .vpane.lower.commarea.buttons.push -side top -fill x + # -- Commit Message Buffer # frame .vpane.lower.commarea.buffer @@ -2174,10 +2181,14 @@ if {[is_enabled branch]} { bind . <$M1B-Key-n> do_create_branch bind . <$M1B-Key-N> do_create_branch } +if {[is_enabled transport]} { + bind . <$M1B-Key-p> do_push_anywhere + bind . <$M1B-Key-P> do_push_anywhere +} -bind all do_rescan -bind all <$M1B-Key-r> do_rescan -bind all <$M1B-Key-R> do_rescan +bind . do_rescan +bind . <$M1B-Key-r> do_rescan +bind . <$M1B-Key-R> do_rescan bind . <$M1B-Key-s> do_signoff bind . <$M1B-Key-S> do_signoff bind . <$M1B-Key-i> do_add_all