From 552ee61ece4dad7a42012d83a7271e4b5464cb2e Mon Sep 17 00:00:00 2001 From: Kirill Smelkov Date: Tue, 13 Nov 2012 16:30:17 +0400 Subject: git-gui: Fix parsing of Commit e3d06ca9 (git-gui: Detect full path when parsing arguments) broke git gui blame rev path-not-present-in-worktree in particular this does not work anymore: # in linux.git $ git gui blame 2bb8c26242c2393b097a993ffe9b003ec9b85395 drivers/net/sky2.c This patch restores the original functionality in this case. Acked-by: Andrew Wong Signed-off-by: Kirill Smelkov Signed-off-by: Pat Thoyts --- git-gui.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/git-gui.sh b/git-gui.sh index 89f636f496..e133331ef5 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -3015,6 +3015,7 @@ blame { if {$is_path} { if {$path ne {}} usage + set path [normalize_relpath $_prefix$a] break } elseif {$a eq {--}} { if {$path ne {}} { -- cgit v1.2.3 From ab571ef02f5fc0d08bf2dce4e455d324e40fb220 Mon Sep 17 00:00:00 2001 From: Grahack Date: Wed, 28 Nov 2012 15:49:43 +0100 Subject: =?UTF-8?q?French=20translation:=C2=A0copy=20->=20copie.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pat Thoyts --- po/fr.po | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/po/fr.po b/po/fr.po index 40441dbb0d..0aff18691d 100644 --- a/po/fr.po +++ b/po/fr.po @@ -1139,7 +1139,7 @@ msgstr "Standard (rapide, semi-redondant, liens durs)" #: lib/choose_repository.tcl:514 msgid "Full Copy (Slower, Redundant Backup)" -msgstr "Copy complète (plus lent, sauvegarde redondante)" +msgstr "Copie complète (plus lent, sauvegarde redondante)" #: lib/choose_repository.tcl:520 msgid "Shared (Fastest, Not Recommended, No Backup)" -- cgit v1.2.3 From 9f316463ba00576d6c848bf50194b72246e8f9ab Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Tue, 18 Dec 2012 19:47:20 +0100 Subject: Makefile: replace "echo 1>..." with "echo >..." This is clearer to many people this way. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano Signed-off-by: Pat Thoyts --- Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index e22ba5c321..e9c2bc347d 100644 --- a/Makefile +++ b/Makefile @@ -254,7 +254,7 @@ lib/tclIndex: $(ALL_LIBFILES) GIT-GUI-VARS auto_mkindex lib '*.tcl' \ | $(TCL_PATH) $(QUIET_2DEVNULL); then : ok; \ else \ - echo 1>&2 " * $(TCL_PATH) failed; using unoptimized loading"; \ + echo >&2 " * $(TCL_PATH) failed; using unoptimized loading"; \ rm -f $@ ; \ echo '# Autogenerated by git-gui Makefile' >$@ && \ echo >>$@ && \ @@ -274,8 +274,8 @@ TRACK_VARS = \ GIT-GUI-VARS: FORCE @VARS='$(TRACK_VARS)'; \ if test x"$$VARS" != x"`cat $@ 2>/dev/null`" ; then \ - echo 1>&2 " * new locations or Tcl/Tk interpreter"; \ - echo 1>$@ "$$VARS"; \ + echo >&2 " * new locations or Tcl/Tk interpreter"; \ + echo >$@ "$$VARS"; \ fi ifdef GITGUI_MACOSXAPP -- cgit v1.2.3 From 60468d6c893a6ad8795869d979a601e47cb90732 Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Fri, 22 Feb 2013 20:13:21 +0000 Subject: git-gui: fix the mergetool launcher for the Beyond Compare tool. When using Beyond Compare as the mergetool it fails to save the merged result correctly due to a quoting problem when executing the tool. This patch solves the quoting problem. Signed-off-by: Warren Falk Signed-off-by: Pat Thoyts --- lib/mergetool.tcl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/mergetool.tcl b/lib/mergetool.tcl index 3c8e73bceb..120bc4064b 100644 --- a/lib/mergetool.tcl +++ b/lib/mergetool.tcl @@ -189,9 +189,9 @@ proc merge_resolve_tool2 {} { } bc3 { if {$base_stage ne {}} { - set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" -mergeoutput="$MERGED"] + set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" "-mergeoutput=$MERGED"] } else { - set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" -mergeoutput="$MERGED"] + set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" "-mergeoutput=$MERGED"] } } ecmerge { -- cgit v1.2.3 From 1fcd24d04358ea10c296a414e2b93f3714adca4b Mon Sep 17 00:00:00 2001 From: Heiko Voigt Date: Thu, 9 May 2013 18:30:02 +0200 Subject: git-gui: allow "\ No newline at end of file" for linewise staging Counting of lines did not skip this line when generating the hunk header. Acked-by: Tobias Preuss Signed-off-by: Heiko Voigt Signed-off-by: Pat Thoyts --- lib/diff.tcl | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/diff.tcl b/lib/diff.tcl index ec4405567a..30d9a79776 100644 --- a/lib/diff.tcl +++ b/lib/diff.tcl @@ -764,8 +764,15 @@ proc apply_range_or_line {x y} { # context line set ln [$ui_diff get $i_l $next_l] set patch "$patch$pre_context$ln" - set n [expr $n+1] - set m [expr $m+1] + # Skip the "\ No newline at end of + # file". Depending on the locale setting + # we don't know what this line looks + # like exactly. The only thing we do + # know is that it starts with "\ " + if {![string match {\\ *} $ln]} { + set n [expr $n+1] + set m [expr $m+1] + } set pre_context {} } elseif {$c1 eq $to_context} { # turn change line into context line -- cgit v1.2.3 From ed05e9f6c027a23ce45bcdbac4196058ed5d0e07 Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Fri, 17 May 2013 10:51:01 +0100 Subject: git-gui: change dialog button positions for Windows to suit platform. On windows it is more common to have cancel furthest on the right. Signed-off-by: Pat Thoyts --- lib/choose_repository.tcl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/choose_repository.tcl b/lib/choose_repository.tcl index 657f7d5dc1..ee58981f53 100644 --- a/lib/choose_repository.tcl +++ b/lib/choose_repository.tcl @@ -286,7 +286,9 @@ method _next {action} { destroy $w_body if {![winfo exists $w_next]} { ${NS}::button $w_next -default active - pack $w_next -side right -padx 5 -before $w_quit + set pos -before + if {[tk windowingsystem] eq "win32"} { set pos -after } + pack $w_next -side right -padx 5 $pos $w_quit } _do_$action $this } -- cgit v1.2.3 From 7d2017e7738ace254d0b653ce844d07af8ecf026 Mon Sep 17 00:00:00 2001 From: Stefan Haller Date: Thu, 6 Jun 2013 10:17:47 +0200 Subject: git-gui: bring wish process to front on Mac On Mac OS X, any application that is started from the Terminal will open behind all running applications; as a work-around, manually bring ourselves to the front. (Stolen from gitk, commit 76bf6ff93e.) We do this as the very first thing, so that any message boxes that might pop up during the rest of the startup sequence are actually seen by the user. [PT: added catch and moved down to ensure Tk has been loaded] Signed-off-by: Stefan Haller Signed-off-by: Pat Thoyts --- git-gui.sh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/git-gui.sh b/git-gui.sh index e133331ef5..7031759751 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -135,6 +135,20 @@ proc strcat {args} { ::msgcat::mcload $oguimsg unset oguimsg +###################################################################### +## +## On Mac, bring the current Wish process window to front + +if {[tk windowingsystem] eq "aqua"} { + catch { + exec osascript -e [format { + tell application "System Events" + set frontmost of processes whose unix id is %d to true + end tell + } [pid]] + } +} + ###################################################################### ## ## read only globals -- cgit v1.2.3 From 2f38dd03fcefb7ad3a6db2703eeb6dd9b4fd34b6 Mon Sep 17 00:00:00 2001 From: John Keeping Date: Sat, 27 Apr 2013 14:24:16 +0100 Subject: git-gui: fix file name handling with non-empty prefix Commit e3d06ca (git-gui: Detect full path when parsing arguments - 2012-10-02) fixed the handling of absolute paths passed to the browser and blame subcommands by checking whether the file exists without the prefix before prepending the prefix and checking again. Since we have chdir'd to the top level of the working tree before doing this, this does not work if a file with the same name exists in a subdirectory and at the top level (for example Makefile in git.git's t/ directory). Instead of doing this, revert that patch and fix absolute path issue by using "file join" to prepend the prefix to the supplied path. This will correctly handle absolute paths by skipping the prefix in that case. Acked-by: Andrew Wong Signed-off-by: John Keeping Signed-off-by: Pat Thoyts --- git-gui.sh | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/git-gui.sh b/git-gui.sh index 7031759751..153f85da06 100755 --- a/git-gui.sh +++ b/git-gui.sh @@ -3017,19 +3017,11 @@ blame { set jump_spec {} set is_path 0 foreach a $argv { - if {[file exists $a]} { - if {$path ne {}} usage - set path [normalize_relpath $a] - break - } elseif {[file exists $_prefix$a]} { - if {$path ne {}} usage - set path [normalize_relpath $_prefix$a] - break - } + set p [file join $_prefix $a] - if {$is_path} { + if {$is_path || [file exists $p]} { if {$path ne {}} usage - set path [normalize_relpath $_prefix$a] + set path [normalize_relpath $p] break } elseif {$a eq {--}} { if {$path ne {}} { -- cgit v1.2.3 From 5c37033edf7963616038ff8b980047d5671e168e Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Sat, 15 Jun 2013 23:36:27 +0100 Subject: git-gui: avoid an error message when removing the last remote MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When the last remote is removed on a system that has tearoff menu items the code that adjusts the fetch and prune menus may raise an error when probing the menu entry for a non-existing -label option. Check the entry type to avoid this fault. Reported-by: Vedran Miletić Signed-off-by: Pat Thoyts --- lib/remote.tcl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/remote.tcl b/lib/remote.tcl index 5e4e7f4c83..4e5c784418 100644 --- a/lib/remote.tcl +++ b/lib/remote.tcl @@ -245,7 +245,8 @@ proc update_all_remotes_menu_entry {} { set prune_m $remote_m.prune if {$have_remote > 1} { make_sure_remote_submenues_exist $remote_m - if {[$fetch_m entrycget end -label] ne "All"} { + if {[$fetch_m type end] eq "command" \ + && [$fetch_m entrycget end -label] ne "All"} { $fetch_m insert end separator $fetch_m insert end command \ @@ -259,7 +260,8 @@ proc update_all_remotes_menu_entry {} { } } else { if {[winfo exists $fetch_m]} { - if {[$fetch_m entrycget end -label] eq "All"} { + if {[$fetch_m type end] eq "command" \ + && [$fetch_m entrycget end -label] eq "All"} { delete_from_menu $fetch_m end delete_from_menu $fetch_m end -- cgit v1.2.3 From 8a383db4b28059becc3ebfd1b402299e34c3151f Mon Sep 17 00:00:00 2001 From: Pat Thoyts Date: Sat, 15 Jun 2013 23:53:34 +0100 Subject: git-gui 0.18 Signed-off-by: Pat Thoyts --- GIT-VERSION-GEN | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/GIT-VERSION-GEN b/GIT-VERSION-GEN index 49b62ea6eb..0a1f8d4f8a 100755 --- a/GIT-VERSION-GEN +++ b/GIT-VERSION-GEN @@ -1,7 +1,7 @@ #!/bin/sh GVF=GIT-VERSION-FILE -DEF_VER=0.17.GITGUI +DEF_VER=0.18.GITGUI LF=' ' -- cgit v1.2.3