Merge branch 'ss/git-gui-mergetool'

This commit is contained in:
Pat Thoyts
2011-03-25 08:26:47 +00:00

View File

@ -175,48 +175,23 @@ proc merge_resolve_tool2 {} {
# Build the command line # Build the command line
switch -- $tool { switch -- $tool {
kdiff3 { araxis {
if {$base_stage ne {}} { if {$base_stage ne {}} {
set cmdline [list "$merge_tool_path" --auto --L1 "$MERGED (Base)" \ set cmdline [list "$merge_tool_path" -wait -merge -3 -a1 \
--L2 "$MERGED (Local)" --L3 "$MERGED (Remote)" -o "$MERGED" "$BASE" "$LOCAL" "$REMOTE"] -title1:"'$MERGED (Base)'" -title2:"'$MERGED (Local)'" \
-title3:"'$MERGED (Remote)'" \
"$BASE" "$LOCAL" "$REMOTE" "$MERGED"]
} else { } else {
set cmdline [list "$merge_tool_path" --auto --L1 "$MERGED (Local)" \ set cmdline [list "$merge_tool_path" -wait -2 \
--L2 "$MERGED (Remote)" -o "$MERGED" "$LOCAL" "$REMOTE"] -title1:"'$MERGED (Local)'" -title2:"'$MERGED (Remote)'" \
"$LOCAL" "$REMOTE" "$MERGED"]
} }
} }
tkdiff { bc3 {
if {$base_stage ne {}} { if {$base_stage ne {}} {
set cmdline [list "$merge_tool_path" -a "$BASE" -o "$MERGED" "$LOCAL" "$REMOTE"] set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" "$BASE" -mergeoutput="$MERGED"]
} else { } else {
set cmdline [list "$merge_tool_path" -o "$MERGED" "$LOCAL" "$REMOTE"] set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" -mergeoutput="$MERGED"]
}
}
meld {
set cmdline [list "$merge_tool_path" "$LOCAL" "$MERGED" "$REMOTE"]
}
gvimdiff {
set cmdline [list "$merge_tool_path" -f "$LOCAL" "$MERGED" "$REMOTE"]
}
xxdiff {
if {$base_stage ne {}} {
set cmdline [list "$merge_tool_path" -X --show-merged-pane \
-R {Accel.SaveAsMerged: "Ctrl-S"} \
-R {Accel.Search: "Ctrl+F"} \
-R {Accel.SearchForward: "Ctrl-G"} \
--merged-file "$MERGED" "$LOCAL" "$BASE" "$REMOTE"]
} else {
set cmdline [list "$merge_tool_path" -X --show-merged-pane \
-R {Accel.SaveAsMerged: "Ctrl-S"} \
-R {Accel.Search: "Ctrl+F"} \
-R {Accel.SearchForward: "Ctrl-G"} \
--merged-file "$MERGED" "$LOCAL" "$REMOTE"]
}
}
opendiff {
if {$base_stage ne {}} {
set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" -ancestor "$BASE" -merge "$MERGED"]
} else {
set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" -merge "$MERGED"]
} }
} }
ecmerge { ecmerge {
@ -235,6 +210,42 @@ proc merge_resolve_tool2 {} {
"$LOCAL" "$REMOTE" "$basename"] "$LOCAL" "$REMOTE" "$basename"]
} }
} }
gvimdiff {
set cmdline [list "$merge_tool_path" -f "$LOCAL" "$MERGED" "$REMOTE"]
}
kdiff3 {
if {$base_stage ne {}} {
set cmdline [list "$merge_tool_path" --auto --L1 "$MERGED (Base)" \
--L2 "$MERGED (Local)" --L3 "$MERGED (Remote)" -o "$MERGED" "$BASE" "$LOCAL" "$REMOTE"]
} else {
set cmdline [list "$merge_tool_path" --auto --L1 "$MERGED (Local)" \
--L2 "$MERGED (Remote)" -o "$MERGED" "$LOCAL" "$REMOTE"]
}
}
meld {
set cmdline [list "$merge_tool_path" "$LOCAL" "$MERGED" "$REMOTE"]
}
opendiff {
if {$base_stage ne {}} {
set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" -ancestor "$BASE" -merge "$MERGED"]
} else {
set cmdline [list "$merge_tool_path" "$LOCAL" "$REMOTE" -merge "$MERGED"]
}
}
p4merge {
set cmdline [list "$merge_tool_path" "$BASE" "$REMOTE" "$LOCAL" "$MERGED"]
}
tkdiff {
if {$base_stage ne {}} {
set cmdline [list "$merge_tool_path" -a "$BASE" -o "$MERGED" "$LOCAL" "$REMOTE"]
} else {
set cmdline [list "$merge_tool_path" -o "$MERGED" "$LOCAL" "$REMOTE"]
}
}
vimdiff {
error_popup [mc "Not a GUI merge tool: '%s'" $tool]
return
}
winmerge { winmerge {
if {$base_stage ne {}} { if {$base_stage ne {}} {
# This tool does not support 3-way merges. # This tool does not support 3-way merges.
@ -245,25 +256,21 @@ proc merge_resolve_tool2 {} {
-dl "Theirs File" -dr "Mine File" "$REMOTE" "$LOCAL" "$MERGED"] -dl "Theirs File" -dr "Mine File" "$REMOTE" "$LOCAL" "$MERGED"]
} }
} }
araxis { xxdiff {
if {$base_stage ne {}} { if {$base_stage ne {}} {
set cmdline [list "$merge_tool_path" -wait -merge -3 -a1 \ set cmdline [list "$merge_tool_path" -X --show-merged-pane \
-title1:"'$MERGED (Base)'" -title2:"'$MERGED (Local)'" \ -R {Accel.SaveAsMerged: "Ctrl-S"} \
-title3:"'$MERGED (Remote)'" \ -R {Accel.Search: "Ctrl+F"} \
"$BASE" "$LOCAL" "$REMOTE" "$MERGED"] -R {Accel.SearchForward: "Ctrl-G"} \
--merged-file "$MERGED" "$LOCAL" "$BASE" "$REMOTE"]
} else { } else {
set cmdline [list "$merge_tool_path" -wait -2 \ set cmdline [list "$merge_tool_path" -X --show-merged-pane \
-title1:"'$MERGED (Local)'" -title2:"'$MERGED (Remote)'" \ -R {Accel.SaveAsMerged: "Ctrl-S"} \
"$LOCAL" "$REMOTE" "$MERGED"] -R {Accel.Search: "Ctrl+F"} \
-R {Accel.SearchForward: "Ctrl-G"} \
--merged-file "$MERGED" "$LOCAL" "$REMOTE"]
} }
} }
p4merge {
set cmdline [list "$merge_tool_path" "$BASE" "$REMOTE" "$LOCAL" "$MERGED"]
}
vimdiff {
error_popup [mc "Not a GUI merge tool: '%s'" $tool]
return
}
default { default {
error_popup [mc "Unsupported merge tool '%s'" $tool] error_popup [mc "Unsupported merge tool '%s'" $tool]
return return