diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2008-08-31 00:59:47 +0400 |
---|---|---|
committer | Shawn O. Pearce <spearce@spearce.org> | 2008-09-04 21:28:55 -0700 |
commit | 48c74a58b129e7230d74b2fba5c2d29eaa1f11dc (patch) | |
tree | 2ce306d8612f2525dd215f0f8d0f7e0c78b01210 | |
parent | git-gui: Don't allow staging files with conflicts. (diff) | |
download | tgif-48c74a58b129e7230d74b2fba5c2d29eaa1f11dc.tar.xz |
git-gui: Support more merge tools.
Add native support for Araxis Merge, WinMerge and Perforce merge.
Custom merge tools are not implemented by mergetool.tcl; besides,
native support allows constructing the command lines in a more
intelligent way.
Signed-off-by: Alexander Gavrilov <angavrilov@gmail.com>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
-rw-r--r-- | lib/mergetool.tcl | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/mergetool.tcl b/lib/mergetool.tcl index ba9e8cee8c..5f3da1f623 100644 --- a/lib/mergetool.tcl +++ b/lib/mergetool.tcl @@ -131,6 +131,7 @@ proc merge_resolve_tool2 {} { if {$merge_tool_path eq {}} { switch -- $tool { emerge { set merge_tool_path "emacs" } + araxis { set merge_tool_path "compare" } default { set merge_tool_path $tool } } } @@ -210,6 +211,31 @@ proc merge_resolve_tool2 {} { "$LOCAL" "$REMOTE" "$basename"] } } + winmerge { + if {$base_stage ne {}} { + # This tool does not support 3-way merges. + # Use the 'conflict file' resolution feature instead. + set cmdline [list "$merge_tool_path" -e -ub "$MERGED"] + } else { + set cmdline [list "$merge_tool_path" -e -ub -wl \ + -dl "Theirs File" -dr "Mine File" "$REMOTE" "$LOCAL" "$MERGED"] + } + } + araxis { + if {$base_stage ne {}} { + set cmdline [list "$merge_tool_path" -wait -merge -3 -a1 \ + -title1:"'$MERGED (Base)'" -title2:"'$MERGED (Local)'" \ + -title3:"'$MERGED (Remote)'" \ + "$BASE" "$LOCAL" "$REMOTE" "$MERGED"] + } else { + set cmdline [list "$merge_tool_path" -wait -2 \ + -title1:"'$MERGED (Local)'" -title2:"'$MERGED (Remote)'" \ + "$LOCAL" "$REMOTE" "$MERGED"] + } + } + p4merge { + set cmdline [list "$merge_tool_path" "$BASE" "$REMOTE" "$LOCAL" "$MERGED"] + } vimdiff { error_popup [mc "Not a GUI merge tool: '%s'" $tool] return @@ -236,6 +262,7 @@ proc merge_tool_get_stages {target stages} { foreach fname $stages { if {$merge_stages($i) eq {}} { file delete $fname + catch { close [open $fname w] } } else { # A hack to support autocrlf properly git checkout-index -f --stage=$i -- $target |