2011-08-18 09:23:46 +02:00
|
|
|
diff_cmd () {
|
2012-10-11 05:22:36 +02:00
|
|
|
# p4merge does not like /dev/null
|
|
|
|
rm_local=
|
|
|
|
rm_remote=
|
|
|
|
if test "/dev/null" = "$LOCAL"
|
|
|
|
then
|
|
|
|
LOCAL="./p4merge-dev-null.LOCAL.$$"
|
|
|
|
>"$LOCAL"
|
|
|
|
rm_local=true
|
|
|
|
fi
|
|
|
|
if test "/dev/null" = "$REMOTE"
|
|
|
|
then
|
|
|
|
REMOTE="./p4merge-dev-null.REMOTE.$$"
|
|
|
|
>"$REMOTE"
|
|
|
|
rm_remote=true
|
|
|
|
fi
|
|
|
|
|
2011-08-18 09:23:46 +02:00
|
|
|
"$merge_tool_path" "$LOCAL" "$REMOTE"
|
2012-10-11 05:22:36 +02:00
|
|
|
|
|
|
|
if test -n "$rm_local"
|
|
|
|
then
|
|
|
|
rm -f "$LOCAL"
|
|
|
|
fi
|
|
|
|
if test -n "$rm_remote"
|
|
|
|
then
|
|
|
|
rm -f "$REMOTE"
|
|
|
|
fi
|
2011-08-18 09:23:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
merge_cmd () {
|
|
|
|
touch "$BACKUP"
|
|
|
|
$base_present || >"$BASE"
|
|
|
|
"$merge_tool_path" "$BASE" "$LOCAL" "$REMOTE" "$MERGED"
|
|
|
|
check_unchanged
|
|
|
|
}
|