From: Alexander Gavrilov <angavrilov@gmail.com>
To: git@vger.kernel.org
Cc: "Shawn O. Pearce" <spearce@spearce.org>
Subject: [PATCH (GIT-GUI) 4/8] git-gui: Support more merge tools.
Date: Sun, 31 Aug 2008 00:59:47 +0400 [thread overview]
Message-ID: <200808310059.47327.angavrilov@gmail.com> (raw)
In-Reply-To: <200808310056.51324.angavrilov@gmail.com>
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>
---
lib/mergetool.tcl | 27 +++++++++++++++++++++++++++
1 files changed, 27 insertions(+), 0 deletions(-)
diff --git a/lib/mergetool.tcl b/lib/mergetool.tcl
index ba9e8ce..5f3da1f 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
--
1.6.0.20.g6148bc
next prev parent reply other threads:[~2008-08-30 21:16 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-30 20:52 [PATCH (GIT-GUI) 0/8] Add mergetool functionality to git-gui Alexander Gavrilov
2008-08-30 20:54 ` [PATCH (GIT-GUI) 1/8] git-gui: Don't allow staging files with conflicts Alexander Gavrilov
2008-08-30 20:55 ` [PATCH (GIT-GUI) 2/8] git-gui: Support resolving conflicts via the diff context menu Alexander Gavrilov
2008-08-30 20:56 ` [PATCH (GIT-GUI) 3/8] git-gui: Support calling merge tools Alexander Gavrilov
2008-08-30 20:59 ` Alexander Gavrilov [this message]
2008-08-30 21:00 ` [PATCH (GIT-GUI) 5/8] git-gui: Support conflict states _U & UT Alexander Gavrilov
2008-08-30 21:02 ` [PATCH (GIT-GUI) 6/8] git-gui: Reimplement and enhance auto-selection of diffs Alexander Gavrilov
2008-08-30 21:04 ` [PATCH (GIT-GUI) 7/8] git-gui: Make F5 reselect a diff, if an untracked file is selected Alexander Gavrilov
2008-08-30 21:05 ` [PATCH (GIT-GUI) 8/8] git-gui: Show special diffs for complex conflict cases Alexander Gavrilov
2008-09-08 12:10 ` [PATCH (GIT-GUI) 1/8] git-gui: Don't allow staging files with conflicts Johannes Sixt
2008-09-08 12:25 ` Alexander Gavrilov
2008-09-17 11:40 ` [PATCH/RFC 0/2] git-gui: issues with merge tool series Johannes Sixt
2008-09-17 11:40 ` [PATCH/RFC 1/2] Revert "git-gui: Don't allow staging files with conflicts." Johannes Sixt
2008-09-17 11:40 ` [PATCH/RFC 2/2] git-gui: Do not automatically stage file after merge tool finishes Johannes Sixt
2008-09-17 12:25 ` Alexander Gavrilov
2008-09-24 17:50 ` Shawn O. Pearce
2008-09-24 19:08 ` [PATCH/RFC 2/2 v2] " Johannes Sixt
2008-09-17 12:50 ` [PATCH/RFC 0/2] git-gui: issues with merge tool series Alexander Gavrilov
2008-09-17 21:40 ` Johannes Sixt
2008-09-17 22:24 ` Alexander Gavrilov
2008-09-24 17:48 ` Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200808310059.47327.angavrilov@gmail.com \
--to=angavrilov@gmail.com \
--cc=git@vger.kernel.org \
--cc=spearce@spearce.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).